RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1073072 - v1.0.0 Inifile lense is limited in functionality
Summary: v1.0.0 Inifile lense is limited in functionality
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: augeas
Version: 6.5
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Dominic Cleal
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-05 17:24 UTC by Greg Swift
Modified: 2015-02-15 06:54 UTC (History)
3 users (show)

Fixed In Version: augeas-1.0.0-6.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-14 07:15:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1517 0 normal SHIPPED_LIVE augeas bug fix and enhancement update 2014-10-14 01:22:17 UTC

Description Greg Swift 2014-03-05 17:24:32 UTC
Description of problem:
Tryign to work with several ini formatted files.  The IniFile lense in v1.0.0 does not include its own generic lens.  Several lenses utilize it.  However, I have tried several of these and none of them have worked with my files. The lens that is in v1.1 works for these files on a Fedora based system.

Version-Release number of selected component (if applicable):
1.0.0-5.el6_5.1

How reproducible:
very

Steps to Reproduce:
1. augtool -t 'Puppet.lns incl /path/to/ini'
2. print /files/path/to/ini
3. print /augeas/files/path/to/ini/error

Actual results:
If the file is parseable the print /files/ will display a list of the key value pairs.  However for mine it shows nothing.

If the file is not parseable the print /augeas/files/../error will display information about the parsing failure.  For the several lenses I tried I get the same error:

  augtool> print /augeas/files/etc/blah/blah.properties/error
  /augeas/files/etc/blah/blah.properties/error = "parse_failed"
  /augeas/files/etc/blah/blah.properties/error/pos = "306"
  /augeas/files/etc/blah/blah.properties/error/line = "8"
  /augeas/files/etc/blah/blah.properties/error/char = "0"
  /augeas/files/etc/blah/blah.properties/error/lens = "/usr/share/augeas/lenses/dist/inifile.aug:391.25-.43:"
  /augeas/files/etc/blah/blah.properties/error/message = "Get did not match entire input"

The line it is erroring on is this:

  database.migration.cleanOnStartup=false


Expected results:
augtool> print /files/blah/blah.properties/
  /files/blah/blah.properties
  /files/blah/blah.properties/section = ".anon"
  /files/blah/blah.properties/section/#comment[1] = "###################################################################################"
  /files/blah/blah.properties/section/#comment[2] = "Properties specified below are all NOT enabled with auto-reload option."
  /files/blah/blah.properties/section/#comment[3] = "So any change in this file requires server restart"
  /files/blah/blah.properties/section/#comment[4] = "###################################################################################"
  /files/blah/blah.properties/section/database.migration.cleanOnStartup = "false"


Additional info:
With the 1.1.0 lens the following works (and is how I generated the expected above):

augtool -t 'IniFile.lns_loose incl /path/to/ini'

Comment 1 Dominic Cleal 2014-03-05 17:50:23 UTC
Upstream's 96042e5 fixes this.

Just to clarify, the reproducer steps are for the basic INI-file support exposed in 1.0.0, e.g.

Steps to Reproduce (before):
1. echo "database.migration.cleanOnStartup=false" > /tmp/test.ini
2. augtool -t 'Puppet.lns incl /tmp/test.ini' print /files/tmp/test.ini
3. augtool -t 'Puppet.lns incl /tmp/test.ini' print /augeas//error

And as per additional info above, change the augtool command to use IniFile.lns_loose once fixed:

augtool -t 'IniFile.lns_loose incl /tmp/test.ini'

Comment 3 Lingfei Kong 2014-06-13 03:11:03 UTC
Verified with augeas-1.0.0-6.el6
Steps to verify:
1. 1. echo "database.migration.cleanOnStartup=false" > /tmp/test.ini
2. # augtool -t 'IniFile.lns_loose incl /tmp/test.ini' print /augeas//error
<no output>
3. Check file: /usr/share/augeas/lenses/dist/inifile.aug, A new lense is added: lns_loose

Comment 4 errata-xmlrpc 2014-10-14 07:15:44 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.

http://rhn.redhat.com/errata/RHBA-2014-1517.html


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