Bug 1549030 - Update neutron binding after VM migration with info from caps
Summary: Update neutron binding after VM migration with info from caps
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Network
Version: 4.3.0
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: ovirt-4.2.4
: ---
Assignee: Marcin Mirecki
QA Contact: Meni Yakove
URL:
Whiteboard:
Depends On: 1532674 1554268
Blocks: 1549033
TreeView+ depends on / blocked
 
Reported: 2018-02-26 09:38 UTC by Marcin Mirecki
Modified: 2018-06-26 08:40 UTC (History)
7 users (show)

Fixed In Version: ovirt-engine-4.2.4
Clone Of: 1532674
: 1554268 (view as bug list)
Environment:
Last Closed: 2018-06-26 08:40:50 UTC
oVirt Team: Network
Embargoed:
rule-engine: ovirt-4.2+
ylavi: exception+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 86319 0 None None None 2018-02-26 09:38:50 UTC
oVirt gerrit 87780 0 None None None 2018-02-26 09:38:50 UTC
oVirt gerrit 88399 0 master MERGED engine: Update neutron binding with info from caps 2018-04-05 08:05:52 UTC
oVirt gerrit 88414 0 master MERGED dbscripts: Add provider_binding_host_id table and get/update functions 2018-03-20 08:47:45 UTC
oVirt gerrit 88415 0 master MERGED engine: Add DAO for HostProviderBinding 2018-03-26 09:24:17 UTC
oVirt gerrit 88416 0 master MERGED engine: Update binding:host-id during external port create/update 2018-04-15 11:42:28 UTC
oVirt gerrit 88684 0 master ABANDONED engine: add HostProviderBindingDao to DbFacade 2018-03-23 13:43:33 UTC
oVirt gerrit 88685 0 master MERGED engine: Adding HostProviderBindingDaoImplTest 2018-04-05 08:05:36 UTC
oVirt gerrit 90296 0 ovirt-engine-4.2 MERGED dbscripts: Add provider_binding_host_id table and get/update functions 2018-05-09 08:43:06 UTC
oVirt gerrit 90297 0 ovirt-engine-4.2 MERGED engine: Add DAO for HostProviderBinding 2018-05-09 08:43:12 UTC
oVirt gerrit 90298 0 ovirt-engine-4.2 MERGED engine: Adding HostProviderBindingDaoImplTest 2018-05-09 08:43:18 UTC
oVirt gerrit 90299 0 ovirt-engine-4.2 MERGED engine: Update neutron binding with info from caps 2018-05-09 08:43:24 UTC
oVirt gerrit 90300 0 ovirt-engine-4.2 MERGED engine: Update binding:host-id during external port create/update 2018-05-09 08:43:30 UTC
oVirt gerrit 90969 0 master MERGED dbscripts: Lock provider_binding_host_id records before update 2018-05-10 06:33:38 UTC
oVirt gerrit 91121 0 ovirt-engine-4.2 MERGED dbscripts: Lock provider_binding_host_id records before update 2018-05-14 08:32:20 UTC

Description Marcin Mirecki 2018-02-26 09:38:51 UTC
This is a follow up change to: 
    https://bugzilla.redhat.com/1532674

Engine should use the information received in caps:
  https://gerrit.ovirt.org/#/c/87329/
  https://gerrit.ovirt.org/#/c/87369/

as the value to update binding_host_id



+++ This bug was initially created as a clone of Bug #1532674 +++

Description of problem:
Engine should update neutron that binding host has been changed after VM migration with neutron network.

During the testing done to certify the ospd12 with RHV, i have found that when migratin a VM that has a neutron network, engine doesn't update neutron that the binding host has been changed and the port's state reported as DOWN in neutron.
Engine should do what nova doing and update neutron after VM migration with the new binding host.
Note, that although this bug, the VM remain operational and i can ping it and from it. 

Version-Release number of selected component (if applicable):
openstack-neutron-11.0.1-7.el7ost.noarch
Red Hat OpenStack Platform release 12.0 Beta (Pike)
rhv-4.2.1-0.2.el7
vdsm-4.20.11-1.el7ev

How reproducible:
100%

Steps to Reproduce:
1. Add ospd12 to RHV 4.2 - See BZ 1518370 for the flow
2. Add 2 rhv nodes with neutron roles and neutron agents configured and Create 2 VMs
3. After the setup is up and you have neutron networks in RHV, start VM1 on node1 with neutron network and check the port's state. Ping the VM2(on same node)
4. Migrate VM to node2 and ping VM2  

Actual results:

3. Port is ACTIVE and ping is ok - 

Port state before migration:
(overcloud) [root@overcloud-controller-0 ~]# openstack port show f4f2a451-45c2-4204-b6f6-682b19cc1894
+-----------------------+--------------------------------------------------------------------------+
| Field                 | Value                                                                    |
+-----------------------+--------------------------------------------------------------------------+
| admin_state_up        | UP                                                                       |
| allowed_address_pairs |                                                                          |
| binding_host_id       | overcloud-rhv-1.localdomain                                              |
| binding_profile       |                                                                          |
| binding_vif_details   | datapath_type='system', ovs_hybrid_plug='True', port_filter='True'       |
| binding_vif_type      | ovs                                                                      |
| binding_vnic_type     | normal                                                                   |
| created_at            | 2018-01-08T14:43:41Z                                                     |
| data_plane_status     | None                                                                     |
| description           |                                                                          |
| device_id             | ab7d9b77-3f4b-4edd-b43d-5a3fa63578ef                                     |
| device_owner          | oVirt                                                                    |
| dns_assignment        | None                                                                     |
| dns_name              | None                                                                     |
| extra_dhcp_opts       |                                                                          |
| fixed_ips             | ip_address='12.0.0.14', subnet_id='b854cabd-4682-4d4e-8f09-e34b8b3200bf' |
| id                    | f4f2a451-45c2-4204-b6f6-682b19cc1894                                     |
| ip_address            | None                                                                     |
| mac_address           | 00:00:00:00:00:21                                                        |
| name                  | nic1                                                                     |
| network_id            | 1194373f-6e53-474e-96bf-581ea5c1617f                                     |
| option_name           | None                                                                     |
| option_value          | None                                                                     |
| port_security_enabled | True                                                                     |
| project_id            | 0446aa0ba1dd4df289c2590ec8a1a382                                         |
| qos_policy_id         | None                                                                     |
| revision_number       | 23                                                                       |
| security_group_ids    | a352570d-f77f-4bb7-95f3-81d6d77e6c6c                                     |
| status                | ACTIVE                                                                   |
| subnet_id             | None                                                                     |
| tags                  |                                                                          |
| trunk_details         | None                                                                     |
| updated_at            | 2018-01-09T13:56:26Z                                                     |
+-----------------------+--------------------------------------------------------------------------+

4. Port state is DOWN, the binding host wasn't changed, but ping still ok-

Port state after migration:

(overcloud) [root@overcloud-controller-0 ~]# openstack port show f4f2a451-45c2-4204-b6f6-682b19cc1894
+-----------------------+--------------------------------------------------------------------------+
| Field                 | Value                                                                    |
+-----------------------+--------------------------------------------------------------------------+
| admin_state_up        | UP                                                                       |
| allowed_address_pairs |                                                                          |
| binding_host_id       | overcloud-rhv-1.localdomain                                              |
| binding_profile       |                                                                          |
| binding_vif_details   | datapath_type='system', ovs_hybrid_plug='True', port_filter='True'       |
| binding_vif_type      | ovs                                                                      |
| binding_vnic_type     | normal                                                                   |
| created_at            | 2018-01-08T14:43:41Z                                                     |
| data_plane_status     | None                                                                     |
| description           |                                                                          |
| device_id             | ab7d9b77-3f4b-4edd-b43d-5a3fa63578ef                                     |
| device_owner          | oVirt                                                                    |
| dns_assignment        | None                                                                     |
| dns_name              | None                                                                     |
| extra_dhcp_opts       |                                                                          |
| fixed_ips             | ip_address='12.0.0.14', subnet_id='b854cabd-4682-4d4e-8f09-e34b8b3200bf' |
| id                    | f4f2a451-45c2-4204-b6f6-682b19cc1894                                     |
| ip_address            | None                                                                     |
| mac_address           | 00:00:00:00:00:21                                                        |
| name                  | nic1                                                                     |
| network_id            | 1194373f-6e53-474e-96bf-581ea5c1617f                                     |
| option_name           | None                                                                     |
| option_value          | None                                                                     |
| port_security_enabled | True                                                                     |
| project_id            | 0446aa0ba1dd4df289c2590ec8a1a382                                         |
| qos_policy_id         | None                                                                     |
| revision_number       | 24                                                                       |
| security_group_ids    | a352570d-f77f-4bb7-95f3-81d6d77e6c6c                                     |
| status                | DOWN                                                                     |
| subnet_id             | None                                                                     |
| tags                  |                                                                          |
| trunk_details         | None                                                                     |
| updated_at            | 2018-01-09T14:36:28Z                                                     |
+-----------------------+--------------------------------------------------------------------------+

Expected results:
Engine should update neutron after VM migrate that the binding host is changed to new host.

Additional info:
See also - https://bugzilla.redhat.com/show_bug.cgi?id=1518370

--- Additional comment from Michael Burman on 2018-01-09 10:02 EST ---

Comment 1 Michael Burman 2018-06-19 12:25:47 UTC
Verified on - 4.2.4.4-0.1.el7_3

Migrate to Host1 - 

 "openstack_binding_host_ids": {
        "OVIRT_PROVIDER_OVN": "8ff4eafe-3708-40c8-b909-d007101b1b6f"


2018-06-19 15:08:40,092 root From: 10.35.163.149:40760 Request: PUT /v2.0/ports/0e53f047-2968-404d-b376-5144f22cab93
2018-06-19 15:08:40,093 root Request body:
{
  "port" : {
    "binding:host_id" : "8ff4eafe-3708-40c8-b909-d007101b1b6f",
    "mac_address" : "00:00:00:00:00:54"
  }
}

Migrate to Host2 - 

"openstack_binding_host_ids": {
        "OVIRT_PROVIDER_OVN": "cede6319-3545-4d70-936c-921d8c1ede8d"


2018-06-19 15:11:05,891 root From: 10.35.163.149:40840 Request: PUT /v2.0/ports/0e53f047-2968-404d-b376-5144f22cab93
2018-06-19 15:11:05,891 root Request body:
{
  "port" : {
    "binding:host_id" : "cede6319-3545-4d70-936c-921d8c1ede8d",
    "mac_address" : "00:00:00:00:00:54"
  }
}

Migrate to Host3 -

"openstack_binding_host_ids": {
        "OVIRT_PROVIDER_OVN": "5d1b68be-08fc-4e82-94b1-6a53122b9e7c"

2018-06-19 15:23:31,671 root From: 10.35.163.149:41162 Request: PUT /v2.0/ports/0e53f047-2968-404d-b376-5144f22cab93
2018-06-19 15:23:31,671 root Request body:
{
  "port" : {
    "binding:host_id" : "5d1b68be-08fc-4e82-94b1-6a53122b9e7c",
    "mac_address" : "00:00:00:00:00:54"
  }
}


Migrate back to Host1 - 

2018-06-19 15:24:54,023 root From: 10.35.163.149:41204 Request: PUT /v2.0/ports/0e53f047-2968-404d-b376-5144f22cab93
2018-06-19 15:24:54,024 root Request body:
{
  "port" : {
    "binding:host_id" : "8ff4eafe-3708-40c8-b909-d007101b1b6f",
    "mac_address" : "00:00:00:00:00:54"
  }
}

Comment 2 Sandro Bonazzola 2018-06-26 08:40:50 UTC
This bugzilla is included in oVirt 4.2.4 release, published on June 26th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.4 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.


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