test_dhcp_stateful_fixedips_duplicate and test_dhcp_stateful_fixedips works incorrect with Contrail SDN

Bug #1801159 reported by Mykola Yakovliev on 2018-11-01
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Undecided
Mykola Yakovliev

Bug Description

Tests

test_dhcp_stateful_fixedips_duplicate
test_dhcp_stateful_fixedips

relying on `random.randrange` when selecting IP from subnet `allocation_pool`.

It cause some problems with Contrail SDN. For internal usage, Contrail allocates `:1` and `:2` (as well as `.1` and `.2`), where `:1` acts as a gateway and `:2` acts as a DNS.

Since tests aren't expect anything on `:2`, when by pure random this IP got selected for test purpose - test fails.

``
Traceback (most recent call last):
  File "/home/rally/tempest/tempest/api/network/test_dhcp_ipv6.py", line 358, in test_dhcp_stateful_fixedips_duplicate
    'ip_address': ip}])
  File "/home/rally/tempest/tempest/api/network/base.py", line 161, in create_port
    **kwargs)
  File "/home/rally/tempest/tempest/lib/services/network/ports_client.py", line 28, in create_port
    return self.create_resource(uri, post_data)
  File "/home/rally/tempest/tempest/lib/services/network/base.py", line 61, in create_resource
    resp, body = self.post(req_uri, req_post_data)
  File "/home/rally/tempest/tempest/lib/common/rest_client.py", line 279, in post
    return self.request('POST', url, extra_headers, headers, body, chunked)
  File "/home/rally/tempest/tempest/lib/common/rest_client.py", line 675, in request
    self._error_checker(resp, resp_body)
  File "/home/rally/tempest/tempest/lib/common/rest_client.py", line 796, in _error_checker
    raise exceptions.Conflict(resp_body, resp=resp)
tempest.lib.exceptions.Conflict: Conflict with state of target resource
Details: {u'message': u'An unknown exception occurred.', u'type': u'Conflict', u'detail': u''}
``

The extra confusion here adds by the fact that test_dhcp_stateful_fixedips_duplicate actually tests conflict situation.

Fix proposed to branch: master
Review: https://review.openstack.org/614866

Changed in tempest:
assignee: nobody → Mykola Yakovliev (vegasq)
status: New → In Progress
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers