Bug 1043636
Summary: | augeas-libs 1.0.0-5 breaks loading of /etc/sysconfig/nfs file | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Jonathan Underwood <jonathan.underwood> | ||||||
Component: | augeas | Assignee: | Dominic Cleal <dcleal> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | low | ||||||||
Version: | 6.5 | CC: | huzhan, jonathan.underwood, leiwang, lkong | ||||||
Target Milestone: | rc | ||||||||
Target Release: | --- | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | augeas-1.0.0-6.el6 | Doc Type: | Bug Fix | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | |||||||||
: | 1043665 (view as bug list) | Environment: | |||||||
Last Closed: | 2014-10-14 07:15:34 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: | |||||||||
Bug Blocks: | 1043665 | ||||||||
Attachments: |
|
Description
Jonathan Underwood
2013-12-16 19:07:39 UTC
Please attach the contents of /etc/sysconfig/nfs to the BZ, as it's failing to load the file. It'd also be useful if you can provide debug output from Puppet (--debug). Created attachment 837386 [details]
/etc/sysconfig/nfs
/etc/sysconfig/nfs
Nb. downgrading to 0.9.0-4.el6 allows the augeas resource to complete succesfully. Created attachment 837387 [details]
output of puppet agent --debug --no-daemonize > puppet.log 2> &1
Relevant part seems to be: ESC[0;36mDebug: Augeas[/etc/sysconfig/nfs](provider=augeas): Opening augeas with root /, lens path , flags 64ESC[0m ESC[0;36mDebug: Augeas[/etc/sysconfig/nfs](provider=augeas): Augeas version 1.0.0 is installedESC[0m ESC[1;31mWarning: Augeas[/etc/sysconfig/nfs](provider=augeas): Loading failed for one or more files, see debug for /augeas//error outputESC[0m ESC[0;36mDebug: Augeas[/etc/sysconfig/nfs](provider=augeas): /augeas/files/etc/sysconfig/nfs/error = parse_failedESC[0m ESC[0;36mDebug: Augeas[/etc/sysconfig/nfs](provider=augeas): /augeas/files/etc/sysconfig/nfs/error/pos = 159ESC[0m ESC[0;36mDebug: Augeas[/etc/sysconfig/nfs](provider=augeas): /augeas/files/etc/sysconfig/nfs/error/line = 7ESC[0m ESC[0;36mDebug: Augeas[/etc/sysconfig/nfs](provider=augeas): /augeas/files/etc/sysconfig/nfs/error/char = 0ESC[0m ESC[0;36mDebug: Augeas[/etc/sysconfig/nfs](provider=augeas): /augeas/files/etc/sysconfig/nfs/error/lens = /usr/share/augeas/lenses/dist/sysconfig.aug:62.12-.71:ESC[0m ESC[0;36mDebug: Augeas[/etc/sysconfig/nfs](provider=augeas): /augeas/files/etc/sysconfig/nfs/error/message = Get did not match entire inputESC[0m ESC[0;36mDebug: Augeas[/etc/sysconfig/nfs](provider=augeas): Will attempt to save and only run if files changedESC[0m ESC[0;36mDebug: Augeas[/etc/sysconfig/nfs](provider=augeas): sending command 'set' with params ["/files/etc/sysconfig/nfs/SECURE_NFS", "yes"]ESC[0m ESC[0;36mDebug: Augeas[/etc/sysconfig/nfs](provider=augeas): Closed the augeas connectionESC[0m ESC[1;31mError: /Stage[main]/Nfs::Client::Redhat::Configure/Augeas[/etc/sysconfig/nfs]: Could not evaluate: Save failed with return code false, see debugESC[0m Ugh, a diff of the sysconfig lens between the 0.9 and 1.0 packages shows a heap of changes. (In reply to Jonathan Underwood from comment #6) > Ugh, a diff of the sysconfig lens between the 0.9 and 1.0 packages shows a > heap of changes. Ah, I hadn't noticed you were using the Sysconfig module. I'd recommend using Shellvars.lns instead, as this is the default lens for handling /etc/sysconfig/*. Shellvars generally gets more attention and is far more extensive for handling shell-style files. Upstream as 92274bd3ff47d3cc4511d934dae06f16b59db7ad. Steps to Reproduce: 1. augtool -A --transform "Sysconfig incl /etc/sysconfig/nfs" print /augeas/files/etc/sysconfig/nfs/error 2. augtool -A --transform "Sysconfig incl /etc/sysconfig/nfs" print /files/etc/sysconfig/nfs/ Actual results: /augeas/files/etc/sysconfig/nfs/error = "parse_failed" /augeas/files/etc/sysconfig/nfs/error/pos = "159" /augeas/files/etc/sysconfig/nfs/error/line = "7" /augeas/files/etc/sysconfig/nfs/error/char = "0" /augeas/files/etc/sysconfig/nfs/error/lens = "/usr/share/augeas/lenses/dist/sysconfig.aug:62.12-.71:" /augeas/files/etc/sysconfig/nfs/error/message = "Get did not match entire input" Second command prints no output. Expected results: No output from the first command. ~54 lines of output from the second command: /files/etc/sysconfig/nfs/#comment[1] = "Define which protocol versions mountd" /files/etc/sysconfig/nfs/#comment[2] = "will advertise. The values are \"no\" or \"yes\"" /files/etc/sysconfig/nfs/#comment[3] = "with yes being the default" (In reply to Dominic Cleal from comment #7) > (In reply to Jonathan Underwood from comment #6) > > Ugh, a diff of the sysconfig lens between the 0.9 and 1.0 packages shows a > > heap of changes. > > Ah, I hadn't noticed you were using the Sysconfig module. I'd recommend > using Shellvars.lns instead, as this is the default lens for handling > /etc/sysconfig/*. > > Shellvars generally gets more attention and is far more extensive for > handling shell-style files. OK, can confirm that switching to the Shellvars lens fixes things. However, I worry that this update will have broken existing code for other people using the Sysconfig lens, so I think a fix for that lens is still probably needed in any case. [Aside: I can't help but wonder why upstream still ships the Sysconfig lens, and keep it different to the Shellvars lens. A possible fix might just be to copy the Shellvars lens to the Sysconfig.aug file and change the module name.] Anyway, thanks for the quick response on this, much appreciated. Can reproduce with augeas-1.0.0-5.el6 Steps to reproduce: 1. #augtool -A --transform "Sysconfig incl /etc/sysconfig/nfs" print /augeas/files/etc/sysconfig/nfs/error /augeas/files/etc/sysconfig/nfs/error = "parse_failed" /augeas/files/etc/sysconfig/nfs/error/pos = "159" /augeas/files/etc/sysconfig/nfs/error/line = "7" /augeas/files/etc/sysconfig/nfs/error/char = "0" /augeas/files/etc/sysconfig/nfs/error/lens = "/usr/share/augeas/lenses/dist/sysconfig.aug:62.12-.71:" /augeas/files/etc/sysconfig/nfs/error/message = "Get did not match entire input" 2. #augtool -A --transform "Sysconfig incl /etc/sysconfig/nfs" print /files/etc/sysconfig/nfs/ No output. (In reply to Jonathan Underwood from comment #9) > [Aside: I can't help but wonder why upstream still ships the Sysconfig lens, > and keep it different to the Shellvars lens. A possible fix might just be to > copy the Shellvars lens to the Sysconfig.aug file and change the module > name.] The intention appears to have been to support a subset of shell functionality for /etc/sysconfig/ files (e.g. no backticks or arrays), and to hide some implementation details of the shell like quoting which Shellvars passes through. That said, the lens has yet to become the default for these files. Do you plan to push a fix to this for RHEL 6.4 & 6.5? I am looking at quite a few broken puppet modules right now, and pondering if I should fix them all, or wait for an update. (In reply to Jonathan Underwood from comment #12) > Do you plan to push a fix to this for RHEL 6.4 & 6.5? I am looking at quite > a few broken puppet modules right now, and pondering if I should fix them > all, or wait for an update. RHEL 6.4 contains Augeas 0.9.0, so it's unaffected. For 6.5 (which supplied 1.0.0), as per https://access.redhat.com/site/support/policy/updates/errata/, only "qualified [..] Urgent and Selected High Priority Bug Fix errata advisories (RHBAs) may be released as they become available", so this is unlikely to qualify. Please raise this via support if you have a subscription and feel it meets this criteria. Thanks. OK, support case raised (Case 01001859). Verified with augeas-1.0.0-6.el6 Steps to verify: 1. #augtool -A --transform "Sysconfig incl /etc/sysconfig/nfs" print /augeas/files/etc/sysconfig/nfs/error No output 2. #augtool -A --transform "Sysconfig incl /etc/sysconfig/nfs" print /files/etc/sysconfig/nfs/ /files/etc/sysconfig/nfs /files/etc/sysconfig/nfs/#comment[1] = "Define which protocol versions mountd" /files/etc/sysconfig/nfs/#comment[2] = "will advertise. The values are \"no\" or \"yes\"" /files/etc/sysconfig/nfs/#comment[3] = "with yes being the default" /files/etc/sysconfig/nfs/#comment[4] = "MOUNTD_NFS_V2=\"no\"" /files/etc/sysconfig/nfs/#comment[5] = "MOUNTD_NFS_V3=\"no\"" /files/etc/sysconfig/nfs/#comment[6] = "Path to remote quota server. See rquotad(8)" /files/etc/sysconfig/nfs/#comment[7] = "RQUOTAD=\"/usr/sbin/rpc.rquotad\"" /files/etc/sysconfig/nfs/#comment[8] = "Port rquotad should listen on." /files/etc/sysconfig/nfs/#comment[9] = "RQUOTAD_PORT=875" .... Result: ~54 lines of output from the second command: /files/etc/sysconfig/nfs/#comment[1] = "Define which protocol versions mountd" /files/etc/sysconfig/nfs/#comment[2] = "will advertise. The values are \"no\" or \"yes\"" /files/etc/sysconfig/nfs/#comment[3] = "with yes being the default" 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/RHBA-2014-1517.html |