Bug 1490104 - 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.2.0
: ---
Assignee: Marcin Mirecki
QA Contact: Mor
URL:
Whiteboard:
: 1490938 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-10 10:50 UTC by Mor
Modified: 2017-12-20 11:01 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
: 1491546 (view as bug list)
Environment:
Last Closed: 2017-12-20 11:01:40 UTC
oVirt Team: Network
Embargoed:
rule-engine: ovirt-4.2+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 81689 0 master POST ovn-config: configure ovn before services are up 2017-09-13 10:37:11 UTC

Description Mor 2017-09-10 10:50:53 UTC
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.

Comment 1 Dan Kenigsberg 2017-09-10 11:18:14 UTC
We may want to use `ovs-vsctl --no-wait` to allow configuring the services before starting them up.

Comment 2 Yaniv Kaul 2017-09-11 06:07:12 UTC
We have this habit of starting services even if we never use them. Would be great to think of a way to avoid this.

Comment 3 Dan Kenigsberg 2017-09-13 08:39:27 UTC
*** Bug 1490938 has been marked as a duplicate of this bug. ***

Comment 4 Dan Kenigsberg 2017-09-13 10:33:10 UTC
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.

Comment 5 Dan Kenigsberg 2017-09-13 10:42:26 UTC
Can you check if https://gerrit.ovirt.org/#/c/81689/1/driver/scripts/setup_ovn_controller.sh helps, Mor?

Comment 6 Mor 2017-09-13 10:52:39 UTC
(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)

Comment 7 Dan Kenigsberg 2017-09-13 16:43:26 UTC
May I ask for another try?
https://gerrit.ovirt.org/#/c/81689/2/driver/scripts/setup_ovn_controller.sh

Comment 8 Mor 2017-09-14 10:32:58 UTC
(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.

Comment 9 Mor 2017-09-24 08:10:27 UTC
Verified on:
ovirt-provider-ovn-driver-1.2-0.20170920070358.gitea7e0b8.el7.centos.noarch

Comment 10 Sandro Bonazzola 2017-12-20 11:01:40 UTC
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.


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