Public bug reported: Steps: 1. Pull down and run the following test code in Tempest: https://github.com/openstack/neutron-lbaas/blob/master/neutron_lbaas/tests/tempest/v2/api/test_listeners_admin.py#L98 2. Examine logs for actual request/response.
Result: The test test_create_listener_missing_tenant_id creates a tenant_id with special characters, instead of leaving it empty. Expected: The test should pass in an empty tenant_id into the listener create call. This is happening because the class variables are being reused for the next test. Specifically self.create_listener_kwargs should be reinitialized prior to the proceeding test method. Log Snippet: 2015-10-15 23:12:27.397 | 2015-10-15 23:12:27.370 | Captured pythonlogging: 2015-10-15 23:12:27.399 | 2015-10-15 23:12:27.371 | ~~~~~~~~~~~~~~~~~~~~~~~ 2015-10-15 23:12:27.400 | 2015-10-15 23:12:27.373 | 2015-10-15 23:12:19,307 3297 INFO [tempest_lib.common.rest_client] Request (ListenersTestJSON:test_create_listener_missing_tenant_id): 201 POST http://127.0.0.1:9696/v2.0/lbaas/listeners 0.274s 2015-10-15 23:12:27.401 | 2015-10-15 23:12:27.374 | 2015-10-15 23:12:19,307 3297 DEBUG [tempest_lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'} 2015-10-15 23:12:27.432 | 2015-10-15 23:12:27.375 | Body: {"listener": {"protocol": "HTTP", "protocol_port": 8081, "loadbalancer_id": "5109250c-e964-4c1b-80d4-c25996fba62f", "tenant_id": "&^%123"}} 2015-10-15 23:12:27.433 | 2015-10-15 23:12:27.376 | Response - Headers: {'content-type': 'application/json; charset=UTF-8', 'connection': 'close', 'content-length': '358', 'x-openstack-request-id': 'req-abb60691-16f6-4c70-9260-21e8aa79ddfe', 'date': 'Thu, 15 Oct 2015 23:12:19 GMT', 'status': '201'} 2015-10-15 23:12:27.433 | 2015-10-15 23:12:27.378 | Body: {"listener": {"protocol_port": 8081, "protocol": "HTTP", "description": "", "default_tls_container_ref": null, "admin_state_up": true, "loadbalancers": [{"id": "5109250c-e964-4c1b-80d4-c25996fba62f"}], "tenant_id": "&^%123", "sni_container_refs": [], "connection_limit": -1, "default_pool_id": null, "id": "c9a3a3f0-6c70-4e6d-b53c-268468a9641b", "name": ""}} Logs: http://logs.openstack.org/75/230875/12/gate/gate-neutron-lbaasv2-dsvm-listener/18155a8/console.html#_2015-10-15_23_12_27_433 ** Affects: neutron Importance: Undecided Status: New ** Tags: lbaas-2.0 -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to neutron. https://bugs.launchpad.net/bugs/1507055 Title: LBaaS 2.0: Listener create with no tenant id test issue Status in neutron: New Bug description: Steps: 1. Pull down and run the following test code in Tempest: https://github.com/openstack/neutron-lbaas/blob/master/neutron_lbaas/tests/tempest/v2/api/test_listeners_admin.py#L98 2. Examine logs for actual request/response. Result: The test test_create_listener_missing_tenant_id creates a tenant_id with special characters, instead of leaving it empty. Expected: The test should pass in an empty tenant_id into the listener create call. This is happening because the class variables are being reused for the next test. Specifically self.create_listener_kwargs should be reinitialized prior to the proceeding test method. Log Snippet: 2015-10-15 23:12:27.397 | 2015-10-15 23:12:27.370 | Captured pythonlogging: 2015-10-15 23:12:27.399 | 2015-10-15 23:12:27.371 | ~~~~~~~~~~~~~~~~~~~~~~~ 2015-10-15 23:12:27.400 | 2015-10-15 23:12:27.373 | 2015-10-15 23:12:19,307 3297 INFO [tempest_lib.common.rest_client] Request (ListenersTestJSON:test_create_listener_missing_tenant_id): 201 POST http://127.0.0.1:9696/v2.0/lbaas/listeners 0.274s 2015-10-15 23:12:27.401 | 2015-10-15 23:12:27.374 | 2015-10-15 23:12:19,307 3297 DEBUG [tempest_lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'} 2015-10-15 23:12:27.432 | 2015-10-15 23:12:27.375 | Body: {"listener": {"protocol": "HTTP", "protocol_port": 8081, "loadbalancer_id": "5109250c-e964-4c1b-80d4-c25996fba62f", "tenant_id": "&^%123"}} 2015-10-15 23:12:27.433 | 2015-10-15 23:12:27.376 | Response - Headers: {'content-type': 'application/json; charset=UTF-8', 'connection': 'close', 'content-length': '358', 'x-openstack-request-id': 'req-abb60691-16f6-4c70-9260-21e8aa79ddfe', 'date': 'Thu, 15 Oct 2015 23:12:19 GMT', 'status': '201'} 2015-10-15 23:12:27.433 | 2015-10-15 23:12:27.378 | Body: {"listener": {"protocol_port": 8081, "protocol": "HTTP", "description": "", "default_tls_container_ref": null, "admin_state_up": true, "loadbalancers": [{"id": "5109250c-e964-4c1b-80d4-c25996fba62f"}], "tenant_id": "&^%123", "sni_container_refs": [], "connection_limit": -1, "default_pool_id": null, "id": "c9a3a3f0-6c70-4e6d-b53c-268468a9641b", "name": ""}} Logs: http://logs.openstack.org/75/230875/12/gate/gate-neutron-lbaasv2-dsvm-listener/18155a8/console.html#_2015-10-15_23_12_27_433 To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1507055/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp