NSXv3: Update port binding:host_id doesn't take effect

Bug #1518474 reported by Tong Liu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
vmware-nsx
New
Undecided
Unassigned

Bug Description

In stable/liberty, update port's binding:host_id doesn't report any error, but this field is none when you do port-show.

e.g.
stack@htb-1n-eng-dhcp8:~/devstack$ neutron port-update test-port --binding:host_id=htb-1n-eng-dhcp8
Updated port: test-port
stack@htb-1n-eng-dhcp8:~/devstack$ neutron port-show test-port
+-----------------------+---------------------------------------------------------------------------------+
| Field | Value |
+-----------------------+---------------------------------------------------------------------------------+
| admin_state_up | True |
| allowed_address_pairs | |
| binding:host_id | |
| binding:vif_details | {"port_filter": true} |
| binding:vif_type | ovs |
| binding:vnic_type | normal |
| device_id | |
| device_owner | |
| extra_dhcp_opts | |
| fixed_ips | {"subnet_id": "3136bd29-c5db-44bd-8c18-8bd666203100", "ip_address": "10.0.0.9"} |
| id | 476bc3fd-0931-4d74-9cb8-5d75845d89b0 |
| mac_address | fa:16:3e:4e:ca:62 |
| name | test-port |
| network_id | ef700972-8c15-4df2-b13f-c13d205fef7b |
| port_security_enabled | True |
| security_groups | c1605f4b-2b61-413d-bf0c-4ae1879ef9c0 |
| status | ACTIVE |
| tenant_id | eb2c34a57e5a463c940715bf0148f3b6 |
+-----------------------+---------------------------------------------------------------------------------+

tempest port extended attributes also failed.
ft23.2: tempest.api.network.test_ports.PortsAdminExtendedAttrsIpV6TestJSON.test_list_ports_binding_ext_attr[id-1c82a44a-6c6e-48ff-89e1-abe7eaf8f9f8]_StringException: Empty attachments:
  stderr
  stdout

pythonlogging:'': {{{
2015-11-20 19:56:20,090 3832 INFO [tempest_lib.common.rest_client] Request (PortsAdminExtendedAttrsIpV6TestJSON:test_list_ports_binding_ext_attr): 201 POST http://10.160.87.215:9696/v2.0/ports 0.151s
2015-11-20 19:56:20,091 3832 DEBUG [tempest_lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
        Body: {"port": {"network_id": "f8c0b126-2185-4dcd-b878-1d1b927b1d34"}}
    Response - Headers: {'status': '201', 'content-length': '542', 'connection': 'close', 'date': 'Fri, 20 Nov 2015 19:56:20 GMT', 'content-type': 'application/json; charset=UTF-8', 'x-openstack-request-id': 'req-03fc140e-f390-427a-ac01-1f70a4271212'}
        Body: {"port": {"status": "ACTIVE", "binding:host_id": null, "name": "", "allowed_address_pairs": [], "admin_state_up": true, "network_id": "f8c0b126-2185-4dcd-b878-1d1b927b1d34", "tenant_id": "d214306271f8454ea82391eb4195b286", "extra_dhcp_opts": null, "binding:vif_details": {"port_filter": true}, "binding:vif_type": "ovs", "device_owner": "", "mac_address": "fa:16:3e:c3:72:a0", "port_security_enabled": true, "binding:vnic_type": "normal", "fixed_ips": [], "id": "b74c6325-6140-4c7d-a337-4fca98a6a04f", "security_groups": [], "device_id": ""}}
2015-11-20 19:56:20,249 3832 INFO [tempest_lib.common.rest_client] Request (PortsAdminExtendedAttrsIpV6TestJSON:test_list_ports_binding_ext_attr): 200 PUT http://10.160.87.215:9696/v2.0/ports/b74c6325-6140-4c7d-a337-4fca98a6a04f 0.158s
2015-11-20 19:56:20,250 3832 DEBUG [tempest_lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
        Body: {"port": {"binding:host_id": "htb-1n-eng-dhcp8"}}
    Response - Headers: {'status': '200', 'content-length': '554', 'connection': 'close', 'date': 'Fri, 20 Nov 2015 19:56:20 GMT', 'content-type': 'application/json; charset=UTF-8', 'x-openstack-request-id': 'req-2a36c5ce-5101-4610-98df-323df2c6a8a7'}
        Body: {"port": {"status": "ACTIVE", "binding:host_id": "htb-1n-eng-dhcp8", "name": "", "allowed_address_pairs": [], "admin_state_up": true, "network_id": "f8c0b126-2185-4dcd-b878-1d1b927b1d34", "tenant_id": "d214306271f8454ea82391eb4195b286", "extra_dhcp_opts": [], "binding:vif_details": {"port_filter": true}, "binding:vif_type": "ovs", "device_owner": "", "mac_address": "fa:16:3e:c3:72:a0", "port_security_enabled": true, "binding:vnic_type": "normal", "fixed_ips": [], "id": "b74c6325-6140-4c7d-a337-4fca98a6a04f", "security_groups": [], "device_id": ""}}
2015-11-20 19:56:20,402 3832 INFO [tempest_lib.common.rest_client] Request (PortsAdminExtendedAttrsIpV6TestJSON:test_list_ports_binding_ext_attr): 200 GET http://10.160.87.215:9696/v2.0/ports 0.151s
2015-11-20 19:56:20,403 3832 DEBUG [tempest_lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
        Body: None
    Response - Headers: {'status': '200', 'content-length': '3281', 'content-location': 'http://10.160.87.215:9696/v2.0/ports', 'connection': 'close', 'date': 'Fri, 20 Nov 2015 19:56:20 GMT', 'content-type': 'application/json; charset=UTF-8', 'x-openstack-request-id': 'req-c67cfe9c-a51f-49da-94ba-adb152f3f6f2'}
        Body: {"ports": [{"status": "ACTIVE", "binding:host_id": null, "name": "", "allowed_address_pairs": [], "admin_state_up": true, "network_id": "28fe9c70-5d36-4094-8fbf-2c3533e4717f", "tenant_id": "eda203538e7042c7ae5e6e50b9d3fdd1", "extra_dhcp_opts": [], "binding:vif_details": {"port_filter": true}, "binding:vif_type": "ovs", "device_owner": "network:router_interface", "mac_address": "fa:16:3e:ac:54:aa", "port_security_enabled": false, "binding:vnic_type": "normal", "fixed_ips": [{"subnet_id": "b1193c03-470b-4be9-a2a2-6845db33f69c", "ip_address": "10.0.0.1"}], "id": "2fc27b80-b601-4f0e-8cf3-505e06fd180a", "security_groups": [], "device_id": "10e26622-dcc4-4c36-b6ee-4443b47410cf"}, {"status": "ACTIVE", "binding:host_id": null, "name": "", "allowed_address_pairs": [], "admin_state_up": true, "network_id": "133af45c-8e7c-4643-8cd3-83952653ad0c", "tenant_id": "", "extra_dhcp_opts": [], "binding:vif_details": {"port_filter": true}, "binding:vif_type": "ovs", "device_owner": "network:router_gateway", "mac_address": "fa:16:3e:fd:bc:53", "port_security_enabled": false, "binding:vnic_type": "normal", "fixed_ips": [{"subnet_id": "c0e2a95a-a9e5-45c0-afe4-3cd2f3cfa18c", "ip_address": "172.24.4.2"}], "id": "a7bbd19d-cd5e-44f3-b8bd-e124c32921b4", "security_groups": [], "device_id": "10e26622-dcc4-4c36-b6ee-4443b47410cf"}, {"status": "ACTIVE", "binding:host_id": "htb-1n-eng-dhcp8", "name": "", "allowed_address_pairs": [], "admin_state_up": true, "network_id": "28fe9c70-5d36-4094-8fbf-2c3533e4717f", "tenant_id": "eda203538e7042c7ae5e6e50b9d3fdd1", "extra_dhcp_opts": [], "binding:vif_details": {"port_filter": true}, "binding:vif_type": "ovs", "device_owner": "compute:None", "mac_address": "fa:16:3e:b6:6f:ad", "port_security_enabled": true, "binding:vnic_type": "normal", "fixed_ips": [{"subnet_id": "b1193c03-470b-4be9-a2a2-6845db33f69c", "ip_address": "10.0.0.3"}], "id": "ae97ce7c-53f9-47d6-a78a-0147e30d03ca", "security_groups": ["ade8b892-c8d1-4c65-a9cb-8d837c863d66"], "device_id": "dd3eb053-9a72-4a12-a24c-484fd3bdfc7a"}, {"status": "ACTIVE", "binding:host_id": null, "name": "", "allowed_address_pairs": [], "admin_state_up": true, "network_id": "f8c0b126-2185-4dcd-b878-1d1b927b1d34", "tenant_id": "d214306271f8454ea82391eb4195b286", "extra_dhcp_opts": [], "binding:vif_details": {"port_filter": true}, "binding:vif_type": "ovs", "device_owner": "", "mac_address": "fa:16:3e:c3:72:a0", "port_security_enabled": true, "binding:vnic_type": "normal", "fixed_ips": [], "id": "b74c6325-6140-4c7d-a337-4fca98a6a04f", "security_groups": [], "device_id": ""}, {"status": "ACTIVE", "binding:host_id": "htb-1n-eng-dhcp8", "name": "", "allowed_address_pairs": [], "admin_state_up": true, "network_id": "28fe9c70-5d36-4094-8fbf-2c3533e4717f", "tenant_id": "eda203538e7042c7ae5e6e50b9d3fdd1", "extra_dhcp_opts": [], "binding:vif_details": {"port_filter": true}, "binding:vif_type": "ovs", "device_owner": "network:dhcp", "mac_address": "fa:16:3e:ba:44:60", "port_security_enabled": false, "binding:vnic_type": "normal", "fixed_ips": [{"subnet_id": "b1193c03-470b-4be9-a2a2-6845db33f69c", "ip_address": "10.0.0.2"}], "id": "f67ad887-6da2-4bf9-b662-ce14fb685ccd", "security_groups": [], "device_id": "dhcp2aaecfca-2dd6-50a2-91e9-960d9acba80e-28fe9c70-5d36-4094-8fbf-2c3533e4717f"}]}
2015-11-20 19:56:20,631 3832 INFO [tempest_lib.common.rest_client] Request (PortsAdminExtendedAttrsIpV6TestJSON:_run_cleanups): 204 DELETE http://10.160.87.215:9696/v2.0/ports/b74c6325-6140-4c7d-a337-4fca98a6a04f 0.227s
2015-11-20 19:56:20,632 3832 DEBUG [tempest_lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
        Body: None
    Response - Headers: {'date': 'Fri, 20 Nov 2015 19:56:20 GMT', 'status': '204', 'connection': 'close', 'content-length': '0', 'x-openstack-request-id': 'req-d7995910-8bd6-4a2b-aa13-b70122613e03'}
        Body:
}}}

Traceback (most recent call last):
  File "tempest/api/network/test_ports.py", line 397, in test_list_ports_binding_ext_attr
    self.assertEqual(self.host_id, listed_port[0]['binding:host_id'])
  File "/opt/stack/tempest/.venv/local/lib/python2.7/site-packages/testtools/testcase.py", line 350, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/opt/stack/tempest/.venv/local/lib/python2.7/site-packages/testtools/testcase.py", line 435, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: 'htb-1n-eng-dhcp8' != None

Tong Liu (liutong)
summary: - Update port binding:host_id doesn't take effect
+ NSXv3: Update port binding:host_id doesn't take effect
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.