Advertisement
Guest User

Untitled

a guest
Jul 24th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 11.25 KB | None | 0 0
  1. rally verify start --pattern tempest.api.network.admin.test_avaya_mapping.AvayaMappingTest.test_negative_create_port_delete_update
  2.  
  3.     def test_negative_create_port_delete_update(self):
  4.         # create  port -> get_mapping_event -> transaction_done -> delete_port
  5.         #  -> get_event -> update_port(CONFLICT)
  6.         agent = fake_mapping_agent.FakeMappingAgent(URL, host_name)
  7.         agent.start()
  8.         self.addCleanup(self.stop_agent_and_get_event, agent)
  9.  
  10.         network = self._create_network()
  11.         post_body = {"name": data_utils.rand_name('port-'),
  12.                      "network_id": network['id'],
  13.                      "binding:host_id": self.compute_host_id}
  14.         body = self.admin_ports_client.create_port(**post_body)
  15.         port = body['port']
  16.  
  17.         z_create = agent.get_mapping_event()
  18.         LOG.debug('\nz_create: %s\n' % z_create)
  19. z_create: {'action': 'create', 'tx_id': 'd1e8982a-009a-414b-9bc4-79add3ff67a2', 'mapping': {u'vlan': 1074, u'host': u'node-2.test.domain.local', u'is_dynamic': False, u'management_ip': u'10.100.3.3', u'isid': 1001, u'bridge_name': u'br-isid-vs', u'switch_ports': [[u'10.177.224.10', u'1/32'], [u'10.177.224.10', u'1/31']], u'physnet': u'node-2_physnet20'}, 'request_id': u'req-ff133ff6-19f8-479f-aa4c-83373b0d204f'}
  20.  
  21.         if z_create:
  22.             agent.transactions_done({z_create['tx_id']: (200, "some message")})
  23.  
  24. Haven't found this "some message" in neutron-server.log
  25.  
  26.        self.admin_ports_client.delete_port(port['id'])
  27.  
  28.        z_delete = agent.get_mapping_event()
  29.        LOG.debug('\nz_delete: %s\n' % z_delete)
  30.        if z_delete:
  31.            self.addCleanup(agent.transactions_done, {z_create['tx_id']: (200, "some message")})
  32.            try:
  33.                post = {"name": data_utils.rand_name('port-'),
  34.                        "network_id": network['id']}
  35.                body = self.admin_ports_client.create_port(**post)
  36.  
  37. 2017-07-25T00:08:21.523342+00:00 info:  2017-07-25 00:08:21.521 965 INFO neutron.wsgi [req-1668edbb-e0f9-4171-90d2-98baa366071a 1be83fa8c84f4bf68ed6227fef97f133 cf83df8ced2047fd819465c5fbcf5f57 - - -] 10.100.3.6 - - [25/Jul/2017 00:08:21] "POST /v2.0/ports HTTP/1.1" 201 951 0.329025
  38. 2017-07-25T00:08:21.541153+00:00 debug:  2017-07-25 00:08:21.538 967 DEBUG neutron.wsgi [-] (967) accepted ('10.100.3.6', 40451) server /usr/lib/python2.7/dist-packages/eventlet/wsgi.py:867
  39.  
  40.                port = body['port']
  41.                self.addCleanup(self.port_cleanup, agent, port['id'], False)
  42.  
  43.                post_update = {"binding:host_id": self.compute_host_id}
  44.                self.admin_ports_client.update_port(port['id'], **post_update)
  45.  
  46. 2017-07-25T00:08:24.972358+00:00 debug:  2017-07-25 00:08:24.970 967 DEBUG networking_avaya.ml2.drivers.mech_avaya [req-da8cf89e-00e8-41f9-b102-04096346d1b1 1be83fa8c84f4bf68ed6227fef97f133 cf83df8ced2047fd819465c5fbcf5f57 - - -] Update port: old host , new host node-2.test.domain.local, old binding_levels: None, new binding_levels: None update_port_precommit /usr/lib/python2.7/dist-packages/networking_avaya/ml2/drivers/mech_avaya.py:245
  47. 2017-07-25T00:08:24.973287+00:00 debug:  2017-07-25 00:08:24.971 967 DEBUG oslo_concurrency.lockutils [req-da8cf89e-00e8-41f9-b102-04096346d1b1 1be83fa8c84f4bf68ed6227fef97f133 cf83df8ced2047fd819465c5fbcf5f57 - - -] Lock "avaya_locked_mapping" acquired by "networking_avaya.db.models.try_create_mapping" :: waited 0.000s inner /usr/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py:270
  48. 2017-07-25T00:08:24.976824+00:00 debug:  2017-07-25 00:08:24.975 967 DEBUG oslo_concurrency.lockutils [req-da8cf89e-00e8-41f9-b102-04096346d1b1 1be83fa8c84f4bf68ed6227fef97f133 cf83df8ced2047fd819465c5fbcf5f57 - - -] Lock "avaya_locked_mapping" released by "networking_avaya.db.models.try_create_mapping" :: held 0.004s inner /usr/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py:282
  49. 2017-07-25T00:08:24.978126+00:00 err:  2017-07-25 00:08:24.975 967 ERROR neutron.plugins.ml2.managers [req-da8cf89e-00e8-41f9-b102-04096346d1b1 1be83fa8c84f4bf68ed6227fef97f133 cf83df8ced2047fd819465c5fbcf5f57 - - -] Mechanism driver 'avaya_ml2' failed in update_port_precommit
  50. 2017-07-25 00:08:24.975 967 ERROR neutron.plugins.ml2.managers Traceback (most recent call last):
  51. 2017-07-25 00:08:24.975 967 ERROR neutron.plugins.ml2.managers   File "/usr/lib/python2.7/dist-packages/neutron/plugins/ml2/managers.py", line 407, in _call_on_drivers
  52. 2017-07-25 00:08:24.975 967 ERROR neutron.plugins.ml2.managers     getattr(driver.obj, method_name)(context)
  53. 2017-07-25 00:08:24.975 967 ERROR neutron.plugins.ml2.managers   File "/usr/lib/python2.7/dist-packages/networking_avaya/ml2/drivers/mech_avaya.py", line 126, in wrapped
  54. 2017-07-25 00:08:24.975 967 ERROR neutron.plugins.ml2.managers     self.mgmt_ips = {}
  55. 2017-07-25 00:08:24.975 967 ERROR neutron.plugins.ml2.managers   File "/usr/lib/python2.7/dist-packages/networking_avaya/ml2/drivers/mech_avaya.py", line 254, in update_port_precommit
  56. 2017-07-25 00:08:24.975 967 ERROR neutron.plugins.ml2.managers     models.process_mapping(context, host, network_id, mapping,
  57. 2017-07-25 00:08:24.975 967 ERROR neutron.plugins.ml2.managers   File "/usr/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py", line 271, in inner
  58. 2017-07-25 00:08:24.975 967 ERROR neutron.plugins.ml2.managers     return f(*args, **kwargs)
  59. 2017-07-25 00:08:24.975 967 ERROR neutron.plugins.ml2.managers   File "/usr/lib/python2.7/dist-packages/networking_avaya/db/models.py", line 105, in try_create_mapping
  60. 2017-07-25 00:08:24.975 967 ERROR neutron.plugins.ml2.managers     res = _get_locked_mapping(session, host, network_id)
  61. 2017-07-25 00:08:24.975 967 ERROR neutron.plugins.ml2.managers MappingConflict: Conflict of operations: mapping is in status DELETING, while Neutron is trying to create it
  62. 2017-07-25 00:08:24.975 967 ERROR neutron.plugins.ml2.managers
  63. 2017-07-25T00:08:24.980515+00:00 err:  2017-07-25 00:08:24.977 967 ERROR neutron.api.v2.resource [req-da8cf89e-00e8-41f9-b102-04096346d1b1 1be83fa8c84f4bf68ed6227fef97f133 cf83df8ced2047fd819465c5fbcf5f57 - - -] update failed
  64. 2017-07-25 00:08:24.977 967 ERROR neutron.api.v2.resource Traceback (most recent call last):
  65. 2017-07-25 00:08:24.977 967 ERROR neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/neutron/api/v2/resource.py", line 84, in resource
  66. 2017-07-25 00:08:24.977 967 ERROR neutron.api.v2.resource     result = method(request=request, **args)
  67. 2017-07-25 00:08:24.977 967 ERROR neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/neutron/api/v2/base.py", line 582, in update
  68. 2017-07-25 00:08:24.977 967 ERROR neutron.api.v2.resource     return self._update(request, id, body, **kwargs)
  69. 2017-07-25 00:08:24.977 967 ERROR neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/oslo_db/api.py", line 148, in wrapper
  70. 2017-07-25 00:08:24.977 967 ERROR neutron.api.v2.resource     ectxt.value = e.inner_exc
  71. 2017-07-25 00:08:24.977 967 ERROR neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
  72. 2017-07-25 00:08:24.977 967 ERROR neutron.api.v2.resource     self.force_reraise()
  73. 2017-07-25 00:08:24.977 967 ERROR neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
  74. 2017-07-25 00:08:24.977 967 ERROR neutron.api.v2.resource     six.reraise(self.type_, self.value, self.tb)
  75. 2017-07-25 00:08:24.977 967 ERROR neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/oslo_db/api.py", line 138, in wrapper
  76. 2017-07-25 00:08:24.977 967 ERROR neutron.api.v2.resource     return f(*args, **kwargs)
  77. 2017-07-25 00:08:24.977 967 ERROR neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/neutron/api/v2/base.py", line 630, in _update
  78. 2017-07-25 00:08:24.977 967 ERROR neutron.api.v2.resource     obj = obj_updater(request.context, id, **kwargs)
  79. 2017-07-25 00:08:24.977
  80. 2017-07-25T00:08:24.982675+00:00 info:  2017-07-25 00:08:24.981 967 INFO neutron.wsgi [req-da8cf89e-00e8-41f9-b102-04096346d1b1 1be83fa8c84f4bf68ed6227fef97f133 cf83df8ced2047fd819465c5fbcf5f57 - - -] 10.100.3.6 - - [25/Jul/2017 00:08:24] "PUT /v2.0/ports/31ebf93f-317e-4664-9cf0-e673e4661d2d HTTP/1.1" 500 336 3.441971
  81.  
  82.            except Exception as err:
  83.                self.assertIn('mapping is in status DELETING, while Neutron is trying to create it',
  84.                              str(err))
  85.        else:
  86.            raw_msg = "Could not fetch mapping event 'DELETE' from the queue for port {}".format(port['id'])
  87.            self.fail(raw_msg)
  88.  
  89.  
  90.  
  91.  
  92. tempest.logs
  93. 2017-07-25 00:08:21.510 1574 INFO tempest.lib.common.rest_client [req-acc582b7-8fe4-435a-9000-64e2f7cdada1 - - - - -] Request (AvayaMappingTest:test_negative_create_port_delete_update): 201 POST https://public.fuel.local:9696/v2.0/ports 0.327s
  94. 2017-07-25 00:08:21.518 1574 DEBUG tempest.lib.common.rest_client [req-acc582b7-8fe4-435a-9000-64e2f7cdada1 - - - - -] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
  95.        Body: {"port": {"network_id": "f437f51a-84f2-4aa1-8efd-3db3be260dbd", "name": "tempest-port--1511242653"}}
  96.    Response - Headers: {'status': '201', 'content-length': '737', 'content-location': 'https://public.fuel.local:9696/v2.0/ports', 'connection': 'close', 'date': 'Tue, 25 Jul 2017 00:08:21 GMT', 'content-type': 'application/json; charset=UTF-8', 'x-openstack-request-id': 'req-1668edbb-e0f9-4171-90d2-98baa366071a'}
  97.        Body: {"port": {"status": "DOWN", "binding:host_id": "", "description": "", "allowed_address_pairs": [], "extra_dhcp_opts": [], "dns_assignment": [], "updated_at": "2017-07-25T00:08:21", "device_owner": "", "binding:profile": {}, "port_security_enabled": true, "fixed_ips": [], "id": "31ebf93f-317e-4664-9cf0-e673e4661d2d", "security_groups": ["adf9ff03-7de3-41e5-ac2f-96ceaddeee57"], "device_id": "", "name": "tempest-port--1511242653", "admin_state_up": true, "network_id": "f437f51a-84f2-4aa1-8efd-3db3be260dbd", "dns_name": "", "binding:vif_details": {}, "binding:vnic_type": "normal", "binding:vif_type": "unbound", "tenant_id": "cf83df8ced2047fd819465c5fbcf5f57", "mac_address": "fa:16:3e:08:fc:d0", "created_at": "2017-07-25T00:08:21"}} _log_request_full tempest/lib/common/rest_client.py:414
  98. 2017-07-25 00:08:24.983 1574 INFO tempest.lib.common.rest_client [req-acc582b7-8fe4-435a-9000-64e2f7cdada1 - - - - -] Request (AvayaMappingTest:test_negative_create_port_delete_update): 500 PUT https://public.fuel.local:9696/v2.0/ports/31ebf93f-317e-4664-9cf0-e673e4661d2d 3.453s
  99. 2017-07-25 00:08:24.986 1574 DEBUG tempest.lib.common.rest_client [req-acc582b7-8fe4-435a-9000-64e2f7cdada1 - - - - -] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
  100.        Body: {"port": {"binding:host_id": "node-2.test.domain.local"}}
  101.    Response - Headers: {'status': '500', 'content-length': '108', 'content-location': 'https://public.fuel.local:9696/v2.0/ports/31ebf93f-317e-4664-9cf0-e673e4661d2d', 'connection': 'close', 'date': 'Tue, 25 Jul 2017 00:08:24 GMT', 'content-type': 'application/json; charset=UTF-8', 'x-openstack-request-id': 'req-da8cf89e-00e8-41f9-b102-04096346d1b1'}
  102.        Body: {"NeutronError": {"message": "update_port_precommit failed.", "type": "MechanismDriverError", "detail": ""}} _log_request_full tempest/lib/common/rest_client.py:414
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement