Bug 1175035 - "is-blockdev"/"is-blockdev-opts" fail to detect "/dev/sda"
Summary: "is-blockdev"/"is-blockdev-opts" fail to detect "/dev/sda"
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.1
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-17 02:44 UTC by Chao Zhang
Modified: 2014-12-17 10:29 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-12-17 10:29:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Chao Zhang 2014-12-17 02:44:28 UTC
Description of problem:
"is-blockdev"/"is-blockdev-opts" fail to detect "/dev/sda"

Version-Release number of selected component (if applicable):
libguestfs-tools-c-1.28.1-1.17.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.add an image, and mount the root filesystem
# guestfish -N fs
><fs> mount /dev/sda1 /

2. list block devices, and check again.
><fs> list-devices
/dev/sda
><fs> is-whole-device /dev/sda
true

3. use "is-blockdev" and "is-blockdev-opts" commands.
><fs> is-blockdev /dev/sda
false
><fs> is-blockdev-opts /dev/sda
false

Actual results:
as described above, the results are all "false".

Expected results:
results should be "true".


Additional info:

Comment 1 Richard W.M. Jones 2014-12-17 10:29:35 UTC
is-blockdev only applies to paths within the guest filesystem, eg:

$ guestfish -N fs -m /dev/sda1 <<EOF
mknod 060777 10 10 /blockdev
is-blockdev /blockdev
EOF
true

I've added an upstream commit to clarify the documentation:

https://github.com/libguestfs/libguestfs/commit/abf51ec70b3edfcb5048ef209a1a3b1837aa06e5

I don't think we need to fix this in RHEL, so I'm closing this bug.


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