← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1644502] Re: port not found error on create_subnet

 

Reviewed:  https://review.openstack.org/402023
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=9e006cbe64717f3743a215293586713394c47467
Submitter: Jenkins
Branch:    master

commit 9e006cbe64717f3743a215293586713394c47467
Author: Kevin Benton <kevin@xxxxxxxxxx>
Date:   Thu Nov 24 04:17:15 2016 -0800

    Capture NotFound Exceptions in subnet postcommit
    
    Change I28323eddcf34fd12002cc706f4a9bcbb3f976ceb introduced
    a subtle difference in the types of exceptions that can be
    encountered during the operations after creating a subnet.
    
    Before that change, a giant enclosing transaction would provide
    REPEATABLE READ guarantees, so once a port was looked up by
    IPAM, calling update_port on that port afterwards in the same
    transaction would not result in a PortNotFound exception.
    The same applied to looking up a router and then updating its
    gateway port.
    
    Now that there is no giant enclosing transaction, we have to
    capture the possible PortNotFound and RouterNotFound exceptions
    that can occur during these post commit subnet create operations.
    
    Closes-Bug: #1644502
    Change-Id: I29e2bf7bcda37ebbcee193f94c8b03df90f24ef1


** Changed in: neutron
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1644502

Title:
  port not found error on create_subnet

Status in neutron:
  Fix Released

Bug description:
  Error spotted during subnet creation for a gate test:

  http://logs.openstack.org/77/401377/2/check/gate-tempest-dsvm-neutron-
  linuxbridge-ubuntu-xenial/8a23d5b/logs/testr_results.html.gz

  
  ft198.9: tempest.api.network.test_dhcp_ipv6.NetworksTestDHCPv6.test_dhcpv6_stateless_no_ra[id-ae2f4a5d-03ff-4c42-a3b0-ce2fcb7ea832]_StringException: Empty attachments:
    stderr
    stdout

  pythonlogging:'': {{{
  2016-11-24 08:51:28,627 14933 INFO     [tempest.lib.common.rest_client] Request (NetworksTestDHCPv6:test_dhcpv6_stateless_no_ra): 404 POST https://127.0.0.1:9696/v2.0/subnets 0.458s
  2016-11-24 08:51:28,627 14933 DEBUG    [tempest.lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
          Body: {"subnet": {"gateway_ip": "2003::1", "ip_version": 6, "cidr": "2003::/64", "network_id": "211d7f7c-4b6e-4bc6-8149-d831dc2018e8", "ipv6_address_mode": "slaac"}}
      Response - Headers: {'status': '404', 'connection': 'close', 'server': 'Apache/2.4.18 (Ubuntu)', 'content-length': '132', 'x-openstack-request-id': 'req-9f760fe7-a74e-4d3e-be18-23d5ae27c314', 'content-type': 'application/json', 'content-location': 'https://127.0.0.1:9696/v2.0/subnets', 'date': 'Thu, 24 Nov 2016 08:51:28 GMT'}
          Body: {"NeutronError": {"message": "Port 5d8ffe5b-78b6-48ba-921f-800cfaa923c3 could not be found.", "type": "PortNotFound", "detail": ""}}
  2016-11-24 08:51:28,684 14933 INFO     [tempest.lib.common.rest_client] Request (NetworksTestDHCPv6:tearDown): 200 GET https://127.0.0.1:9696/v2.0/ports 0.053s
  2016-11-24 08:51:28,684 14933 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', 'connection': 'close', 'server': 'Apache/2.4.18 (Ubuntu)', 'content-length': '13', 'x-openstack-request-id': 'req-e3ccd293-e418-457b-90bd-d6e9a362b8f7', 'content-type': 'application/json', 'content-location': 'https://127.0.0.1:9696/v2.0/ports', 'date': 'Thu, 24 Nov 2016 08:51:28 GMT'}
          Body: {"ports": []}
  2016-11-24 08:51:28,754 14933 INFO     [tempest.lib.common.rest_client] Request (NetworksTestDHCPv6:tearDown): 200 GET https://127.0.0.1:9696/v2.0/subnets 0.069s
  2016-11-24 08:51:28,754 14933 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', 'connection': 'close', 'server': 'Apache/2.4.18 (Ubuntu)', 'content-length': '645', 'x-openstack-request-id': 'req-5d7d9081-6ea3-427e-94ac-53ea2df1dbc9', 'content-type': 'application/json', 'content-location': 'https://127.0.0.1:9696/v2.0/subnets', 'date': 'Thu, 24 Nov 2016 08:51:28 GMT'}
          Body: {"subnets": [{"service_types": [], "description": "", "enable_dhcp": true, "network_id": "211d7f7c-4b6e-4bc6-8149-d831dc2018e8", "tenant_id": "b1b9117753ee40ab92362496e64e09ea", "created_at": "2016-11-24T08:51:28Z", "dns_nameservers": [], "updated_at": "2016-11-24T08:51:28Z", "gateway_ip": "2003::1", "ipv6_ra_mode": null, "allocation_pools": [{"start": "2003::2", "end": "2003::ffff:ffff:ffff:ffff"}], "host_routes": [], "revision_number": 2, "ip_version": 6, "ipv6_address_mode": "slaac", "cidr": "2003::/64", "project_id": "b1b9117753ee40ab92362496e64e09ea", "id": "c6f8c153-899d-4303-9c3a-1e0c5b5a0cf1", "subnetpool_id": null, "name": ""}]}
  2016-11-24 08:51:28,821 14933 INFO     [tempest.lib.common.rest_client] Request (NetworksTestDHCPv6:tearDown): 200 GET https://127.0.0.1:9696/v2.0/routers 0.066s
  2016-11-24 08:51:28,821 14933 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', 'connection': 'close', 'server': 'Apache/2.4.18 (Ubuntu)', 'content-length': '15', 'x-openstack-request-id': 'req-9b4a0eb1-0afe-4890-b3cd-25630edd1f0f', 'content-type': 'application/json', 'content-location': 'https://127.0.0.1:9696/v2.0/routers', 'date': 'Thu, 24 Nov 2016 08:51:28 GMT'}
          Body: {"routers": []}
  }}}

  Traceback (most recent call last):
    File "tempest/api/network/test_dhcp_ipv6.py", line 130, in test_dhcpv6_stateless_no_ra
      real_ip, eui_ip = self._get_ips_from_subnet(**kwargs)
    File "tempest/api/network/test_dhcp_ipv6.py", line 92, in _get_ips_from_subnet
      subnet = self.create_subnet(self.network, **kwargs)
    File "tempest/api/network/base.py", line 178, in create_subnet
      **kwargs)
    File "tempest/lib/services/network/subnets_client.py", line 27, in create_subnet
      return self.create_resource(uri, post_data)
    File "tempest/lib/services/network/base.py", line 60, in create_resource
      resp, body = self.post(req_uri, req_post_data)
    File "tempest/lib/common/rest_client.py", line 276, in post
      return self.request('POST', url, extra_headers, headers, body, chunked)
    File "tempest/lib/common/rest_client.py", line 664, in request
      self._error_checker(resp, resp_body)
    File "tempest/lib/common/rest_client.py", line 761, in _error_checker
      raise exceptions.NotFound(resp_body, resp=resp)
  tempest.lib.exceptions.NotFound: Object not found
  Details: {u'message': u'Port 5d8ffe5b-78b6-48ba-921f-800cfaa923c3 could not be found.', u'type': u'PortNotFound', u'detail': u''}

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1644502/+subscriptions


References