New issue
Advanced search Search tips

Issue 909833 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 19
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Crostini unshare: Empty unmounted folders in /mnt/chromeos after unsharing until VM restart

Project Member Reported by avkodipelli@chromium.org, Nov 28

Issue description

Chrome Version: 72.0.3623.3
Chrome OS Version: 11307.0.0
Chrome OS Platform: Basking, bob
Network info: WiFi

Please specify Cr-* of the system to which this bug/feature applies (add
the label below).

Steps To Reproduce:
(1) Install linux from settings.
(2) Open Files from launcher and share Google Drive/My Drive with Linux by right clicking on folder.
(3) Open terminal and observe Google drive files/folders at /mnt/chromeos/
(4) Open chrome://settings/crostini/sharedPaths?search=linux and delete shared google drive.
(5) Open terminal observe whether Google drive folder is removed.


Expected Result:
- Google drive no longer available at /mnt/chromeos

Actual Result:
- GoogleDrive folder is still available but Google Drive files and folders are not available.

How frequently does this problem reproduce? (Always, sometimes, hard to
reproduce?)
Always

Note: signout/reboot fixed the issue.
Issue is GoogleDrive folder is not deleted but it's files and folders are deleted as expected.

 
This issue also observed with Downloads folder.
I assume these empty folders are not with write permission enabled. Could you check ?
Yes, no write permission. 

Labels: -Pri-1 -M-72 Pri-3
Summary: Crostini unshare: Empty unmounted folders in /mnt/chromeos after unsharing until VM restart (was: Crostini: GoogleDrive folder is still available after deleting access to share with Linux)
This is expected behavior at the moment, and will be the same for Downloads, or any other volume that we share.

Example scenario:

1/ Share Downloads/a/b/c1
In this case, we create directory /mnt/chromeos/MyFiles/Downloads/a/b/c1 inside the container.  Then we mount this path in the appropriate way.

2/ Share Downloads/a/b/c2
We create /mnt/chromeos/MyFiles/Downloads/a/b/c2 directory and mount it.

3/ Unshare Downloads/a/b/c1.
We remove the mount, and delete dir /mnt/chromeos/MyFiles/Downloads/a/b/c1 leaving path /mnt/chromeos/MyFiles/Downloads/a/b unchanged since it is still required.

4/ Unshare Downloads/a/b/c2.
Remove the mount, and delete dir /mnt/chromeos/MyFiles/Downloads/a/b/c2.

At the end of this scenario, we will still have an empty, unmounted directory:
/mnt/chromeos/MyFiles/Downloads/a/b

It is possible to clean this up a little better when unsharing by looking at all other mounts that still exist and then working out how far along the tree we can remove directories, but this gets a little complicated, and a VM restart always clears this.

tbuckley@, I am lowering priority on this and removing release branch label.
Owner: joelhockey@chromium.org
Status: Assigned (was: Untriaged)
<triaged>assigning to joel</triaged>
Project Member

Comment 6 by bugdroid1@chromium.org, Dec 19

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/44907c37e7c33dc7af5941285ba8617115f7a57b

commit 44907c37e7c33dc7af5941285ba8617115f7a57b
Author: Joel Hockey <joelhockey@chromium.org>
Date: Wed Dec 19 09:12:45 2018

vm_tools: seneschal: Remove empty directories after unshare

When a path such as MyFiles/a/b/c is shared, we create empty
dirs for MyFiles/a/b/c and then mount into this point.
When unsharing, we should remove these empty directories,
but we must take care to only remove directories which are
not also part of another mount such as MyFiles/a/b2/c2.

BUG= chromium:909833 
TEST=Test sharing with FilesApp on device

Change-Id: Iab7130d6c8cc1313bcd8f118a097aa713dc9e759
Reviewed-on: https://chromium-review.googlesource.com/1381312
Commit-Ready: Joel Hockey <joelhockey@chromium.org>
Tested-by: Joel Hockey <joelhockey@chromium.org>
Reviewed-by: Stephen Barber <smbarber@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>

[modify] https://crrev.com/44907c37e7c33dc7af5941285ba8617115f7a57b/vm_tools/seneschal/service.cc

Status: Fixed (was: Assigned)

Sign in to add a comment