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 1144652 - Using the wrong lens to parse /etc/sysconfig/iptables.save
Summary: Using the wrong lens to parse /etc/sysconfig/iptables.save
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: augeas
Version: 6.6
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Dominic Cleal
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1144651
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-20 05:42 UTC by Lingfei Kong
Modified: 2015-07-22 05:40 UTC (History)
5 users (show)

Fixed In Version: augeas-1.0.0-8.el6
Doc Type: Bug Fix
Doc Text:
Clone Of: 1144651
Environment:
Last Closed: 2015-07-22 05:40:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1256 0 normal SHIPPED_LIVE augeas bug fix and enhancement update 2015-07-20 17:50:00 UTC

Description Lingfei Kong 2014-09-20 05:42:17 UTC
+++ This bug was initially created as a clone of Bug #1144651 +++

Description of problem:
/etc/sysconfig/iptables.save should be parsed by /usr/share/augeas/lenses/dist/iptables.aug, but in augeas-1.1.0-13.el7 it parsed by /usr/share/augeas/lenses/dist/shellvars.aug. /etc/sysconfig/iptables.save should be excl from shellvars.aug and incl in iptables.aug.


Version-Release number of selected component (if applicable):
augeas-1.1.0-13.el7


How reproducible:
100%


Steps to Reproduce:
1. # service iptables save
# service iptables save
2. #augtool print /augeas/files/etc/sysconfig/iptables.save
/augeas/files/etc/sysconfig/iptables.save
/augeas/files/etc/sysconfig/iptables.save/path = "/files/etc/sysconfig/iptables.save"
/augeas/files/etc/sysconfig/iptables.save/mtime = "1411189178"
/augeas/files/etc/sysconfig/iptables.save/lens = "@Shellvars"
/augeas/files/etc/sysconfig/iptables.save/lens/info = "/usr/share/augeas/lenses/dist/shellvars.aug:181.12-.56:"
/augeas/files/etc/sysconfig/iptables.save/error = "parse_failed"
/augeas/files/etc/sysconfig/iptables.save/error/pos = "65"
/augeas/files/etc/sysconfig/iptables.save/error/line = "2"
/augeas/files/etc/sysconfig/iptables.save/error/char = "0"
/augeas/files/etc/sysconfig/iptables.save/error/lens = "/usr/share/augeas/lenses/dist/shellvars.aug:181.12-.56:


Actual results:
At step 2, can find line /augeas/files/etc/sysconfig/iptables.save/error = "parse_failed"


Expected results:
#augtool print /augeas/files/etc/sysconfig/iptables.save
/augeas/files/etc/sysconfig/iptables.save
/augeas/files/etc/sysconfig/iptables.save/path = "/files/etc/sysconfig/iptables.save"
/augeas/files/etc/sysconfig/iptables.save/mtime = "1411189178"
/augeas/files/etc/sysconfig/iptables.save/lens = "@Iptables"
/augeas/files/etc/sysconfig/iptables.save/lens/info = "/usr/share/augeas/lenses/dist/iptables.aug:84.10-.32:"

Additional info:

Comment 2 Dominic Cleal 2014-11-26 08:51:51 UTC
Fixed in 7830adc, 69eb611, 85904f7.  (Or d9ad720 is the el7 backport.)

Comment 4 Hu Zhang 2015-03-04 01:59:31 UTC
Reproduced with augeas-1.0.0-7.el6.x86_64.

Verified with the package:
augeas-1.0.0-9.el6.x86_64

Steps to verify:
1. # service iptables save

2. # augtool print /augeas/files/etc/sysconfig/iptables.save
/augeas/files/etc/sysconfig/iptables.save
/augeas/files/etc/sysconfig/iptables.save/path = "/files/etc/sysconfig/iptables.save"
/augeas/files/etc/sysconfig/iptables.save/mtime = "1425434080"
/augeas/files/etc/sysconfig/iptables.save/lens = "@Iptables"
/augeas/files/etc/sysconfig/iptables.save/lens/info = "/usr/share/augeas/lenses/dist/iptables.aug:84.10-.32:"

2. # augtool print /files/etc/sysconfig/iptables.save
/files/etc/sysconfig/iptables.save
/files/etc/sysconfig/iptables.save/#comment[1] = "Generated by iptables-save v1.4.7 on Tue Mar  3 18:56:24 2015"
/files/etc/sysconfig/iptables.save/table = "filter"
/files/etc/sysconfig/iptables.save/table/chain[1] = "INPUT"
/files/etc/sysconfig/iptables.save/table/chain[1]/policy = "ACCEPT"
/files/etc/sysconfig/iptables.save/table/chain[2] = "FORWARD"
/files/etc/sysconfig/iptables.save/table/chain[2]/policy = "ACCEPT"
/files/etc/sysconfig/iptables.save/table/chain[3] = "OUTPUT"
/files/etc/sysconfig/iptables.save/table/chain[3]/policy = "ACCEPT"
/files/etc/sysconfig/iptables.save/table/append = "INPUT"
/files/etc/sysconfig/iptables.save/table/append/protocol = "tcp"
/files/etc/sysconfig/iptables.save/table/append/match = "tcp"
/files/etc/sysconfig/iptables.save/table/append/dport = "22"
/files/etc/sysconfig/iptables.save/table/append/jump = "ACCEPT"
....

No parse error returned.
So verified.

Comment 7 errata-xmlrpc 2015-07-22 05:40:57 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://rhn.redhat.com/errata/RHBA-2015-1256.html


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