ovs_dead, ovs-agent booting up code should exit graceful

Bug #1351135 reported by Robin Wang
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Gandharva

Bug Description

Currently, ovs-agent doesn't check ovs_dead during its boot up process. That leads to an ungraceful exit. We should avoid the crash and handle that situation graceful.

Stderr: '2014-08-01T03:50:10Z|00002|reconnect|WARN|unix:/var/run/openvswitch/db.sock: connection attempt failed (No such file or directory)\novs-vsctl: unix:/var/run/openvswitch/db. sock: database connection failed (No such file or directory)\n'
2014-08-01 11:50:10.425 17754 CRITICAL neutron [-] RuntimeError:
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: '2014-08-01T03:50:10Z|00002|reconnect|WARN|unix:/var/run/openvswitch/db.sock: connection attempt failed (No such file or directory)\novs-vsctl: unix:/var/run/openvswitch/db. sock: database connection failed (No such file or directory)\n'
2014-08-01 11:50:10.425 17754 TRACE neutron Traceback (most recent call last):
2014-08-01 11:50:10.425 17754 TRACE neutron File "/home/bengo/Downloads/pycharm-3.4.1/helpers/pydev/pydevd.py", line 1733, in <module>
2014-08-01 11:50:10.425 17754 TRACE neutron debugger.run(setup['file'], None, None)
2014-08-01 11:50:10.425 17754 TRACE neutron File "/home/bengo/Downloads/pycharm-3.4.1/helpers/pydev/pydevd.py", line 1226, in run
2014-08-01 11:50:10.425 17754 TRACE neutron pydev_imports.execfile(file, globals, locals) # execute the script
2014-08-01 11:50:10.425 17754 TRACE neutron File "/usr/local/bin/neutron-openvswitch-agent", line 10, in <module>
2014-08-01 11:50:10.425 17754 TRACE neutron sys.exit(main())
2014-08-01 11:50:10.425 17754 TRACE neutron File "/opt/stack/neutron/neutron/plugins/openvswitch/agent/ovs_neutron_agent.py", line 1644, in main
2014-08-01 11:50:10.425 17754 TRACE neutron agent = OVSNeutronAgent(**agent_config)
2014-08-01 11:50:10.425 17754 TRACE neutron File "/opt/stack/neutron/neutron/plugins/openvswitch/agent/ovs_neutron_agent.py", line 201, in __init__
2014-08-01 11:50:10.425 17754 TRACE neutron self.setup_integration_br()
2014-08-01 11:50:10.425 17754 TRACE neutron File "/opt/stack/neutron/neutron/plugins/openvswitch/agent/ovs_neutron_agent.py", line 796, in setup_integration_br
2014-08-01 11:50:10.425 17754 TRACE neutron self.int_br.set_secure_mode()
2014-08-01 11:50:10.425 17754 TRACE neutron File "/opt/stack/neutron/neutron/agent/linux/ovs_lib.py", line 128, in set_secure_mode
2014-08-01 11:50:10.425 17754 TRACE neutron check_error=True)
2014-08-01 11:50:10.425 17754 TRACE neutron File "/opt/stack/neutron/neutron/agent/linux/ovs_lib.py", line 71, in run_vsctl
2014-08-01 11:50:10.425 17754 TRACE neutron if not check_error:
2014-08-01 11:50:10.425 17754 TRACE neutron File "/opt/stack/neutron/neutron/openstack/common/excutils.py", line 82, in __exit__
2014-08-01 11:50:10.425 17754 TRACE neutron six.reraise(self.type_, self.value, self.tb)
2014-08-01 11:50:10.425 17754 TRACE neutron File "/opt/stack/neutron/neutron/agent/linux/ovs_lib.py", line 65, in run_vsctl
2014-08-01 11:50:10.425 17754 TRACE neutron return utils.execute(full_args, root_helper=self.root_helper)
2014-08-01 11:50:10.425 17754 TRACE neutron File "/opt/stack/neutron/neutron/agent/linux/utils.py", line 77, in execute
2014-08-01 11:50:10.425 17754 TRACE neutron raise RuntimeError(m)
2014-08-01 11:50:10.425 17754 TRACE neutron RuntimeError:
2014-08-01 11:50:10.425 17754 TRACE neutron Command: ['sudo', '/usr/local/bin/neutron-rootwrap', '/etc/neutron/rootwrap.conf', 'ovs-vsctl', '--timeout=10', '--', 'set-fail-mode', 'br-int', 'secure']

Tags: ovs
Robin Wang (robinwang)
Changed in neutron:
assignee: nobody → Robin Wang (robinwang)
Changed in neutron:
importance: Undecided → Medium
status: New → Confirmed
tags: added: ovs
Changed in neutron:
status: Confirmed → In Progress
Revision history for this message
Robin Wang (robinwang) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by Salvatore Orlando (<email address hidden>) on branch: master
Review: https://review.openstack.org/114273
Reason: This patch has been inactive long enough that I think it's safe to abandon.
The author can resurrect it if needed.

Changed in neutron:
status: In Progress → Confirmed
assignee: Robin Wang (robinwang) → nobody
Gandharva (gandharva-s)
Changed in neutron:
assignee: nobody → Gandharva (gandharva-s)
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/153138

Changed in neutron:
status: Confirmed → In Progress
Changed in neutron:
assignee: Gandharva (gandharva-s) → Romil Gupta (romilg)
Changed in neutron:
assignee: Romil Gupta (romilg) → Gandharva (gandharva-s)
Kyle Mestery (mestery)
Changed in neutron:
milestone: none → kilo-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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

commit e6ea486a9c82e2b083fbd181e31e45e0a5c43e42
Author: Gandharva <email address hidden>
Date: Thu Feb 5 11:15:19 2015 +0530

    ovs_neutron_agent should exit gracefully

    In this patch set if any error occurs during agent initialization
    phase, then it terminates ovs neutron agent gracefully.

    Closes-Bug: #1351135

    Co-Authored-By: Aman Kumar <email address hidden>
    Co-Authored-By: Neethi Shasidhar <email address hidden>

    Change-Id: I14d091c73c8f8f4dfe70e7f9a7f7683b5fb0fd7f

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: kilo-3 → 2015.1.0
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.