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 1198282 - Bad parsing of network-scripts/ifcfg-xxxx files by sysconfig.aug lens
Summary: Bad parsing of network-scripts/ifcfg-xxxx files by sysconfig.aug lens
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: augeas
Version: 7.1
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Dominic Cleal
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 761246
TreeView+ depends on / blocked
 
Reported: 2015-03-03 17:22 UTC by Laine Stump
Modified: 2015-11-19 10:18 UTC (History)
9 users (show)

Fixed In Version: augeas-1.4.0-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of: 761246
Environment:
Last Closed: 2015-11-19 10:18:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2015:2153 0 normal SHIPPED_LIVE augeas bug fix and enhancement update 2015-11-19 09:54:36 UTC

Description Laine Stump 2015-03-03 17:22:13 UTC
+++ This bug was initially created as a clone of Bug #761246 +++

Please see original BZ for full history. In short, netcf was failing to parse ifcfg files with the following characteristics:

1) lines ending in ";":

   ^DEVICE="eth0";

2) lines containing a variable setting followed by a partial line comment:

   ^DEVICE="eth0"  # bob loblaw

3) lines starting with whitespace:

   ^   DEVICe="eth0"

This was because netcf had its own private copy of the sysconfig.aug augeas lens, which was seriously out of date.

netcf has been patched to remove the private sysconfig.aug, which eliminates problems 1 & 2 (at least when using augeas-1.3.0), but problem 3 remains. That one can be fixed with the following patch, which hasn't yet been pushed to augeas upstream:

  https://github.com/hercules-team/augeas/pull/212/files

Please either rebase augeas to a version containing the above patch, or backport the latest version of sysconfig.aug.

Comment 1 Dominic Cleal 2015-03-13 15:56:11 UTC
Third case fixed in 3bc029d, the other two already seem to work in el7.

Comment 5 Hu Jianwei 2015-06-29 02:05:54 UTC
Using the latest augeas version:

[root@localhost ~]# rpm -q netcf libvirt augeas
netcf-0.2.8-1.el7.x86_64
libvirt-1.2.16-1.el7.x86_64
augeas-1.4.0-1.el7.x86_64

[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
  DEVICE=eth1;
ONBOOT=yes;
IPV6INIT="yes";
IPV6_AUTOCONF="no";
DHCPV6C="no";
IPV6ADDR="2002::200/64";
IPV6ADDR_SECONDARIES="2002::201/64 2002::202/64";
[root@localhost ~]# virsh iface-list --all
 Name                 State      MAC Address
---------------------------------------------------
 br888                inactive   
 eno1                 active     24:be:05:18:81:ce
 eth1                 inactive   
 lo                   active     00:00:00:00:00:00

[root@localhost ~]# virsh iface-dumpxml eth1
<interface type='ethernet' name='eth1'>
  <start mode='onboot'/>
  <protocol family='ipv6'>
    <ip address='2002::200' prefix='64'/>
    <ip address='2002::201' prefix='64'/>
    <ip address='2002::202' prefix='64'/>
  </protocol>
</interface>

I can not reproduce it anymore.

Comment 6 Xianghua Chen 2015-09-15 10:18:55 UTC
Verified with the package:
netcf-0.2.8-1.el7.x86_64
augeas-1.4.0-2.el7.x86_64

Verify steps:

[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
  DEVICE=eth1;  
ONBOOT=yes;
IPV6INIT="yes";
IPV6_AUTOCONF="no";
DHCPV6C="no";
IPV6ADDR="2002::200/64";
IPV6ADDR_SECONDARIES="2002::201/64 2002::202/64";

[root@localhost ~]# virsh iface-list --all
 Name                 State      MAC Address
---------------------------------------------------
 enp1s0               active     64:31:50:19:b9:74
 eth1                 inactive   
 lo                   active     00:00:00:00:00:00

[root@localhost ~]# virsh iface-dumpxml eth1
<interface type='ethernet' name='eth1'>
  <start mode='onboot'/>
  <protocol family='ipv6'>
    <ip address='2002::200' prefix='64'/>
    <ip address='2002::201' prefix='64'/>
    <ip address='2002::202' prefix='64'/>
  </protocol>
</interface>

Can not reproduce it, so verified

Comment 7 errata-xmlrpc 2015-11-19 10:18:52 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/RHEA-2015-2153.html


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