Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1057492 - mount-local should give a clearer error if root is not mounted
Summary: mount-local should give a clearer error if root is not mounted
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1057504 1062533 1062890
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-24 09:00 UTC by yuliu
Modified: 2014-06-18 02:02 UTC (History)
6 users (show)

Fixed In Version: libguestfs-1.22.6-19.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1057504 1057510 (view as bug list)
Environment:
Last Closed: 2014-06-13 10:31:17 UTC


Attachments (Terms of Use)

Description yuliu 2014-01-24 09:00:37 UTC
Description of problem:
Before run "mount-local localmountpoint " you should mount filesystem to "/" first.
This prerequisites should be added to help info.

Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Richard W.M. Jones 2014-01-24 09:07:09 UTC
If you use mount-local without mounting something on / then you get
odd errors:

$ mkdir -p /tmp/mnt
$ guestfish -x -N fs mount-local /tmp/mnt : mount-local-run
libguestfs: error: lstat: lstat_stub: you must call 'mount' first to mount the root filesystem
libguestfs: error: lstat: lstat_stub: you must call 'mount' first to mount the root filesystem

Basically what happens is that mount-local itself doesn't do the
usual "is root mounted" daemon check (because it cannot - it is not
running in the daemon).  However any later commands which are run
by mount-local do this check, and give errors.

It would be better if mount-local itself did this check and gave
a clearer error if root was not mounted.

Comment 3 Richard W.M. Jones 2014-02-05 16:52:16 UTC
Upstream fix is 0e2489974b91e4728d544fe2aa08c2a1c9deb365.

Comment 6 yuliu 2014-02-10 07:47:54 UTC
Version: libguestfs-1.22.6-19.el7.x86_64

When use mount-local without mounting something on "/":

# guestfish -x -N fs mount-local /tmp/mnt : mount-local-run

libguestfs: error: you must call 'guestfs_mount' first to mount a filesystem on '/'.
Note: '/tmp/mnt' is still mounted.  Use 'guestunmount /tmp/mnt' to clean up.

It gives a clear error info about what to do first.

Comment 7 Ludek Smid 2014-06-13 10:31:17 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


Note You need to log in before you can comment on or make changes to this bug.