tempest: Openstack-floating-ip associattion to a port which is created in different project failed

Bug #1807447 reported by shajuvk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R5.0
New
Medium
Shivayogi Ugaji
Trunk
New
Medium
Shivayogi Ugaji

Bug Description

Test case:
=======
[stack@undercloud tempest]$ sudo ostestr --pdb neutron_tempest_plugin.api.admin.test_floating_ips_admin_actions.FloatingIPAdminTestJSON.test_associate_floating_ip_with_port_from_another_project

==============================
(overcloud) [stack@undercloud ~]$ neutron floatingip-associate bc20a4e5-eb66-4583-9a69-de674147a915 33d6b8aa-6339-44f4-9bba-e6281ce1fc7f
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
Bad floatingip request: port can't be associated with this fip as they both belong to different tenants.
Neutron server returns request_ids: ['req-294c6161-53ce-4d9a-ace7-6c97d1722598']
(overcloud) [stack@undercloud ~]$

(overcloud) [stack@undercloud ~]$ openstack port show 33d6b8aa-6339-44f4-9bba-e6281ce1fc7f
+-----------------------+---------------------------------------------------------------------------+
| Field | Value |
+-----------------------+---------------------------------------------------------------------------+
| admin_state_up | UP |
| allowed_address_pairs | |
| binding_host_id | None |
| binding_profile | None |
| binding_vif_details | port_filter='True' |
| binding_vif_type | vrouter |
| binding_vnic_type | normal |
| created_at | None |
| data_plane_status | None |
| description | |
| device_id | |
| device_owner | |
| dns_assignment | None |
| dns_name | None |
| extra_dhcp_opts | None |
| fixed_ips | ip_address='10.100.0.4', subnet_id='031bb45c-ccba-4bea-8ddd-ec9cfa65b4ba' |
| id | 33d6b8aa-6339-44f4-9bba-e6281ce1fc7f |
| ip_address | None |
| mac_address | 02:33:d6:b8:aa:63 |
| name | 33d6b8aa-6339-44f4-9bba-e6281ce1fc7f |
| network_id | bccd13b2-dc57-44e6-a914-ecac79bcc528 |
| option_name | None |
| option_value | None |
| port_security_enabled | True |
| project_id | f663f2ebb1224478b2ca2ed40ac44424 |
| qos_policy_id | None |
| revision_number | None |
| security_group_ids | bd3da12c-efa7-48f3-82bd-fd87f0804394 |
| status | DOWN |
| subnet_id | None |
| tags | |
| trunk_details | None |
| updated_at | None |
+-----------------------+---------------------------------------------------------------------------+

(overcloud) [stack@undercloud ~]$ openstack floating ip show bc20a4e5-eb66-4583-9a69-de674147a915
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| created_at | None |
| description | |
| fixed_ip_address | None |
| floating_ip_address | 192.168.24.115 |
| floating_network_id | d3ad9805-7a06-4222-9dba-3649a2343ebc |
| id | bc20a4e5-eb66-4583-9a69-de674147a915 |
| name | 192.168.24.115 |
| port_id | None |
| project_id | 0f14ee5bf3ea4456897eb1c62d658d6f |
| qos_policy_id | None |
| revision_number | None |
| router_id | None |
| status | DOWN |
| subnet_id | None |
| updated_at | None |
+---------------------+--------------------------------------+
(overcloud) [stack@undercloud ~]$

(overcloud) [stack@undercloud ~]$ openstack network show d3ad9805-7a06-4222-9dba-3649a2343ebc
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | UP |
| availability_zone_hints | None |
| availability_zones | None |
| created_at | None |
| description | |
| dns_domain | None |
| id | d3ad9805-7a06-4222-9dba-3649a2343ebc |
| ipv4_address_scope | None |
| ipv6_address_scope | None |
| is_default | None |
| is_vlan_transparent | None |
| mtu | None |
| name | public |
| port_security_enabled | True |
| project_id | 54c718a9c0dd4aebb43e014b9dfa1550 |
| provider:network_type | None |
| provider:physical_network | datacentre |
| provider:segmentation_id | None |
| qos_policy_id | None |
| revision_number | None |
| router:external | External |
| segments | None |
| shared | False |
| status | ACTIVE |
| subnets | 2a5792dd-5c5f-4db6-928d-63169fc1195d |
| tags | |
| updated_at | None |
+---------------------------+--------------------------------------+

Trace
=====

    Traceback (most recent call last):
      File "/usr/lib/python2.7/site-packages/neutron_tempest_plugin/api/admin/test_floating_ips_admin_actions.py", line 58, in test_associate_floating_ip_with_port_from_another_project
        floating_ip['id'], port_id=port['port']['id'])
      File "/usr/lib/python2.7/site-packages/testtools/testcase.py", line 422, in assertRaises
        self.assertThat(our_callable, matcher)
      File "/usr/lib/python2.7/site-packages/testtools/testcase.py", line 433, in assertThat
        mismatch_error = self._matchHelper(matchee, matcher, message, verbose)
      File "/usr/lib/python2.7/site-packages/testtools/testcase.py", line 483, in _matchHelper
        mismatch = matcher.match(matchee)
      File "/usr/lib/python2.7/site-packages/testtools/matchers/_exception.py", line 108, in match
        mismatch = self.exception_matcher.match(exc_info)
      File "/usr/lib/python2.7/site-packages/testtools/matchers/_higherorder.py", line 62, in match
        mismatch = matcher.match(matchee)
      File "/usr/lib/python2.7/site-packages/testtools/testcase.py", line 414, in match
        reraise(*matchee)
      File "/usr/lib/python2.7/site-packages/testtools/matchers/_exception.py", line 101, in match
        result = matchee()
      File "/usr/lib/python2.7/site-packages/testtools/testcase.py", line 969, in __call__
        return self._callable_object(*self._args, **self._kwargs)
      File "/usr/lib/python2.7/site-packages/neutron_tempest_plugin/services/network/json/network_client.py", line 925, in update_floatingip
        put_resp, resp_body = self.put(uri, put_body)
      File "/usr/lib/python2.7/site-packages/tempest/lib/common/rest_client.py", line 343, in put
        return self.request('PUT', url, extra_headers, headers, body, chunked)
      File "/usr/lib/python2.7/site-packages/tempest/lib/common/rest_client.py", line 668, in request
        self._error_checker(resp, resp_body)
      File "/usr/lib/python2.7/site-packages/tempest/lib/common/rest_client.py", line 774, in _error_checker
        raise exceptions.NotFound(resp_body, resp=resp)
    tempest.lib.exceptions.NotFound: Object not found
    Details: {u'message': u'Port 919fb902-af9f-4e47-b53c-3c1be8e67ea3 could not be found.', u'type': u'PortNotFound', u'detail': u''}

Tags: config tempest
shajuvk (shajuvk)
information type: Proprietary → Public
Revision history for this message
shajuvk (shajuvk) wrote :

Please ignore the previous trace. Below is the correct Trace.
---

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "/usr/lib/python2.7/site-packages/neutron_tempest_plugin/api/admin/test_floating_ips_admin_actions.py", line 58, in test_associate_floating_ip_with
_port_from_another_project
        floating_ip['id'], port_id=port['port']['id'])
      File "/usr/lib/python2.7/site-packages/testtools/testcase.py", line 422, in assertRaises
        self.assertThat(our_callable, matcher)
      File "/usr/lib/python2.7/site-packages/testtools/testcase.py", line 433, in assertThat
        mismatch_error = self._matchHelper(matchee, matcher, message, verbose)
      File "/usr/lib/python2.7/site-packages/testtools/testcase.py", line 483, in _matchHelper
        mismatch = matcher.match(matchee)
      File "/usr/lib/python2.7/site-packages/testtools/matchers/_exception.py", line 108, in match
        mismatch = self.exception_matcher.match(exc_info)
      File "/usr/lib/python2.7/site-packages/testtools/matchers/_higherorder.py", line 62, in match
        mismatch = matcher.match(matchee)
      File "/usr/lib/python2.7/site-packages/testtools/testcase.py", line 414, in match
        reraise(*matchee)
      File "/usr/lib/python2.7/site-packages/testtools/matchers/_exception.py", line 101, in match
        result = matchee()
      File "/usr/lib/python2.7/site-packages/testtools/testcase.py", line 969, in __call__
        return self._callable_object(*self._args, **self._kwargs)
      File "/usr/lib/python2.7/site-packages/neutron_tempest_plugin/services/network/json/network_client.py", line 923, in update_floatingip
        get_resp, _ = self.get(uri)
      File "/usr/lib/python2.7/site-packages/tempest/lib/common/rest_client.py", line 343, in put
        return self.request('PUT', url, extra_headers, headers, body, chunked)
      File "/usr/lib/python2.7/site-packages/tempest/lib/common/rest_client.py", line 668, in request
        self._error_checker(resp, resp_body)
      File "/usr/lib/python2.7/site-packages/tempest/lib/common/rest_client.py", line 774, in _error_checker
        raise exceptions.NotFound(resp_body, resp=resp)
    tempest.lib.exceptions.NotFound: Object not found
    Details: {u'message': u'Port 33d6b8aa-6339-44f4-9bba-e6281ce1fc7f could not be found.', u'type': u'PortNotFound', u'detail': u''}

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.