OVSDB Error: Writing Transaction Failed: /etc/openvswitch/conf.db: Cannot Truncate: Permission Denied

Problem

  • The pf9-neutron-ovs-agent service fails to start.

  • On failure, the following log trace is seen in /var/log/pf9/pf9-neutron-ovs-agent.log.

487 189236 ERROR ovsdbapp.backend.ovs_idl.command [-] Error executing command: RuntimeError: OVSDB Error: {"details":"writing transaction failed: /etc/openvswitch/conf.db: cannot truncate to length 489420","error":"I/O error","io-error":"Permission denied"}487 189236 ERROR ovsdbapp.backend.ovs_idl.command Traceback (most recent call last):487 189236 ERROR ovsdbapp.backend.ovs_idl.command  File "/opt/pf9/pf9-neutron/lib/python2.7/site-packages/ovsdbapp/backend/ovs_idl/command.py", line 30, in execute487 189236 ERROR ovsdbapp.backend.ovs_idl.command    txn.add(self)487 189236 ERROR ovsdbapp.backend.ovs_idl.command  File "/opt/pf9/python/lib/python2.7/contextlib.py", line 24, in __exit__487 189236 ERROR ovsdbapp.backend.ovs_idl.command    self.gen.next()487 189236 ERROR ovsdbapp.backend.ovs_idl.command  File "/opt/pf9/pf9-neutron/lib/python2.7/site-packages/ovsdbapp/api.py", line 94, in transaction487 189236 ERROR ovsdbapp.backend.ovs_idl.command    self._nested_txn = None487 189236 ERROR ovsdbapp.backend.ovs_idl.command  File "/opt/pf9/pf9-neutron/lib/python2.7/site-packages/ovsdbapp/api.py", line 54, in __exit__487 189236 ERROR ovsdbapp.backend.ovs_idl.command    self.result = self.commit()487 189236 ERROR ovsdbapp.backend.ovs_idl.command  File "/opt/pf9/pf9-neutron/lib/python2.7/site-packages/ovsdbapp/backend/ovs_idl/transaction.py", line 62, in commit487 189236 ERROR ovsdbapp.backend.ovs_idl.command    raise result.ex487 189236 ERROR ovsdbapp.backend.ovs_idl.command RuntimeError: OVSDB Error: {"details":"writing transaction failed: /etc/openvswitch/conf.db: cannot truncate to length 489420","error":"I/O error","io-error":"Permission denied"}487 189236 ERROR ovsdbapp.backend.ovs_idl.command488 189236 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent [-] OVSDB Error: {"details":"writing transaction failed: /etc/openvswitch/conf.db: cannot truncate to length 489420","error":"I/O error","io-error":"Permission denied"} Agent terminated!: RuntimeError: OVSDB Error: {"details":"writing transaction failed: /etc/openvswitch/conf.db: cannot truncate to length 489420","error":"I/O error","io-error":"Permission denied"}Traceback (most recent call last):  File "/opt/pf9/pf9-neutron/lib/python2.7/site-packages/eventlet/queue.py", line 118, in switch    self.greenlet.switch(value)  File "/opt/pf9/pf9-neutron/lib/python2.7/site-packages/eventlet/greenthread.py", line 214, in main    result = function(*args, **kwargs)  File "/opt/pf9/pf9-neutron/lib/python2.7/site-packages/ryu/lib/hub.py", line 65, in _launch    raise eSystemExit: 1

Environment

  • Platform9 Managed OpenStack - v3.6.0 and Higher

  • Neutron

  • CentOS 7.x

Cause

Setting SELinux to Enforcing prevents neutron-ovs-agent from connecting to /etc/openvswitch/conf.db.

$ getenforceEnforcing

Resolution

  1. On the fly, set SELinux to Permissive.

# setenforce 0
  1. For the change to remain persistent across reboots, disable SELinux in /etc/sysconfig/selinux.

Last updated