Bug 1608961 - tear down ovirt-provider-ovn when an host is removed from ovirt-engine
Summary: tear down ovirt-provider-ovn when an host is removed from ovirt-engine
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RFEs
Version: 4.2.5.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ovirt-4.2.6
: ---
Assignee: Miguel Duarte Barroso
QA Contact: Michael Burman
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-26 14:56 UTC by Miguel Duarte Barroso
Modified: 2018-09-03 15:07 UTC (History)
3 users (show)

Fixed In Version: ovirt-engine-4.2.6.1_SNAPSHOT-89.g295078e.0.scratch.master.el7ev.noarch.rpm
Clone Of:
Environment:
Last Closed: 2018-09-03 15:07:41 UTC
oVirt Team: Network
Embargoed:
rule-engine: ovirt-4.2?
rule-engine: planning_ack?
rule-engine: devel_ack+
mburman: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 93324 0 ovirt-engine-4.2 MERGED ansible: Enable the ovn-controller to be torn down 2018-08-01 12:31:49 UTC
oVirt gerrit 93325 0 ovirt-engine-4.2 MERGED ansible: trigger ovn tear down when an host is removed 2018-08-01 12:31:53 UTC

Description Miguel Duarte Barroso 2018-07-26 14:56:50 UTC
Description of problem:
When hosts that have the ovirt-provider-ovn-driver installed are removed from ovirt-engine, their ovn related configuration is left behind.

When an host having the ovirt-provider-ovn-driver installed is removed from engine, OVN should be unconfigured, and the tunnels connecting it to the other hosts torn down.

Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1. Set the host into maintenance mode
2. Remove the host from ovirt-engine


Actual results:
OVN configuration remains in the host that left the cluster. (ovs-vsctl get open . external-ids)
The tunnels connecting it to other ovn hosts are also left behind.


Expected results:
OVN should be unconfigured - e.g. ovs-vsctl get open . external-ids should *not* feature ovn-encap-ip, ovn-encap-type, ovn-remote.
The tunnels should be removed.
The OVN chassis should be removed from the sb table.

Additional info:

Comment 1 Dan Kenigsberg 2018-07-28 17:16:59 UTC
Miguel, the bug should be in POST until all of its patches are merged to the intended branch (4.2 in this case). It should move to ON_QA once a build is available for QE.

Comment 2 Michael Burman 2018-08-06 08:32:39 UTC
FailedQA on 4.2.6.1_SNAPSHOT-89.g295078e.0.scratch.master.el7ev

After host is removed from engine the ovn tunnel still exist

2018-08-06 11:28:53,233 p=23997 u=ovirt |  TASK [ovirt-provider-ovn-driver : Fetch ovirt-provider-ovn-driver version] *****
2018-08-06 11:28:54,722 p=23997 u=ovirt |  changed: [zeus-vds1.qa.lab.tlv.redhat.com] => {
    "changed": true, 
    "cmd": [
        "rpm", 
        "-q", 
        "ovirt-provider-ovn-driver", 
        "--qf", 
        "%{VERSION}"
    ], 
    "delta": "0:00:00.081250", 
    "end": "2018-08-06 11:28:55.085915", 
    "rc": 0, 
    "start": "2018-08-06 11:28:55.004665"
}

STDOUT:

1.2.13

2018-08-06 11:28:54,911 p=23997 u=ovirt |  TASK [ovirt-provider-ovn-driver : Unconfigure the OVN chassis] *****************
2018-08-06 11:28:54,997 p=23997 u=ovirt |  skipping: [zeus-vds1.qa.lab.tlv.redhat.com] => {
    "changed": false, 
    "skip_reason": "Conditional result was False"
}

Comment 3 Miguel Duarte Barroso 2018-08-06 12:04:33 UTC
The updated ansible role requires ovirt-provider-ovn-driver's version to be 1.2.14 for the ovs tunnel to be removed and for the ovn related information to be removed.

As seen in the comment#2, the current version is 1.2.13. 

The required driver version is only available for 4.2.6, not 4.2.

Comment 4 Michael Burman 2018-08-07 07:23:15 UTC
(In reply to Miguel Duarte Barroso from comment #3)
> The updated ansible role requires ovirt-provider-ovn-driver's version to be
> 1.2.14 for the ovs tunnel to be removed and for the ovn related information
> to be removed.
> 
> As seen in the comment#2, the current version is 1.2.13. 
> 
> The required driver version is only available for 4.2.6, not 4.2.

Hi Miguel,

So i tested again on 4.2.6.1_SNAPSHOT-89.g295078e.0.scratch.master.el7ev with ovirt-provider-ovn-1.2.14-1.el7ev.noarch

STDOUT:

1.2.13

2018-08-07 10:13:49,810 p=13429 u=ovirt |  TASK [ovirt-provider-ovn-driver : Unconfigure the OVN chassis] *****************
2018-08-07 10:13:49,895 p=13429 u=ovirt |  skipping: [zeus-vds1.qa.lab.tlv.redhat.com] => {
    "changed": false, 
    "skip_reason": "Conditional result was False"
}

This task is still skipped and ovn tunnels remain on the hos after removed from RHV. failingQA 

I have no idea why the STDOUT is 1.2.13, but i'm running ovirt-provider-ovn-1.2.14-1.el7ev.noarch

Comment 5 Miguel Duarte Barroso 2018-08-07 08:32:26 UTC
There are 2 RPMs: ovirt-provider-ovn, *and* ovirt-provider-ovn-driver.

The ansible task checks the driver  - e.g. ovirt-provider-ovn-driver - version which, on your system, is at version 1.2.13.

Comment 6 Michael Burman 2018-08-07 09:04:28 UTC
Ok, so now this is more clear, both ovirt-provider-ovn-driver and ovirt-provider-ovn should be 1.2.14

Verified on -  4.2.6.1_SNAPSHOT-89.g295078e.0.scratch.master.el7ev and
ovirt-provider-ovn-1.2.14-1.el7ev.noarch 
ovirt-provider-ovn-driver-1.2.14-1.el7ev.noarch
vdsm-4.20.36-1.el7ev.x86_64

2018-08-07 12:01:05,664 p=20788 u=ovirt |  TASK [ovirt-provider-ovn-driver : Unconfigure the OVN chassis] *****************
2018-08-07 12:01:07,841 p=20788 u=ovirt |  changed: [zeus-vds1.qa.lab.tlv.redhat.com] => {
    "changed": true, 
    "cmd": [
        "vdsm-tool", 
        "ovn-unconfigure"
    ], 
    "delta": "0:00:01.113893", 
    "end": "2018-08-07 12:01:07.725614", 
    "rc": 0, 
    "start": "2018-08-07 12:01:06.611721"
}


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