ovs-agent launch failed if br-int not existed

Bug #1328076 reported by stanzgy
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
stanzgy
Icehouse
Fix Released
Undecided
Unassigned

Bug Description

ovs-agent failed to launch if br-int is not existed.

$ sudo neutron-openvswitch-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini
....

2014-06-10 11:54:11.613 4624 DEBUG neutron.agent.linux.utils [-] Running command: ['sudo', '/usr/local/bin/neutron-rootwrap', '/etc/neutron/rootwrap.conf', 'ovs-vsctl', '--timeout=1
0', '--', 'set-fail-mode', 'br-int', 'secure'] create_process /usr/local/lib/python2.7/dist-packages/neutron/agent/linux/utils.py:48
2014-06-10 11:54:11.777 4624 ERROR neutron.agent.linux.utils [-]
Command: ['sudo', '/usr/local/bin/neutron-rootwrap', '/etc/neutron/rootwrap.conf', 'ovs-vsctl', '--timeout=10', '--', 'set-fail-mode', 'br-int', 'secure']
Exit code: 1
Stdout: ''
Stderr: 'ovs-vsctl: no bridge named br-int\n'
2014-06-10 11:54:11.779 4624 ERROR neutron.agent.linux.ovs_lib [-] Unable to execute ['ovs-vsctl', '--timeout=10', '--', 'set-fail-mode', 'br-int', 'secure']. Exception:
Command: ['sudo', '/usr/local/bin/neutron-rootwrap', '/etc/neutron/rootwrap.conf', 'ovs-vsctl', '--timeout=10', '--', 'set-fail-mode', 'br-int', 'secure']
Exit code: 1
Stdout: ''
Stderr: 'ovs-vsctl: no bridge named br-int\n'
2014-06-10 11:54:11.780 4624 CRITICAL neutron [-]
Command: ['sudo', '/usr/local/bin/neutron-rootwrap', '/etc/neutron/rootwrap.conf', 'ovs-vsctl', '--timeout=10', '--', 'set-fail-mode', 'br-int', 'secure']
Exit code: 1
Stdout: ''
Stderr: 'ovs-vsctl: no bridge named br-int\n'
2014-06-10 11:54:11.780 4624 TRACE neutron Traceback (most recent call last):
2014-06-10 11:54:11.780 4624 TRACE neutron File "/usr/local/bin/neutron-openvswitch-agent", line 10, in <module>
2014-06-10 11:54:11.780 4624 TRACE neutron sys.exit(main())
2014-06-10 11:54:11.780 4624 TRACE neutron File "/usr/local/lib/python2.7/dist-packages/neutron/plugins/openvswitch/agent/ovs_neutron_agent.py", line 1485, in main
2014-06-10 11:54:11.780 4624 TRACE neutron agent = OVSNeutronAgent(**agent_config)
2014-06-10 11:54:11.780 4624 TRACE neutron File "/usr/local/lib/python2.7/dist-packages/neutron/plugins/openvswitch/agent/ovs_neutron_agent.py", line 175, in __init__
2014-06-10 11:54:11.780 4624 TRACE neutron self.int_br.set_secure_mode()
2014-06-10 11:54:11.780 4624 TRACE neutron File "/usr/local/lib/python2.7/dist-packages/neutron/agent/linux/ovs_lib.py", line 128, in set_secure_mode
2014-06-10 11:54:11.780 4624 TRACE neutron check_error=True)
2014-06-10 11:54:11.780 4624 TRACE neutron File "/usr/local/lib/python2.7/dist-packages/neutron/agent/linux/ovs_lib.py", line 72, in run_vsctl
2014-06-10 11:54:11.780 4624 TRACE neutron ctxt.reraise = False
2014-06-10 11:54:11.780 4624 TRACE neutron File "/usr/local/lib/python2.7/dist-packages/neutron/openstack/common/excutils.py", line 82, in __exit__
2014-06-10 11:54:11.780 4624 TRACE neutron six.reraise(self.type_, self.value, self.tb)
2014-06-10 11:54:11.780 4624 TRACE neutron File "/usr/local/lib/python2.7/dist-packages/neutron/agent/linux/ovs_lib.py", line 65, in run_vsctl
2014-06-10 11:54:11.780 4624 TRACE neutron return utils.execute(full_args, root_helper=self.root_helper)
2014-06-10 11:54:11.780 4624 TRACE neutron File "/usr/local/lib/python2.7/dist-packages/neutron/agent/linux/utils.py", line 77, in execute
2014-06-10 11:54:11.780 4624 TRACE neutron raise RuntimeError(m)
2014-06-10 11:54:11.780 4624 TRACE neutron RuntimeError:
2014-06-10 11:54:11.780 4624 TRACE neutron Command: ['sudo', '/usr/local/bin/neutron-rootwrap', '/etc/neutron/rootwrap.conf', 'ovs-vsctl', '--timeout=10', '--', 'set-fail-mode', 'br
-int', 'secure']
2014-06-10 11:54:11.780 4624 TRACE neutron Exit code: 1
2014-06-10 11:54:11.780 4624 TRACE neutron Stdout: ''
2014-06-10 11:54:11.780 4624 TRACE neutron Stderr: 'ovs-vsctl: no bridge named br-int\n'
2014-06-10 11:54:11.780 4624 TRACE neutron

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/98755

Changed in neutron:
assignee: nobody → stanzgy (stanzgy)
status: New → In Progress
tags: added: ovs
Revision history for this message
Kyle Mestery (mestery) wrote :

What version of Neutron did you encounter this bug with? The OVS agent has gone through a large amount of changes over the last two iterations (Havana and Icehouse), and even now in Juno. Just curious mostly.

Revision history for this message
stanzgy (stanzgy) wrote :

hi kyle, I'm using the newest master branch of neutron project with commit 6cde36c to reproduce this bug.

stanzgy (stanzgy)
description: updated
Revision history for this message
Sudhakar Gariganti (sudhakar-gariganti) wrote :

We were always creating the bridges in advance.. to get over the issue. Its good to have this fix.

Changed in neutron:
importance: Undecided → Medium
Kyle Mestery (mestery)
Changed in neutron:
milestone: none → juno-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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

commit e5cdad90f97d3a54a493eca19e7a3ff643426de1
Author: stanzgy <email address hidden>
Date: Mon Jun 9 17:42:12 2014 +0800

    ovs-agent: Ensure integration bridge is created

    ovs-agent will fail to launch if integration bridge(br-int by default) is not
    existed. To fix this, the agent should check and create the bridge if necessary
    during launching.

    Closes-Bug: 1328076
    Change-Id: Iaa6c4d766ca086deb28c8ef7310dbfdcef2c105f

Changed in neutron:
status: In Progress → Fix Committed
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/101147

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

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

commit 2f65656dc876a78963e697a76b560c5fae2829fa
Author: stanzgy <email address hidden>
Date: Mon Jun 9 17:42:12 2014 +0800

    ovs-agent: Ensure integration bridge is created

    ovs-agent will fail to launch if integration bridge(br-int by default) is not
    existed. To fix this, the agent should check and create the bridge if necessary
    during launching.

    Cherry-picked from https://review.openstack.org/#/c/98755/

    Closes-Bug: 1328076
    Change-Id: Iaa6c4d766ca086deb28c8ef7310dbfdcef2c105f

tags: added: in-stable-icehouse
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: juno-2 → 2014.2
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.