neutron-l3-agent does not start without IPv6

Bug #1361542 reported by Bernhard M. Wiedemann
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Kevin Benton
Icehouse
New
Undecided
Unassigned

Bug Description

When testing on a one-node-cloud that had ipv6 blacklisted, I found that neutron-l3-agent does not start
because it errors out when it tries to access /proc/sys/net/ipv6/conf/default/disable_ipv6

2014-08-26 10:12:57.987 29609 TRACE neutron File "/usr/lib64/python2.6/site-packages/neutron/service.py", line 269, in create
2014-08-26 10:12:57.987 29609 TRACE neutron periodic_fuzzy_delay=periodic_fuzzy_delay)
2014-08-26 10:12:57.987 29609 TRACE neutron File "/usr/lib64/python2.6/site-packages/neutron/service.py", line 202, in __init__
2014-08-26 10:12:57.987 29609 TRACE neutron self.manager = manager_class(host=host, *args, **kwargs)
2014-08-26 10:12:57.987 29609 TRACE neutron File "/usr/lib64/python2.6/site-packages/neutron/agent/l3_agent.py", line 916, in __init__
2014-08-26 10:12:57.987 29609 TRACE neutron super(L3NATAgentWithStateReport, self).__init__(host=host, conf=conf)
2014-08-26 10:12:57.987 29609 TRACE neutron File "/usr/lib64/python2.6/site-packages/neutron/agent/l3_agent.py", line 230, in __init__
2014-08-26 10:12:57.987 29609 TRACE neutron self.use_ipv6 = ipv6_utils.is_enabled()
2014-08-26 10:12:57.987 29609 TRACE neutron File "/usr/lib64/python2.6/site-packages/neutron/common/ipv6_utils.py", line 50, in is_enabled
2014-08-26 10:12:57.987 29609 TRACE neutron with open(disabled_ipv6_path, 'r') as f:
2014-08-26 10:12:57.987 29609 TRACE neutron IOError: [Errno 2] No such file or directory: '/proc/sys/net/ipv6/conf/default/disable_ipv6'

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/116826

Changed in neutron:
assignee: nobody → Kevin Benton (kevinbenton)
status: New → In Progress
Revision history for this message
Brian Haley (brian-haley) wrote :

Just wanted to add a comment since the practice of blacklisting the IPv6 module should have been deprecated by now in favor of using the "disable" module parameter. For example, this in an /etc/mod* file:

options ipv6 disable=1

That will load load the IPv6 module, but disable all its functionality, and has been in the Linux kernel ~5 years.

The disable_ipv6 setting can actually be switched on and off at will using sysctl, and is only saying the default action is to not enable IPv6 on interfaces, but the module is completely there and loaded. I think the check in the patch is OK, but there is the case where you could have default.disable_ipv6=1, but eth0.disable_ipv6=0.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/116826
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=0c963f6140237d8d3f361c6aaa7d2a6b656504db
Submitter: Jenkins
Branch: master

commit 0c963f6140237d8d3f361c6aaa7d2a6b656504db
Author: Kevin Benton <email address hidden>
Date: Tue Aug 26 01:52:00 2014 -0700

    Check for IPv6 file before reading

    Check to see if the IPv6 disabled flag file exists
    before trying to read it. This file doesn't exist
    on systems with the IPv6 module blacklisted.

    Closes-Bug: #1361542
    Change-Id: I4064b4189cc9d8f0f0e0e7025cf6f83d5b6ec276

Changed in neutron:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/118075

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (master)

Reviewed: https://review.openstack.org/118075
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=6f5f14872387f3814d3c421f07e68f6ce45f7d7d
Submitter: Jenkins
Branch: master

commit 6f5f14872387f3814d3c421f07e68f6ce45f7d7d
Author: YAMAMOTO Takashi <email address hidden>
Date: Mon Sep 1 13:39:12 2014 +0900

    Fix a recent ipv6 UT regression

    This fixes UT failures on systems without the procfs entry
    by adding appropriate mocking. The problem introduced by
    the following change:
        https://review.openstack.org/#/c/116826/
        commit 0c963f6140237d8d3f361c6aaa7d2a6b656504db

    Also, add a test for the case which the change in question fixed.

    Closes-Bug: #1363805
    Related-Bug: #1361542
    Change-Id: I72842c3446f3275e2288adc411540ab036025ed0

Thierry Carrez (ttx)
Changed in neutron:
milestone: none → juno-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: juno-3 → 2014.2
Revision history for this message
Jakub Libosvar (libosvar) wrote :

I think we should also backport both patches to Icehouse as the original one with bug was merged.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/130448

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (stable/icehouse)

Related fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/130450

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/icehouse)

Reviewed: https://review.openstack.org/130448
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=0e4f5260283ecdb01919e0522335f5e96871a119
Submitter: Jenkins
Branch: stable/icehouse

commit 0e4f5260283ecdb01919e0522335f5e96871a119
Author: Kevin Benton <email address hidden>
Date: Tue Aug 26 01:52:00 2014 -0700

    Check for IPv6 file before reading

    Check to see if the IPv6 disabled flag file exists
    before trying to read it. This file doesn't exist
    on systems with the IPv6 module blacklisted.

    Closes-Bug: #1361542
    Change-Id: I4064b4189cc9d8f0f0e0e7025cf6f83d5b6ec276
    (cherry picked from commit 0c963f6140237d8d3f361c6aaa7d2a6b656504db)

tags: added: in-stable-icehouse
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (stable/icehouse)

Reviewed: https://review.openstack.org/130450
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=be67d6db0f053c3d87cc38439db0bd05948f4b85
Submitter: Jenkins
Branch: stable/icehouse

commit be67d6db0f053c3d87cc38439db0bd05948f4b85
Author: YAMAMOTO Takashi <email address hidden>
Date: Mon Sep 1 13:39:12 2014 +0900

    Fix a recent ipv6 UT regression

    This fixes UT failures on systems without the procfs entry
    by adding appropriate mocking. The problem introduced by
    the following change:
        https://review.openstack.org/#/c/116826/
        commit 0c963f6140237d8d3f361c6aaa7d2a6b656504db

    Also, add a test for the case which the change in question fixed.

    Closes-Bug: #1363805
    Related-Bug: #1361542
    Change-Id: I72842c3446f3275e2288adc411540ab036025ed0
    (cherry picked from commit 6f5f14872387f3814d3c421f07e68f6ce45f7d7d)

Revision history for this message
Venu Murthy (venu-murthy) wrote :

We had same issue and fixed using the below
curl -o /usr/lib/python2.6/site-packages/neutron/common/ipv6_utils.py https://raw.githubusercontent.com/openstack/neutron/stable/icehouse/neutron/common/ipv6_utils.py

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.