When using network context, the cleanup throws error saying "Router Not found"
[root@piyush-104 ~]# cat sample_json_network.json { "NeutronNetworks.create_and_delete_routers": [ { "args": { "network_create_args": {}, "subnet_create_args": {}, "subnet_cidr_start": "1.1.0.0/30", "subnets_per_network": 1, "router_create_args": {} }, "runner": { "type": "constant", "times": 1, "concurrency": 1 }, "context":{ "network": {} } } ] }
2016-04-15 04:26:10.500 10087 DEBUG neutronclient.client [-] REQ: curl -i http://10.0.2.15:9696//v2.0/routers/8e606167-5d5d-446a-abb8-406f3c9a7172.json -X PUT -H "User-Agent: python-neutronclient" -H "X-Auth-Token: {SHA1}a3142e6ddfc718fe0a85184490a5171760df8424" -d '{"router": {"external_gateway_info": {}}}' http_log_req /usr/lib/python2.7/site-packages/neutronclient/common/utils.py:185 2016-04-15 04:26:10.574 10087 DEBUG neutronclient.client [-] RESP: 404 {'Date': 'Thu, 14 Apr 2016 22:56:10 GMT', 'Connection': 'keep-alive', 'Content-Type': 'application/json; charset=UTF-8', 'Content-Length': '135', 'X-Openstack-Request-Id': 'req-44adeec8-d5fb-433b-ba65-cfec35b3a7e0'} {"NeutronError": {"message": "Router 8e606167-5d5d-446a-abb8-406f3c9a7172 could not be found", "type": "RouterNotFound", "detail": ""}} http_log_resp /usr/lib/python2.7/site-packages/neutronclient/common/utils.py:194 2016-04-15 04:26:10.575 10087 DEBUG neutronclient.v2_0.client [-] Error message: {"NeutronError": {"message": "Router 8e606167-5d5d-446a-abb8-406f3c9a7172 could not be found", "type": "RouterNotFound", "detail": ""}} _handle_fault_response /usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py:247 2016-04-15 04:26:10.575 10087 WARNING rally.plugins.openstack.context.network.networks [-] Failed to delete network for tenant 1d2a3aedefe4492380cb49ee2323eb9a 2016-04-15 04:26:10.576 10087 RALLYDEBUG rally.plugins.openstack.context.network.networks [-] Router 8e606167-5d5d-446a-abb8-406f3c9a7172 could not be found Neutron server returns request_ids: ['req-44adeec8-d5fb-433b-ba65-cfec35b3a7e0'] 2016-04-15 04:26:10.577 10087 ERROR rally.plugins.openstack.context.network.networks [-] Router 8e606167-5d5d-446a-abb8-406f3c9a7172 could not be found Neutron server returns request_ids: ['req-44adeec8-d5fb-433b-ba65-cfec35b3a7e0'] 2016-04-15 04:26:10.577 10087 ERROR rally.plugins.openstack.context.network.networks Traceback (most recent call last): 2016-04-15 04:26:10.577 10087 ERROR rally.plugins.openstack.context.network.networks File "/usr/lib/python2.7/site-packages/rally/plugins/openstack/context/network/networks.py", line 105, in cleanup 2016-04-15 04:26:10.577 10087 ERROR rally.plugins.openstack.context.network.networks net_wrapper.delete_network(network) 2016-04-15 04:26:10.577 10087 ERROR rally.plugins.openstack.context.network.networks File "/usr/lib/python2.7/site-packages/rally/plugins/openstack/wrappers/network.py", line 369, in delete_network 2016-04-15 04:26:10.577 10087 ERROR rally.plugins.openstack.context.network.networks self.client.remove_gateway_router(router_id) 2016-04-15 04:26:10.577 10087 ERROR rally.plugins.openstack.context.network.networks File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 762, in remove_gateway_router 2016-04-15 04:26:10.577 10087 ERROR rally.plugins.openstack.context.network.networks body={'router': {'external_gateway_info': {}}}) 2016-04-15 04:26:10.577 10087 ERROR rally.plugins.openstack.context.network.networks File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 351, in put 2016-04-15 04:26:10.577 10087 ERROR rally.plugins.openstack.context.network.networks headers=headers, params=params) 2016-04-15 04:26:10.577 10087 ERROR rally.plugins.openstack.context.network.networks File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 319, in retry_request 2016-04-15 04:26:10.577 10087 ERROR rally.plugins.openstack.context.network.networks headers=headers, params=params) 2016-04-15 04:26:10.577 10087 ERROR rally.plugins.openstack.context.network.networks File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 282, in do_request 2016-04-15 04:26:10.577 10087 ERROR rally.plugins.openstack.context.network.networks self._handle_fault_response(status_code, replybody, resp) 2016-04-15 04:26:10.577 10087 ERROR rally.plugins.openstack.context.network.networks File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 257, in _handle_fault_response 2016-04-15 04:26:10.577 10087 ERROR rally.plugins.openstack.context.network.networks exception_handler_v20(status_code, error_body) 2016-04-15 04:26:10.577 10087 ERROR rally.plugins.openstack.context.network.networks File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 84, in exception_handler_v20 2016-04-15 04:26:10.577 10087 ERROR rally.plugins.openstack.context.network.networks request_ids=request_ids) 2016-04-15 04:26:10.577 10087 ERROR rally.plugins.openstack.context.network.networks NotFound: Router 8e606167-5d5d-446a-abb8-406f3c9a7172 could not be found 2016-04-15 04:26:10.577 10087 ERROR rally.plugins.openstack.context.network.networks Neutron server returns request_ids: ['req-44adeec8-d5fb-433b-ba65-cfec35b3a7e0'] 2016-04-15 04:26:10.577 10087 ERROR rally.plugins.openstack.context.network.networks
Can also be seen in gates jobs- http://logs.openstack.org/04/301804/10/check/gate-rally-dsvm-neutron-rally/cb93c35/console.html
Reason- The user cleanup ( https://github.com/openstack/rally/blob/master/rally/plugins/openstack/context/cleanup/user.py#L46-52) deletes all the Neutron resources created in the network context (https://github.com/openstack/rally/blob/master/rally/plugins/openstack/context/network/networks.py#L77-88)
During cleanup() call for network context (https://github.com/openstack/rally/blob/master/rally/plugins/openstack/context/network/networks.py#L96), the entries are STILL there in the JSON (https://github.com/openstack/rally/blob/master/rally/plugins/openstack/context/network/networks.py#L88), but the resources have already been cleaned up during user cleanup.
When using network context, the cleanup throws error saying "Router Not found"
[root@piyush-104 ~]# cat sample_ json_network. json works.create_ and_delete_ routers" : [
"network_ create_ args": {},
"subnet_ create_ args": {},
"subnet_ cidr_start" : "1.1.0.0/30",
"subnets_ per_network" : 1,
"router_ create_ args": {}
"runner" : {
"type" : "constant",
"times" : 1,
"concurrency" : 1
"context" :{
"network" : {}
{
"NeutronNet
{
"args": {
},
},
}
}
]
}
2016-04-15 04:26:10.500 10087 DEBUG neutronclient. client [-] REQ: curl -i http:// 10.0.2. 15:9696/ /v2.0/routers/ 8e606167- 5d5d-446a- abb8-406f3c9a71 72.json -X PUT -H "User-Agent: python- neutronclient" -H "X-Auth-Token: {SHA1}a3142e6dd fc718fe0a851844 90a5171760df842 4" -d '{"router": {"external_ gateway_ info": {}}}' http_log_req /usr/lib/ python2. 7/site- packages/ neutronclient/ common/ utils.py: 185 client [-] RESP: 404 {'Date': 'Thu, 14 Apr 2016 22:56:10 GMT', 'Connection': 'keep-alive', 'Content-Type': 'application/json; charset=UTF-8', 'Content-Length': '135', 'X-Openstack- Request- Id': 'req-44adeec8- d5fb-433b- ba65-cfec35b3a7 e0'} {"NeutronError": {"message": "Router 8e606167- 5d5d-446a- abb8-406f3c9a71 72 could not be found", "type": "RouterNotFound", "detail": ""}} http_log_resp /usr/lib/ python2. 7/site- packages/ neutronclient/ common/ utils.py: 194 v2_0.client [-] Error message: {"NeutronError": {"message": "Router 8e606167- 5d5d-446a- abb8-406f3c9a71 72 could not be found", "type": "RouterNotFound", "detail": ""}} _handle_ fault_response /usr/lib/ python2. 7/site- packages/ neutronclient/ v2_0/client. py:247 openstack. context. network. networks [-] Failed to delete network for tenant 1d2a3aedefe4492 380cb49ee2323eb 9a openstack. context. network. networks [-] Router 8e606167- 5d5d-446a- abb8-406f3c9a71 72 could not be found d5fb-433b- ba65-cfec35b3a7 e0'] openstack. context. network. networks [-] Router 8e606167- 5d5d-446a- abb8-406f3c9a71 72 could not be found d5fb-433b- ba65-cfec35b3a7 e0'] openstack. context. network. networks Traceback (most recent call last): openstack. context. network. networks File "/usr/lib/ python2. 7/site- packages/ rally/plugins/ openstack/ context/ network/ networks. py", line 105, in cleanup openstack. context. network. networks net_wrapper. delete_ network( network) openstack. context. network. networks File "/usr/lib/ python2. 7/site- packages/ rally/plugins/ openstack/ wrappers/ network. py", line 369, in delete_network openstack. context. network. networks self.client. remove_ gateway_ router( router_ id) openstack. context. network. networks File "/usr/lib/ python2. 7/site- packages/ neutronclient/ v2_0/client. py", line 762, in remove_ gateway_ router openstack. context. network. networks body={'router': {'external_ gateway_ info': {}}}) openstack. context. network. networks File "/usr/lib/ python2. 7/site- packages/ neutronclient/ v2_0/client. py", line 351, in put openstack. context. network. networks headers=headers, params=params) openstack. context. network. networks File "/usr/lib/ python2. 7/site- packages/ neutronclient/ v2_0/client. py", line 319, in retry_request openstack. context. network. networks headers=headers, params=params) openstack. context. network. networks File "/usr/lib/ python2. 7/site- packages/ neutronclient/ v2_0/client. py", line 282, in do_request openstack. context. network. networks self._handle_ fault_response( status_ code, replybody, resp) openstack. context. network. networks File "/usr/lib/ python2. 7/site- packages/ neutronclient/ v2_0/client. py", line 257, in _handle_ fault_response openstack. context. network. networks exception_ handler_ v20(status_ code, error_body) openstack. context. network. networks File "/usr/lib/ python2. 7/site- packages/ neutronclient/ v2_0/client. py", line 84, in exception_ handler_ v20 openstack. context. network. networks request_ ids=request_ ids) openstack. context. network. networks NotFound: Router 8e606167- 5d5d-446a- abb8-406f3c9a71 72 could not be found openstack. context. network. networks Neutron server returns request_ids: ['req-44adeec8- d5fb-433b- ba65-cfec35b3a7 e0'] openstack. context. network. networks
2016-04-15 04:26:10.574 10087 DEBUG neutronclient.
2016-04-15 04:26:10.575 10087 DEBUG neutronclient.
2016-04-15 04:26:10.575 10087 WARNING rally.plugins.
2016-04-15 04:26:10.576 10087 RALLYDEBUG rally.plugins.
Neutron server returns request_ids: ['req-44adeec8-
2016-04-15 04:26:10.577 10087 ERROR rally.plugins.
Neutron server returns request_ids: ['req-44adeec8-
2016-04-15 04:26:10.577 10087 ERROR rally.plugins.
2016-04-15 04:26:10.577 10087 ERROR rally.plugins.
2016-04-15 04:26:10.577 10087 ERROR rally.plugins.
2016-04-15 04:26:10.577 10087 ERROR rally.plugins.
2016-04-15 04:26:10.577 10087 ERROR rally.plugins.
2016-04-15 04:26:10.577 10087 ERROR rally.plugins.
2016-04-15 04:26:10.577 10087 ERROR rally.plugins.
2016-04-15 04:26:10.577 10087 ERROR rally.plugins.
2016-04-15 04:26:10.577 10087 ERROR rally.plugins.
2016-04-15 04:26:10.577 10087 ERROR rally.plugins.
2016-04-15 04:26:10.577 10087 ERROR rally.plugins.
2016-04-15 04:26:10.577 10087 ERROR rally.plugins.
2016-04-15 04:26:10.577 10087 ERROR rally.plugins.
2016-04-15 04:26:10.577 10087 ERROR rally.plugins.
2016-04-15 04:26:10.577 10087 ERROR rally.plugins.
2016-04-15 04:26:10.577 10087 ERROR rally.plugins.
2016-04-15 04:26:10.577 10087 ERROR rally.plugins.
2016-04-15 04:26:10.577 10087 ERROR rally.plugins.
2016-04-15 04:26:10.577 10087 ERROR rally.plugins.
2016-04-15 04:26:10.577 10087 ERROR rally.plugins.
Can also be seen in gates jobs- logs.openstack. org/04/ 301804/ 10/check/ gate-rally- dsvm-neutron- rally/cb93c35/ console. html
http://
Reason- /github. com/openstack/ rally/blob/ master/ rally/plugins/ openstack/ context/ cleanup/ user.py# L46-52) deletes all the Neutron resources created in the network context (https:/ /github. com/openstack/ rally/blob/ master/ rally/plugins/ openstack/ context/ network/ networks. py#L77- 88)
The user cleanup ( https:/
During cleanup() call for network context (https:/ /github. com/openstack/ rally/blob/ master/ rally/plugins/ openstack/ context/ network/ networks. py#L96), the entries are STILL there in the JSON (https:/ /github. com/openstack/ rally/blob/ master/ rally/plugins/ openstack/ context/ network/ networks. py#L88), but the resources have already been cleaned up during user cleanup.