lb agent: dhcp tap not plugged in bridge with vlan setup

Bug #1520618 reported by Andreas Scheuring
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Brian Haley

Bug Description

Commit [1] disables ipv6 on linuxbridges. On my linuxbridge vlan system, this fix causes the code ensure_bridge() to return too early without passing the bridge_name back.

The introduced method returns the output of the systcl -w call
+ def disable_ipv6(self):
+ cmd = 'net.ipv6.conf.%s.disable_ipv6=1' % self.name
+ return self._sysctl([cmd])

The sysctl always outputs the config that has been set (at least on my ubuntu):
# sudo sysctl -w net.ipv6.conf.brq1192ca0d-a3.disable_ipv6=1
net.ipv6.conf.brq1192ca0d-a3.disable_ipv6 = 1

The check that has been introduced assumes that on successful executing, nothing (or return code 0) is returned - but the command always returns something!
+ if bridge_device.disable_ipv6():
+ return

The result is, that the tap device of the dhcp server is not plugged into the bridge but instead still loosely hanging around.

Log from a lb tempest run [1]. after the sysctl command is executed, the method returns (the follow on call that sets the bridge up is missing):
2015-11-26 14:45:36.283 DEBUG neutron.agent.linux.utils [req-0655a18f-ce22-445c-834b-96ba4c91ae6e None None] Exit code: 0 execute /opt/stack/new/neutron/neutron/agent/linux/utils.py:142
2015-11-26 14:45:36.284 DEBUG neutron.agent.linux.utils [req-0655a18f-ce22-445c-834b-96ba4c91ae6e None None] Running command (rootwrap daemon): ['sysctl', '-w', 'net.ipv6.conf.brq66379423-07.disable_ipv6=1'] execute_rootwrap_daemon /opt/stack/new/neutron/neutron/agent/linux/utils.py:100
2015-11-26 14:45:36.286 DEBUG neutron.agent.linux.utils [req-0655a18f-ce22-445c-834b-96ba4c91ae6e None None] Exit code: 0 execute /opt/stack/new/neutron/neutron/agent/linux/utils.py:142
2015-11-26 14:45:36.286 DEBUG neutron.agent.linux.utils [req-0655a18f-ce22-445c-834b-96ba4c91ae6e None None] Running command: ['ip', '-o', 'link', 'show', 'vxlan-1009'] create_process /opt/stack/new/neutron/neutron/agent/linux/utils.py:84
2015-11-26 14:45:36.294 DEBUG neutron.agent.linux.utils [req-0655a18f-ce22-445c-834b-96ba4c91ae6e None None] Exit code: 0 execute /opt/stack/new/neutron/neutron/agent/linux/utils.py:142
2015-11-26 14:45:36.295 DEBUG neutron.agent.linux.utils [req-0655a18f-ce22-445c-834b-96ba4c91ae6e None None] Running command (rootwrap daemon): ['ip', 'link', 'set', 'tap35e6a6a9-ef', 'mtu', '1450'] execute_rootwrap_daemon

[1] https://review.openstack.org/#/c/241076/
[2] http://logs.openstack.org/85/193485/21/check/gate-tempest-dsvm-neutron-linuxbridge/7341e9a/logs/screen-q-agt.txt.gz

tags: added: linuxbridge
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/250855

Changed in neutron:
assignee: nobody → Andreas Scheuring (andreas-scheuring)
status: New → In Progress
Revision history for this message
Andreas Scheuring (andreas-scheuring) wrote : Re: Revert Disable IPV6 on bridge devices. It causes dhcp tap not plugged in bridge with vlan config

I think we should reopen the original bug [1] as soon as this got merged.

[1] https://bugs.launchpad.net/neutron/+bug/1302080

Changed in neutron:
importance: Undecided → Medium
importance: Medium → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by Andreas Scheuring (<email address hidden>) on branch: master
Review: https://review.openstack.org/250855
Reason: Had a chat with Rossella, as this fix is not breaking the gate, we should directly working on a fix for this instead of just reverting it for now

summary: - Revert Disable IPV6 on bridge devices. It causes dhcp tap not plugged in
- bridge with vlan config
+ lb agent: dhcp tap not plugged in bridge with vlan setup
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/253067

Changed in neutron:
assignee: Andreas Scheuring (andreas-scheuring) → Brian Haley (brian-haley)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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

commit cac2436f298491dbca2c932c80bdf3a64ac39ee6
Author: Andreas Scheuring <email address hidden>
Date: Thu Dec 3 14:54:39 2015 +0100

    Correct return values for bridge sysctl calls

    This fixes an issue where the lb agent did not plug the
    dhcp tap device into the bridge when having vlan networking
    set up. Caused by setting of disable_ipv6 value.

    Closes-Bug: #1520618
    Change-Id: I0d21fad3a676d1fdd30501ea6a295f1e9b207a3a
    Co-Authored-By: Brian Haley <email address hidden>

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/neutron 8.0.0.0b2

This issue was fixed in the openstack/neutron 8.0.0.0b2 development milestone.

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

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/271374

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

Reviewed: https://review.openstack.org/271374
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=1382da468faa454cb7d48365c1960bbe10f506a7
Submitter: Jenkins
Branch: stable/liberty

commit 1382da468faa454cb7d48365c1960bbe10f506a7
Author: Andreas Scheuring <email address hidden>
Date: Thu Dec 3 14:54:39 2015 +0100

    Correct return values for bridge sysctl calls

    This fixes an issue where the lb agent did not plug the
    dhcp tap device into the bridge when having vlan networking
    set up. Caused by setting of disable_ipv6 value.

    Conflicts:
     neutron/agent/linux/bridge_lib.py
     neutron/tests/functional/agent/linux/test_bridge_lib.py
     neutron/tests/unit/agent/linux/test_bridge_lib.py

    Closes-Bug: #1520618
    Change-Id: I0d21fad3a676d1fdd30501ea6a295f1e9b207a3a
    Co-Authored-By: Brian Haley <email address hidden>
    (cherry picked from commit cac2436f298491dbca2c932c80bdf3a64ac39ee6)

tags: added: in-stable-liberty
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/neutron 7.0.4

This issue was fixed in the openstack/neutron 7.0.4 release.

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.