Open registration is disabled at the moment due to spam.If you need a new account, please contact Keto on oftc.net IRC and provide your desired username and email.
This Bugzilla instance is no longer in active use, so you should only need an account if you wish to use the Sailfish OS community OBS.
Bug 328 - mer-sdk-chroot umount leaves / mounted to /srv/mer/sdks
Summary: mer-sdk-chroot umount leaves / mounted to /srv/mer/sdks
Status: RESOLVED FIXED
Alias: None
Product: Mer Integration Tools (MINT)
Classification: Unclassified
Component: SDK (show other bugs)
Version: unspecified
Hardware: i586 Linux
: Normal normal
Assignee: David Greaves
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-10 13:31 UTC by Karl-Heinz Zimmer
Modified: 2012-05-16 07:34 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karl-Heinz Zimmer 2012-05-10 13:31:43 UTC
After umounting with the mer-sdk-chroot tool the / is still mounted to /srv/mer/sdks


Steps to reproduce the problem:

 mount | grep srv
 /srv/mer/sdks/sdk/mer-sdk-chroot mount
 mount | grep srv
 /srv/mer/sdks/sdk/mer-sdk-chroot umount
 mount | grep srv


Note: This happens independently from your position (`pwd`) in the file system, so the reason is NOT that the directory to-be-umounted is busy but it is a generally phenomena.

Of course calling
 sudo umount /srv/mer/sdks
works around the problem, yet it still is dangerous.
Comment 1 David Greaves 2012-05-14 11:11:15 UTC
triaged
Comment 2 David Greaves 2012-05-15 11:05:36 UTC
Could you verify that it's actually / that is mounted to /srv/mer/sdks/srv

After running your reproduce steps I get:
  /srv/mer/sdks on /srv/mer/sdks type none (rw,bind)

This is actually intentional. It's a bind mount to itself to ensure that /srv/mer/sdks is actually a mountpoint ... this permits us to use 
  mount --make-private /srv/mer/sdks

code and comments:
  https://github.com/lbt/sdk-kickstarter-configs/blob/master/mer-sdk-chroot#L159

It's not umounted on umount since that would require a reliable count of mounted SDKs and the intended 'cost' is just that /srv/mer/sdks stays as a bind mount to itself.
Comment 3 Karl-Heinz Zimmer 2012-05-15 12:39:28 UTC
Yes, is is the root.

After calling "mer-sdk-chroot mount" the rot is mounted twice:

> mount | grep sda6
/dev/sda6 on / type ext4 (rw,relatime,user_xattr,acl,barrier=1,data=ordered)
/dev/sda6 on /srv/mer/sdks type ext4 (rw,relatime,user_xattr,acl,barrier=1,data=ordered)

after calling "mer-sdk-chroot umount" the root remains mounted to /srv/mer/sdks
Comment 4 David Greaves 2012-05-15 14:28:58 UTC
ah, I think the output of mount varies depending on whether you have /dev/mtab as a symlink to /proc/mounts

Could you do an "ls -laF" of /srv/mer/sdks - it should be empty or only have SDKs inside - if it truly has bin,dev,usr and friends then we have a problem!
Comment 5 Karl-Heinz Zimmer 2012-05-15 14:32:32 UTC
Yes, exactly, the only content is:

sdk/

:-)
Comment 6 David Greaves 2012-05-15 14:50:48 UTC
OK - good. I'll close this bug and have noted the behaviour:

http://wiki.merproject.org/wiki/Platform_SDK#Removing_and_disconnecting_the_SDK
Comment 7 Karl-Heinz Zimmer 2012-05-16 07:34:32 UTC
Yes, your extra hint in the Wiki will avoid confusion, thank you.