Comment 0 for bug 1570920

Revision history for this message
Piyush (pirsriva) wrote :

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.