Bug 826752

Summary: virsh iface-list produces an error when "options ipv6 disable = 1" is in an /etc/modprobe.d file
Product: Red Hat Enterprise Linux 6 Reporter: Kevin Clevenger <kcleveng>
Component: augeasAssignee: Dominic Cleal <dcleal>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.2CC: acathrow, bfan, cwei, dallan, dcleal, dyuan, hbrock, leiwang, mzhan, prc, rjones, ydu
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: augeas-1.0.0-4.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-21 04:50:39 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: 817753    
Bug Blocks:    

Description Kevin Clevenger 2012-05-30 22:13:47 UTC
Description of problem:
If "options ipv6 disable = 1" is in an /etc/modprobe.d file executing iface-list within virsh will produce the error:

error: Failed to list active interfaces
error: internal error failed to get number of interfaces on host: unspecified error - errors in loading some config files

With 'ncftool list" it will produce:
error: unspecified error
error: errors in loading some config files

Version-Release number of selected component (if applicable):
libvirt-client-0.9.4-23.el6_2.8.x86_64
libvirt-0.9.4-23.el6_2.8.x86_64
netcf-0.1.9-2.el6.x86_64

How reproducible:
Run iface-list within virsh

Steps to Reproduce:
1. virsh
2. iface-list
3. (or 'ncftool list')
  
Actual results:
error: Failed to list active interfaces
error: internal error failed to get number of interfaces on host: unspecified error - errors in loading some config files

Expected results:
Name                 State      MAC Address
--------------------------------------------
eth0                 active     00:15:17:38:60:78
eth1                 active     00:15:17:38:60:79
eth2                 active     00:30:67:ab:b6:24
lo                   active     00:00:00:00:00:00

Additional info:
This happens only with "options ipv6 disable = 1", the following don't seem to have any negative effect:

blacklist net-pf-10
install net-pf-10 /bin/true
install ipv6 /bin/true
alias net-pf-10 off
alias ipv6 off

See also: BZ #711154

Comment 3 Laine Stump 2012-06-08 19:51:45 UTC
I just tried this on my RHEL6.3 system with options ipv6 disable=1 in /etc/modprobe.d/local.conf, and "virsh iface-list" worked without any error. Is there possibly something ipv6-specific in your ifcfg files?

Please do the following:

1) install the "netcf" package and run "ncftool -d list, and attach the output (hopefully it will fail and contain a more detailed error message).

2) attach a tarball containing the files /etc/sysconfig/network-scripts/ifcfg-* and route-*

Comment 4 Kevin Clevenger 2012-06-08 20:15:17 UTC
Also configured:
echo net.ipv6.conf.all.disable_ipv6 = 1 >> /etc/sysctl.conf

ncftool -d list
eth0
eth1
eth2
lo

Adding "options ipv6 disable = 1" to /etc/modprobe.d/local.conf (no reboot) 

ncftool -d list
warning: augeas initialization had errors
please file a bug with the following lines in the bug report:
/augeas/files/etc/modprobe.d/local.conf/error = "parse_failed"
/augeas/files/etc/modprobe.d/local.conf/error/pos = "24"
/augeas/files/etc/modprobe.d/local.conf/error/line = "2"
/augeas/files/etc/modprobe.d/local.conf/error/char = "0"
/augeas/files/etc/modprobe.d/local.conf/error/lens = "/usr/share/augeas/lenses/dist/modprobe.aug:49.10-.32:"
/augeas/files/etc/modprobe.d/local.conf/error/message = "Iterated lens matched less than it should"
error: unspecified error
error: errors in loading some config files

Ah, got it - it was the spaces in "disable = 1", remove the spaces (options ipv6 disable=1 instead of options ipv6 disable = 1) and both virsh and ncftool work correctly.

Comment 5 Laine Stump 2012-06-08 21:12:17 UTC
I wonder if modprobe.aug should be so severe. David?

Comment 6 David Lutterkort 2012-06-12 18:02:10 UTC
Fixed upstream in commit b56b837c

Comment 7 RHEL Program Management 2012-09-07 05:10:38 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.

Comment 11 bfan 2013-09-02 03:28:28 UTC
Can reproduce with augeas-0.9.0-4.el6.x86_64 

# echo net.ipv6.conf.all.disable_ipv6 = 1 >> /etc/sysctl.conf
# virsh 
Welcome to virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit

virsh # iface-list
error: Failed to reconnect to the hypervisor
error: no valid connection
error: internal error Unable to locate libvirtd daemon in /usr/sbin (to override, set $LIBVIRTD_PATH to the name of the libvirtd binary)

Comment 12 bfan 2013-09-02 03:48:22 UTC
(In reply to bfan from comment #11)
> Can reproduce with augeas-0.9.0-4.el6.x86_64 
> 
> # echo net.ipv6.conf.all.disable_ipv6 = 1 >> /etc/sysctl.conf
> # virsh 
> Welcome to virsh, the virtualization interactive terminal.
> 
> Type:  'help' for help with commands
>        'quit' to quit
> 
> virsh # iface-list
> error: Failed to reconnect to the hypervisor
> error: no valid connection
> error: internal error Unable to locate libvirtd daemon in /usr/sbin (to
> override, set $LIBVIRTD_PATH to the name of the libvirtd binary)

Sorry for putting uncorrect logs. The correct is

augeas-libs-0.9.0-4.el6.x86_64
libvirt-0.10.2-23.el6.x86_64
netcf-libs-0.1.9-4.el6.x86_64

# cat /etc/modprobe.d/local.conf 
options ipv6 disable = 1

# virsh
Welcome to virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit

virsh # iface-list
error: Failed to list interfaces
error: internal error failed to get number of host interfaces: unspecified error - errors in loading some config files

Comment 14 bfan 2013-10-12 02:28:54 UTC
Verified with augeas-1.0.0-5.el6.x86_64

# cat /etc/modprobe.d/local.conf 
options ipv6 disable = 1
# virsh
Welcome to virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit

virsh # iface-list
Name                 State      MAC Address
--------------------------------------------
eth0                 active     00:9c:02:9b:21:08
lo                   active     00:00:00:00:00:00

Comment 16 errata-xmlrpc 2013-11-21 04:50:39 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/RHSA-2013-1537.html