+++ This bug was initially created as a clone of Bug #1490104 +++ 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.0-8.el7ev.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.
Mor, would you be kind to test https://gerrit.ovirt.org/#/c/82157/ ? I have not do so.
(In reply to Dan Kenigsberg from comment #1) > Mor, would you be kind to test https://gerrit.ovirt.org/#/c/82157/ ? I have > not do so. Dan, I don't have oVirt 4.1 environment to test on, only RHV 4.1, is it okay? BTW: the story on 4.1 is a bit different, we require openvswitch IN vdsm package: openvswitch >= 2.0.0 for package: vdsm-4.19.31-1.el7ev.x86_64, vdsm takes care of starting openvswitch service.
RHV-4.1 is great for verification. I do not recall a difference between ovs startup in 4.2 and 4.1, but it should not matter for your verification.
Was added in oVirt 4.1.8 RC3.
# systemctl status openvswitch ● openvswitch.service - Open vSwitch Loaded: loaded (/usr/lib/systemd/system/openvswitch.service; disabled; vendor preset: disabled) Active: inactive (dead) since Mon 2017-11-27 09:56:45 IST; 1min 3s ago Main PID: 16201 (code=exited, status=0/SUCCESS) Nov 12 09:50:50 vega07.qa.lab.tlv.redhat.com systemd[1]: Starting Open vSwitch... Nov 12 09:50:50 vega07.qa.lab.tlv.redhat.com systemd[1]: Started Open vSwitch. Nov 27 09:56:45 vega07.qa.lab.tlv.redhat.com systemd[1]: Stopping Open vSwitch... Nov 27 09:56:45 vega07.qa.lab.tlv.redhat.com systemd[1]: Stopped Open vSwitch. # vdsm-tool ovn-config <ip1> <ip2> # systemctl status openvswitch ● openvswitch.service - Open vSwitch Loaded: loaded (/usr/lib/systemd/system/openvswitch.service; disabled; vendor preset: disabled) Active: active (exited) since Mon 2017-11-27 09:57:52 IST; 1s ago Process: 776 ExecStart=/bin/true (code=exited, status=0/SUCCESS) Main PID: 776 (code=exited, status=0/SUCCESS) CGroup: /system.slice/openvswitch.service Nov 27 09:57:52 vega07.qa.lab.tlv.redhat.com systemd[1]: Starting Open vSwitch... Nov 27 09:57:52 vega07.qa.lab.tlv.redhat.com systemd[1]: Started Open vSwitch. Verified on: Red Hat Virtualization Manager Version: 4.1.8-0.1.el7
OVN package: ovirt-provider-ovn-driver-1.0-9.el7ev.noarch