Description of problem: setup_ovn_controller.sh should start openvswitch and ovn-controller services before setting up the tunnel on host. In a scenario where ovn-controller is not already started the script throws an exception: ovs-vsctl: unix:/var/run/openvswitch/db.sock: database connection failed (No such file or directory) Traceback (most recent call last): File "/usr/bin/vdsm-tool", line 219, in main return tool_command[cmd]["command"](*args) File "/usr/lib/python2.7/site-packages/vdsm/tool/ovn_config.py", line 63, in ovn_config exec_ovn_config(cmd) File "/usr/lib/python2.7/site-packages/vdsm/tool/ovn_config.py", line 103, in exec_ovn_config raise EnvironmentError('Failed to configure OVN controller.') EnvironmentError: Failed to configure OVN controller. Version-Release number of selected component (if applicable): ovirt-provider-ovn-driver-1.1-2.20170905145914.gitaf4fe87.el7.centos.noarch How reproducible: 100% Steps to Reproduce: 1. Make sure openvswitch is not started on the host. 2. Run vdsm-tool ovn-config {provider_ip} {host_ip} to configure host for OVN tunnel participation. Actual results: Error. Expected results: Should start services if not running.
We may want to use `ovs-vsctl --no-wait` to allow configuring the services before starting them up.
We have this habit of starting services even if we never use them. Would be great to think of a way to avoid this.
*** Bug 1490938 has been marked as a duplicate of this bug. ***
Kaul, ovn-config is to be called by Ansible only for hosts that need OVN (in a cluster where an ovn network is defined, or where asked explicitly). Otherwise, the services are to be kept disabled.
Can you check if https://gerrit.ovirt.org/#/c/81689/1/driver/scripts/setup_ovn_controller.sh helps, Mor?
(In reply to Dan Kenigsberg from comment #5) > Can you check if > https://gerrit.ovirt.org/#/c/81689/1/driver/scripts/setup_ovn_controller.sh > helps, Mor? Yes. It finishes the execution without exception, but there is an error from ovs-vsctl when the services are not started. # vdsm-tool ovn-config 10.35.161.33 10.35.128.28 ovs-vsctl: unix:/var/run/openvswitch/db.sock: database connection failed (No such file or directory) ovs-vsctl: unix:/var/run/openvswitch/db.sock: database connection failed (No such file or directory) ovs-vsctl: unix:/var/run/openvswitch/db.sock: database connection failed (No such file or directory)
May I ask for another try? https://gerrit.ovirt.org/#/c/81689/2/driver/scripts/setup_ovn_controller.sh
(In reply to Dan Kenigsberg from comment #7) > May I ask for another try? > https://gerrit.ovirt.org/#/c/81689/2/driver/scripts/setup_ovn_controller.sh I responded in the patch review.
Verified on: ovirt-provider-ovn-driver-1.2-0.20170920070358.gitea7e0b8.el7.centos.noarch
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017. Since the problem described in this bug report should be resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report.