Bug 957380 - libguestfs: error: btrfsvol:/dev/sda2/root: root device not found: only call this function with a root device previously returned by guestfs_inspect_os
Summary: libguestfs: error: btrfsvol:/dev/sda2/root: root device not found: only call ...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-27 20:42 UTC by Richard W.M. Jones
Modified: 2013-04-29 19:24 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-04-29 19:24:00 UTC
Embargoed:


Attachments (Terms of Use)
log from failing tests/mountable/test-mountable-inspect.sh, with LIBGUESTFS_TRACE=1 (15.75 KB, text/plain)
2013-04-29 17:26 UTC, Mike Kelly
no flags Details

Description Richard W.M. Jones 2013-04-27 20:42:47 UTC
Description of problem:

(Reported by Mike Kelly on IRC)

make[2]: Entering directory `/home/pioto/git/libguestfs/tests/mountable'
25 seconds: ./test-internal-parse-mountable
PASS: test-internal-parse-mountable
/home/pioto/git/libguestfs/run --test ./test-mountable-inspect.sh
Formatting 'test.qcow2', fmt=qcow2 size=1073741824 backing_file='../guests/fedora-btrfs.img' backing_fmt='raw' encryption=off c
luster_size=65536 
libguestfs: error: mount: mount: /home: No such file or directory
lt-guestfish: some filesystems could not be mounted (ignored)
*stdin*:1: libguestfs: error: btrfsvol:/dev/sda2/root: root device not found: only call this function with a root device previo
usly returned by guestfs_inspect_os
/home/pioto/git/libguestfs/tests/mountable/test-mountable-inspect.sh: error #1: unexpected output from inspect-get-mountpoints
/home/pioto/git/libguestfs/run: command failed with exit code 1
FAIL: test-mountable-inspect.sh
===================
1 of 2 tests failed
===================

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

libguestfs 1.21.3x (from git)

Additional info:

Using Ubuntu 12.04, so qemu without virtio-scsi.

Comment 1 Mike Kelly 2013-04-29 17:26:26 UTC
Created attachment 741577 [details]
log from failing tests/mountable/test-mountable-inspect.sh, with LIBGUESTFS_TRACE=1

Comment 2 Richard W.M. Jones 2013-04-29 18:26:15 UTC
I see.  This is actually a bug in the test.

The test does:

guestfish -a test.qcow2 -i <<'EOF' # ...
  inspect-get-mountpoints btrfsvol:/dev/sda2/root
EOF

but this is wrong because the way the inspect-os API is
defined, you *have* to pass the precise string returned by
inspect-os back to inspect-get-mountpoints.  The test assumes
that the string is "btrfsvol:/dev/sda2/root", which it is
not in this case (it is in fact "btrfsvol:/dev/vda2/root").

The test does this in two places.

The following patch should fix it:

https://github.com/libguestfs/libguestfs/commit/93e64b4448c7afccf4c4751ff5deba3e321e7851

Comment 3 Mike Kelly 2013-04-29 19:22:21 UTC
I think this can now be resolved:

100 seconds: ./test-mountable-inspect.sh
PASS: test-mountable-inspect.sh

Thanks for the quick patch.

Comment 4 Richard W.M. Jones 2013-04-29 19:24:00 UTC
Thanks for the quick response.  Closing as "UPSTREAM".
Fix will be in 1.21.35.


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