OpenStack Error: Open vSwitch agent 'XXX' dead — fix neutron-openvswitch-agent / ovs-vswitchd
Fix a dead Neutron Open vSwitch agent (alive :-() and unresponsive ovs-vswitchd: diagnose the ovsdb-server socket, agent-to-server RPC, and restart order so tenant networking recovers.
- #openstack
- #neutron
- #troubleshooting
- #errors
Stuck on this OpenStack error? Get the free incident triage checklist
A one-page PDF — the exact steps to isolate, fix, and verify a production error like this one. No spam, unsubscribe anytime.
Exact Error Message
$ openstack network agent list
+--------------+--------------------+-----------+-------+-------+----------------------------+
| ID | Agent Type | Host | Alive | State | Binary |
+--------------+--------------------+-----------+-------+-------+----------------------------+
| 7c2f... | Open vSwitch agent | compute-03| XXX | UP | neutron-openvswitch-agent |
+--------------+--------------------+-----------+-------+-------+----------------------------+
# /var/log/neutron/neutron-openvswitch-agent.log
ERROR neutron.agent.common.ovs_lib [-] Unable to execute
['ovs-vsctl', '--timeout=10', ...]. Exception: ovs-vsctl: unix:/var/run/openvswitch/db.sock:
database connection failed (Connection refused)
ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent [-]
Error while processing VIF ports; MessagingTimeout
The Alive column showing XXX (a “dead” smiley) means Neutron server has not received a heartbeat from the agent within agent_down_time.
What It Means
The Neutron Open vSwitch agent (neutron-openvswitch-agent) programs the OVS bridges (br-int, br-tun, br-ex) that carry tenant and external traffic on each node. It depends on two OVS daemons: ovsdb-server (the configuration database, reached over db.sock) and ovs-vswitchd (the fast-path datapath). The agent also heartbeats to neutron-server over RabbitMQ.
An agent shows dead for one of two reasons: the agent process is stuck or crashed (so it stops heartbeating), or OVS itself is unresponsive (ovs-vswitchd/ovsdb-server down) so every ovs-vsctl call the agent makes fails. Either way, ports on that host stop being wired up: new instances get no connectivity and existing flows may break.
Common Causes
ovsdb-serverorovs-vswitchdcrashed or is hung;db.sockrefuses connections.- The agent lost its RabbitMQ connection, so heartbeats never reach
neutron-server(MessagingTimeout). ovs-vswitchdis pegged/deadlocked after a kernel or OVS package upgrade without a datapath reload.- Integration bridge
br-intis missing or was deleted, so port setup fails. - Clock skew makes the last heartbeat look older than
agent_down_time. - The agent is alive but wedged rebuilding flows on a very large number of ports.
Diagnostic Commands
Confirm whether OVS itself is healthy on the affected host:
sudo systemctl status ovs-vswitchd ovsdb-server
sudo ovs-vsctl show
sudo ovs-vsctl --version
Check the agent process and its recent log:
sudo systemctl status neutron-openvswitch-agent
sudo tail -f /var/log/neutron/neutron-openvswitch-agent.log
Look at the bridges and datapath the agent expects:
sudo ovs-vsctl list-br
sudo ovs-ofctl show br-int
Confirm what Neutron server thinks of the agent and its heartbeat timing:
openstack network agent show 7c2f... -c alive -c last_heartbeat_at -c configurations
Step-by-Step Resolution
- Fix OVS first if
ovs-vsctl showfails. Restart the OVS daemons before touching the Neutron agent (order matters — the agent needs a workingdb.sock):
sudo systemctl restart ovsdb-server ovs-vswitchd
sudo ovs-vsctl show # must return the bridge list, not "Connection refused"
- Verify the integration bridge exists; recreate it only if it is genuinely missing:
sudo ovs-vsctl list-br | grep br-int || sudo ovs-vsctl add-br br-int
- Restart the Neutron OVS agent so it re-syncs flows against the now-healthy OVS:
sudo systemctl restart neutron-openvswitch-agent
- Watch the agent complete its initial sync without
db.sockor RPC errors:
sudo grep -E 'Agent .* out of sync|Configuration for devices up|MessagingTimeout' \
/var/log/neutron/neutron-openvswitch-agent.log | tail
INFO neutron...ovs_neutron_agent [-] Agent rpc_loop - iteration completed. Processed ports.
- If the agent is up but still marked dead, the problem is messaging. Check RabbitMQ reachability and clocks:
sudo rabbitmqctl list_connections | grep compute-03
sudo chronyc tracking
- Confirm the agent is alive again:
openstack network agent list --host compute-03 --agent-type open-vswitch -c Alive -c State
| Alive | State |
| :-) | UP |
Prevention
- Alert on
openstack network agent listshowing any agentAlive = XXXfor longer thanagent_down_time. - Reload the OVS datapath (
force-reload-kmod) as part of any OVS package upgrade soovs-vswitchddoes not hang. - Keep RabbitMQ healthy and highly available; most “dead” agents are actually a messaging outage.
- Run NTP/chrony everywhere so heartbeat timestamps are trustworthy.
- Do not manually delete
br-int/br-tun; let the agent manage its bridges.
Related Errors
neutron-server AgentNotFoundByTypeHost— the agent never registered on that host.MessagingTimeoutin agent logs — a RabbitMQ/oslo.messaging outage, not an OVS crash.Port ... failed to bind— a binding failure downstream of a dead agent.ovs-vsctl: database connection failed—ovsdb-serveris down, the root cause here.
Frequently Asked Questions
Why does the agent show dead even though the process is running? Because “dead” means Neutron server stopped receiving heartbeats. If the process is up, the cause is almost always a lost RabbitMQ connection or clock skew, not OVS.
In what order should I restart things? Restart ovsdb-server and ovs-vswitchd first, confirm ovs-vsctl show works, then restart neutron-openvswitch-agent. The agent cannot recover while OVS is unresponsive.
Will restarting the OVS agent drop tenant traffic? Existing datapath flows generally keep forwarding during a brief agent restart because ovs-vswitchd retains them, but avoid restarting the OVS daemons themselves during peak unless OVS is the fault.
How do I catch this before users do? Poll agent liveness and OVS health on a schedule; the automation patterns in the prompt library make that a one-liner. For more networking fixes, see the OpenStack guides.
Fixed it? Get 500 OpenStack & DevOps AI prompts — free
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.
Did this fix your issue?
Get 500 Battle-Tested DevOps AI Prompts — Free
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.