Bug 975377
Summary: | inspect-get-hostname return unknown for linux guest in rhel6 | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | bfan | ||||
Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> | ||||
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 6.5 | CC: | leiwang, rjones, wshi | ||||
Target Milestone: | rc | Keywords: | Regression | ||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | libguestfs-1.20.9-5.el6 | Doc Type: | Bug Fix | ||||
Doc Text: |
(This was a bug in Augeas, not libguestfs)
|
Story Points: | --- | ||||
Clone Of: | Environment: | ||||||
Last Closed: | 2013-11-21 04:44:59 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | 975412 | ||||||
Bug Blocks: | |||||||
Attachments: |
|
Description
bfan
2013-06-18 10:05:50 UTC
Created attachment 762465 [details]
Test script which reproduces the problem
Note that 920609 has been fixed in the rebased Augeas package in RHEL 6.5
(but not the package in RHEL 7 apparently).
I can reproduce the problem using the attached script but I don't
yet understand why it happens.
FYI on RHEL 6 host, RHEL 6 guest, the test script dies with: could not get hostname (error = 'aug_get: no matching node at /tmp/bz975377.pl line 27. ') at /tmp/bz975377.pl line 29. Playing around with augtool (in virt-rescue) seems to show this is an Augeas problem. (1) Run the 'rm' expression: ><rescue> augtool -r /sysroot -L augtool> rm '/augeas/load//incl[. != "/etc/sysconfig/network"]' rm : /augeas/load//incl[. != "/etc/sysconfig/network"] 297 <---#a augtool> rm '/augeas/load//incl[. != "/etc/sysconfig/network"]' rm : /augeas/load//incl[. != "/etc/sysconfig/network"] 0 <---#b At #a 297 rules are deleted. When repeated, no more rules are deleted. (2) Repeat augtool, this time deleting a non-existent file: ><rescue> augtool -r /sysroot -L augtool> rm '/augeas/load//incl[. != "/etc/foobar"]' rm : /augeas/load//incl[. != "/etc/foobar"] 297 <---#c augtool> rm '/augeas/load//incl[. != "/etc/foobar"]' rm : /augeas/load//incl[. != "/etc/foobar"] 0 <---#d Note that #c and #d match #a and #b. (3) Repeat augtool, this time deleting a file which we know exists: ><rescue> augtool -r /sysroot -L augtool> rm '/augeas/load//incl[. != "/etc/passwd"]' rm : /augeas/load//incl[. != "/etc/passwd"] 296 <---#e augtool> rm '/augeas/load//incl[. != "/etc/passwd"]' rm : /augeas/load//incl[. != "/etc/passwd"] 0 <---#f Note that 1 less rule is deleted in #e compared to #a or #c. (4) Note that the file exists and is readable: ><rescue> ls -l /sysroot/etc/sysconfig/network -rw-r--r--. 1 root root 55 Jul 13 2011 /sysroot/etc/sysconfig/network Set component back to libguestfs since that's where we will have to make the change. This is actually an incompatible ABI change in Augeas however. Upstream bug report: https://bugzilla.redhat.com/show_bug.cgi?id=975412 Verified with libguestfs-1.20.11-1.el6.x86_64 # guestfish -a RHEL-Server-6.4-64-hvm.raw Welcome to guestfish, the libguestfs filesystem interactive shell for editing virtual machine filesystems. Type: 'help' for help on commands 'man' to read the manual 'quit' to quit the shell ><fs> run ><fs> inspect-os /dev/VolGroup/lv_root ><fs> inspect-get-hostname /dev/VolGroup/lv_root localhost.localdomain So change the status to verified Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2013-1536.html |