Bug 1528297

Summary: Reinstalling host on 'ovirt-provider-ovn' cluster doesn't deploy OVN
Product: [oVirt] ovirt-engine Reporter: Mor <mkalfon>
Component: BLL.NetworkAssignee: Dominik Holler <dholler>
Status: CLOSED CURRENTRELEASE QA Contact: Meni Yakove <myakove>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.2.0.2CC: bugs, danken, lveyde, mkalfon, myakove, ylavi
Target Milestone: ovirt-4.2.1Flags: rule-engine: ovirt-4.2+
ylavi: exception+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.2.1.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-12 11:52:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Network RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
logs none

Description Mor 2017-12-21 13:38:50 UTC
Created attachment 1370869 [details]
logs

Description of problem:
Reinstalling existing host on OVN cluster (with external network provider 'ovirt-provider-ovn' set) doesn't trigger OVN driver deployment. Engine is sending extra variable 'host_deploy_ovn_central=null' when calling ansible-playbook on the host. This results in skipping ovirt-provider-ovn-driver deployment (which requires ovn_central to be set).

Version-Release number of selected component (if applicable):
ovirt-host-deploy-1.7.0-1.el7ev.noarch
ovirt-provider-ovn-1.2.2-1.el7ev.noarch
RHV 4.2.0.2-0.1.el7

How reproducible:
100%

Steps to Reproduce:
1. Add hosts to cluster with external network provider set to empty.
2. Change cluster external network provider to be 'ovirt-provider-ovn'.
3. Reinstall host.

Actual results:
Ansible playbook should run without skipping OVN driver deployment steps, since this is OVN cluster.

Expected results:
Ansible playbook is skipping driver deployment.

Additional info:
Workaround: 
Remove and add the host to the cluster.

engine.log:
2017-12-21 11:54:20,250+02 INFO  [org.ovirt.engine.core.common.utils.ansible.AnsibleExecutor] (EE-ManagedThreadFactory-engine-Thread-2520) [94d5dc3e-a8fc-4888-867e-b0ef18253826] Executing Ansible command:  
[/usr/bin/ansible-playbook, --private-key=/etc/pki/ovirt-engine/keys/engine_id_rsa, --inventory=/tmp/ansible-inventory5396567265985871677, --extra-vars=host_deploy_cluster_version=4.2, --extra-vars=host_dep
loy_gluster_enabled=false, --extra-vars=host_deploy_virt_enabled=true, --extra-vars=host_deploy_vdsm_port=54321, --extra-vars=host_deploy_override_firewall=true, --extra-vars=host_deploy_firewall_type=FIREW
ALLD, --extra-vars=ansible_port=22, --extra-vars=host_deploy_post_tasks=/etc/ovirt-engine/ansible/ovirt-host-deploy-post-tasks.yml, --extra-vars=host_deploy_ovn_tunneling_interface=10.35.128.26, --extra-var
s=host_deploy_ovn_central=null, /usr/share/ovirt-engine/playbooks/ovirt-host-deploy.yml] [Logfile: /var/log/ovirt-engine/host-deploy/ovirt-host-deploy-ansible-20171221115420-vega05.qa.lab.tlv.redhat.com-94d
5dc3e-a8fc-4888-867e-b0ef18253826.log]

ovirt-host-deploy log (note skipped tasks):
2017-12-21 11:54:23,171 p=3287 u=ovirt |  PLAY [all] *********************************************************************
2017-12-21 11:54:23,203 p=3287 u=ovirt |  TASK [Gathering Facts] *********************************************************
2017-12-21 11:54:25,437 p=3287 u=ovirt |  ok: [vega05.qa.lab.tlv.redhat.com]
2017-12-21 11:54:25,459 p=3287 u=ovirt |  TASK [ovirt-host-deploy-facts : Fetch info about VDSM] *************************
2017-12-21 11:54:26,375 p=3287 u=ovirt |  ok: [vega05.qa.lab.tlv.redhat.com]
2017-12-21 11:54:26,398 p=3287 u=ovirt |  TASK [ovirt-host-deploy-facts : Set facts] *************************************
2017-12-21 11:54:26,501 p=3287 u=ovirt |  ok: [vega05.qa.lab.tlv.redhat.com]
2017-12-21 11:54:26,525 p=3287 u=ovirt |  TASK [ovirt-provider-ovn-driver : Install ovirt-provider-ovn-driver] ***********
2017-12-21 11:54:26,579 p=3287 u=ovirt |  skipping: [vega05.qa.lab.tlv.redhat.com]
2017-12-21 11:54:26,602 p=3287 u=ovirt |  TASK [ovirt-provider-ovn-driver : Ensure ovn-controller is started] ************
2017-12-21 11:54:26,651 p=3287 u=ovirt |  skipping: [vega05.qa.lab.tlv.redhat.com]
2017-12-21 11:54:26,673 p=3287 u=ovirt |  TASK [ovirt-provider-ovn-driver : Ensure Open vSwitch is started] **************
2017-12-21 11:54:26,724 p=3287 u=ovirt |  skipping: [vega05.qa.lab.tlv.redhat.com]
2017-12-21 11:54:26,750 p=3287 u=ovirt |  TASK [ovirt-provider-ovn-driver : Configure OVN for oVirt] *********************
2017-12-21 11:54:26,801 p=3287 u=ovirt |  skipping: [vega05.qa.lab.tlv.redhat.com]
2017-12-21 11:54:26,830 p=3287 u=ovirt |  TASK [ovirt-host-deploy-libvirt-guests : Setup the configuration file] *********
2017-12-21 11:54:28,527 p=3287 u=ovirt |  ok: [vega05.qa.lab.tlv.redhat.com]
2017-12-21 11:54:28,551 p=3287 u=ovirt |  TASK [ovirt-host-deploy-libvirt-guests : Start libvirt-guests service and ensure its enabled] ***
2017-12-21 11:54:29,631 p=3287 u=ovirt |  changed: [vega05.qa.lab.tlv.redhat.com]
2017-12-21 11:54:29,654 p=3287 u=ovirt |  TASK [ovirt-host-deploy-firewalld : Check if VDSM version is supported for FirewallD] ***
2017-12-21 11:54:29,717 p=3287 u=ovirt |  skipping: [vega05.qa.lab.tlv.redhat.com]
...
...

Comment 1 Mor 2018-01-14 10:30:23 UTC
Verified on:
RHV 4.2.1.1-0.1.el7

Comment 2 Sandro Bonazzola 2018-02-12 11:52:11 UTC
This bugzilla is included in oVirt 4.2.1 release, published on Feb 12th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.1 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.