Bug 1657189

Summary: augeas cannot parse /etc/sysconfig/anaconda
Product: Red Hat Enterprise Linux 7 Reporter: Pino Toscano <ptoscano>
Component: augeasAssignee: Pino Toscano <ptoscano>
Status: CLOSED ERRATA QA Contact: YongkuiGuo <yoguo>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.6CC: rjones, yoguo
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: augeas-1.4.0-9.el7 Doc Type: If docs needed, set a value
Doc Text:
Augeas now reads `/etc/sysconfig/anaconda`. Previously, Augeas was not able to read the `/etc/sysconfig/anaconda` file, which is a configuration file of the Anaconda installer. With this update, a new Anaconda lens of Augeas is provided. As a result, Augeas now reads `/etc/sysconfig/anaconda` as expected.
Story Points: ---
Clone Of:
: 1657192 (view as bug list) Environment:
Last Closed: 2019-08-06 12:02:32 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:

Description Pino Toscano 2018-12-07 11:55:02 UTC
Description of problem:
augeas cannot parse the Anaconda user interaction configuration file /etc/sysconfig/anaconda.

Version-Release number of selected component (if applicable):
augeas-libs-1.4.0-6.el7
augeas-1.4.0-6.el7

Steps to Reproduce:
1. install RHEL using Anaconda (manual or automated installation)
2. check that /etc/sysconfig/anaconda is present in the system
3. augtool print /augeas//error | grep anaconda
4. augtool print /files/etc/sysconfig/anaconda/

Actual results:
- step #3 prints (error position depends on the actual file):
/augeas/files/etc/sysconfig/anaconda/error = "parse_failed"
/augeas/files/etc/sysconfig/anaconda/error/pos = "73"
/augeas/files/etc/sysconfig/anaconda/error/line = "3"
/augeas/files/etc/sysconfig/anaconda/error/char = "0"
/augeas/files/etc/sysconfig/anaconda/error/lens = "/usr/share/augeas/lenses/dist/shellvars.aug:194.12-.60:"
/augeas/files/etc/sysconfig/anaconda/error/message = "Syntax error"
- step #4 prints nothing

Expected results:
- step #3 prints nothing
- step #4 prints the parsed tree, for example:
/files/etc/sysconfig/anaconda
/files/etc/sysconfig/anaconda/#comment = "This file has been generated by the Anaconda Installer 21.48.22.147-1"
/files/etc/sysconfig/anaconda/ProgressSpoke
/files/etc/sysconfig/anaconda/ProgressSpoke/visited = "1"

Comment 3 YongkuiGuo 2018-12-20 02:42:31 UTC
Verified with packages:
augeas-1.4.0-9.el7.x86_64
augeas-libs-1.4.0-9.el7.x86_64

Steps:

1. Make sure that /etc/sysconfig/anaconda is present in the system

2. 
# augtool print /files/etc/sysconfig/anaconda/
/files/etc/sysconfig/anaconda
/files/etc/sysconfig/anaconda/#comment = "This file has been generated by the Anaconda Installer 21.48.22.115-1"
/files/etc/sysconfig/anaconda/WelcomeLanguageSpoke
/files/etc/sysconfig/anaconda/WelcomeLanguageSpoke/visited = "1"
/files/etc/sysconfig/anaconda/StorageSpoke
/files/etc/sysconfig/anaconda/StorageSpoke/visited = "1"
/files/etc/sysconfig/anaconda/SoftwareSelectionSpoke
/files/etc/sysconfig/anaconda/SoftwareSelectionSpoke/visited = "1"
/files/etc/sysconfig/anaconda/PasswordSpoke
/files/etc/sysconfig/anaconda/PasswordSpoke/visited = "1"

3.
# augtool print /augeas//error | grep anaconda
The command above prints nothing.

Augeas now can be able to read `/etc/sysconfig/anaconda`.

Comment 5 errata-xmlrpc 2019-08-06 12:02:32 UTC
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.

https://access.redhat.com/errata/RHBA-2019:2019