libvirtd tries to disable ipv6's accept_ra even when ipv6 is disabled outright in the kernel

Bug #690042 reported by Anomaly256
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

When the system has ipv6 disabled outright, /usr/sbin/libvirtd still tries to blindly disable accept_ra despite it's destined failure to open /proc/sys/net/ipv6/conf/virbr1/accept_ra. It does not continue past this failure.

Expected behavior is that it should either attempt to stat this file/path first, then continue without disabling accept_ra should it not exist, or at a minimum continue to start the network in spite of the failure to open the file.

Note: At the moment, this issue is a complete BLOCKER for me. Not simply a mere inconvenience. The current immaturity of ipv6 support is some applications has forced the need for me to disable it outright to prevent some 3rd party services from trying to bind to ipv6 interfaces.

virsh # net-start Virtual_Cloud
error: Failed to start network Virtual_Cloud
error: cannot disable /proc/sys/net/ipv6/conf/virbr1/accept_ra: No such file or directory

Using version:
# dpkg --list | grep libvirt
ii libvirt-bin 0.7.5-5ubuntu27.7 the programs for the libvirt library
ii libvirt0 0.7.5-5ubuntu27.7 library for interfacing with different virtu
ii python-libvirt 0.7.5-5ubuntu27.7 libvirt Python bindings

Dave Walker (davewalker)
Changed in libvirt (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
lei (hughsun) wrote :

Can you please add more steps to reproduce this bug? It's not clear to me when this happens although I have found the problem in the source code. It is hardly to test it even when I make change to code.

Revision history for this message
Anomaly256 (anomaly256) wrote : Re: [Bug 690042] Re: libvirtd tries to disable ipv6's accept_ra even when ipv6 is disabled outright in the kernel

Simply compile a kernel without ipv6 support.

Libvirt blindly assumes the /proc/sys/net/ipv6/* entries exist and fails to gracefully continue when they are not writable.

----- Original message -----
> Can you please add more steps to reproduce this bug? It's not clear to
> me when this happens although I have found the problem in the source
> code. It is hardly to test it even when I make change to code.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/690042
>
> Title:
>    libvirtd tries to disable ipv6's accept_ra even when ipv6 is disabled
>    outright in the kernel
>
> Status in “libvirt” package in Ubuntu:
>    Confirmed
>
> Bug description:
>    When the system has ipv6 disabled outright, /usr/sbin/libvirtd still
>    tries to blindly disable accept_ra despite it's destined failure to
>    open /proc/sys/net/ipv6/conf/virbr1/accept_ra.  It does not continue
>    past this failure.
>
>    Expected behavior is that it should either attempt to stat this
>    file/path first, then continue without disabling accept_ra should it
>    not exist, or at a minimum continue to start the network in spite of
>    the failure to open the file.
>
>    Note: At the moment, this issue is a complete BLOCKER for me.  Not
>    simply a mere inconvenience.  The current immaturity of ipv6 support
>    is some applications has forced the need for me to disable it outright
>    to prevent some 3rd party services from trying to bind to ipv6
>    interfaces.
>
>    virsh # net-start Virtual_Cloud
>    error: Failed to start network Virtual_Cloud
>    error: cannot disable /proc/sys/net/ipv6/conf/virbr1/accept_ra: No
> such file or directory
>
>    Using version:
>    # dpkg --list | grep libvirt
>    ii  libvirt-bin
> 0.7.5-5ubuntu27.7                                                            the programs for the
> libvirt library  ii  libvirt0
>  0.7.5-5ubuntu27.7                                                            library for interfacing
> with different virtu  ii  python-libvirt
>            0.7.5-5ubuntu27.7                                                            libvirt Python
> bindings
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/690042/+subscriptions

Revision history for this message
Anomaly256 (anomaly256) wrote : Re: [Bug 690042] Re: libvirtd tries to disable ipv6's accept_ra even when ipv6 is disabled outright in the kernel
Download full text (3.4 KiB)

To be more specific in order to reproduce:

Compile/switch to a kernel without ipv6 support (don't worry about the
specifics as to why someone would do this, it's come up a few times
where I've had to ie buggy application support, administration of
machines also acting as firewalls, etc)
Then use virsh, virt-manager, or whatever other libvirt mechanism to
provision a new virtual machine.

Libvirt will try to change some interface/protocol settings by echoing
values to /proc/sys/net/ipv6 entries during the provisioning/launch
process when activating the virtual network configs but will fail as
these entries don't exist on such a kernel.

At this stage the provisioning/launching of the new virtual machine
died out of hand where it should instead detect that there is no ipv6
support and continue without attempting to make these changes.

There are actually probably a few areas where libvirt tries to alter
procfs or sysfs entries blindly where it should be testing for it's
ability to do so first and at worst gracefully ignoring the errors in
doing so as they aren't critical for actually launching the virtual
machines or the virtual network configurations

On Thu, Jun 30, 2011 at 6:23 PM, Wes <email address hidden> wrote:
> Simply compile a kernel without ipv6 support.
>
> Libvirt blindly assumes the /proc/sys/net/ipv6/* entries exist and fails to
> gracefully continue when they are not writable.
>
>
> ----- Original message -----
>> Can you please add more steps to reproduce this bug? It's not clear to
>> me when this happens although I have found the problem in the source
>> code. It is hardly to test it even when I make change to code.
>>
>> --
>> You received this bug notification because you are subscribed to the bug
>> report.
>> https://bugs.launchpad.net/bugs/690042
>>
>> Title:
>>    libvirtd tries to disable ipv6's accept_ra even when ipv6 is disabled
>>    outright in the kernel
>>
>> Status in “libvirt” package in Ubuntu:
>>    Confirmed
>>
>> Bug description:
>>    When the system has ipv6 disabled outright, /usr/sbin/libvirtd still
>>    tries to blindly disable accept_ra despite it's destined failure to
>>    open /proc/sys/net/ipv6/conf/virbr1/accept_ra.  It does not continue
>>    past this failure.
>>
>>    Expected behavior is that it should either attempt to stat this
>>    file/path first, then continue without disabling accept_ra should it
>>    not exist, or at a minimum continue to start the network in spite of
>>    the failure to open the file.
>>
>>    Note: At the moment, this issue is a complete BLOCKER for me.  Not
>>    simply a mere inconvenience.  The current immaturity of ipv6 support
>>    is some applications has forced the need for me to disable it outright
>>    to prevent some 3rd party services from trying to bind to ipv6
>>    interfaces.
>>
>>    virsh # net-start Virtual_Cloud
>>    error: Failed to start network Virtual_Cloud
>>    error: cannot disable /proc/sys/net/ipv6/conf/virbr1/accept_ra: No
>> such file or directory
>>
>>    Using version:
>>    # dpkg --list | grep libvirt
>>    ii  libvirt-bin
>>
>> 0.7.5-5ubuntu27.7
>>   the programs for the
>> libvirt library  ii  libvirt0
>>
>>  0.7.5-5ubunt...

Read more...

Revision history for this message
lei (hughsun) wrote :

Thanks for your reply. I have switched to a kernel without ipv6 support. But it still can not reproduce the error you described as below.

virsh # net-start Virtual_Cloud
error: Failed to start network Virtual_Cloud
error: cannot disable /proc/sys/net/ipv6/conf/virbr1/accept_ra: No such file or directory

 I have preliminary made a test patch for it based on the possible error of source code as you described. Can you give me more detailed steps about environment setting or paste the your network config xml file named Virtual_Cloud directly, so i can test it more conveniently.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Marking invalid per comment #4.

Changed in libvirt (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.