Bug 1491546 - vdsm-tool does not start required services before configuring the host
Summary: vdsm-tool does not start required services before configuring the host
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-provider-ovn
Classification: oVirt
Component: driver
Version: 1.0.4
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ovirt-4.1.8
: ---
Assignee: Marcin Mirecki
QA Contact: Mor
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-14 06:42 UTC by Mor
Modified: 2017-12-11 16:29 UTC (History)
6 users (show)

Fixed In Version: 1.0.9
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of: 1490104
Environment:
Last Closed: 2017-12-11 16:29:14 UTC
oVirt Team: Network
Embargoed:
rule-engine: ovirt-4.1+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 81689 0 None None None 2017-09-14 06:42:01 UTC
oVirt gerrit 82157 0 ovirt-4.1 MERGED ovn-config: configure ovn before services are up 2017-09-28 10:32:10 UTC

Description Mor 2017-09-14 06:42:02 UTC
+++ 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.

Comment 1 Dan Kenigsberg 2017-09-25 10:12:26 UTC
Mor, would you be kind to test https://gerrit.ovirt.org/#/c/82157/ ? I have not do so.

Comment 2 Mor 2017-09-25 11:25:59 UTC
(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.

Comment 3 Dan Kenigsberg 2017-09-25 12:53:58 UTC
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.

Comment 4 Lev Veyde 2017-11-26 19:33:28 UTC
Was added in oVirt 4.1.8 RC3.

Comment 5 Mor 2017-11-27 08:00:31 UTC
# 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

Comment 6 Mor 2017-11-27 08:23:16 UTC
OVN package:
ovirt-provider-ovn-driver-1.0-9.el7ev.noarch


Note You need to log in before you can comment on or make changes to this bug.