Open vSwitch Agent Errors in Compute Node

So my Open vSwitch agent in compute node is alive according to neutron agent-list command in controller node. But being alive doesn’t mean that everything is okay! (Those openstack docs should have told us about this!) Thus you have to check the logs throughly. Check all the logs in /var/log/openvswitch/, /var/log/neutron/, and even /var/log/nova/

If you are not finding any error then you can do the next steps.

For me I encountered such as…

fatal_signal|WARN|terminating with signal 14 (Alarm clock)
ERROR neutron.agent.linux.ovs_lib [-] Unable to execute ['ovs-ofctl', 'add-flows', 'br-int', '-']. Exception Command: ['sudo', '/usr/bin/neutron-rootwrap', '/etc/neutron/rootwrap.conf', 'ovs-ofctl', 'add-flows', 'br-int', '-']
ovs-ofctl: br-int is not a bridge or a socket

and even more, while actually the real culprit was this error in a log file that I didn’t check before..

modprobe: FATAL: Module openvswitch not found.

Apparently it just that my kernel didn’t have the necessary module. So I installed and copied openvswitch.ko to /lib/modules/$(uname -r)/net/openvswitch/ and restarted the agent and everything… easy peasy? Yes, in a hindsight! But before opening that specific log file I was trying to solve the errors that was caused by the absence of openvswitch.ko instead of simply just install the openvswitch.ko module.

Lessons that I got from here were…

  1. You will find lots of errors.
  2. Try to minimize the logs by stopping all the services, removing all the logs (probably you have another error from other steps or when you haven’t properly configured your agent yet), and starting the services again.
  3. Stop all the services at the first error that you notice.
  4. Gather all the errors from the logs, try to infer which was the root cause of the errors. Don’t just fix any error that you see.
  5. Fix the main error.

During fixing this error, I learnt also about these linux commands; insmod, modprobe, modinfo, dmesg tail | grep module_name. They were very useful.

Probably you will find another error that didn’t exist before, well go back to step 1 again. Cheers..

Leave a Reply

Your email address will not be published. Required fields are marked *