Comment 6 for bug 1779654

Revision history for this message
Vivek Soni (viveksoni) wrote :

This occurs due to the concurrent requests, both the request calls 'getServerByName' api https://github.com/openstack/cinder/blob/driverfixes/newton/cinder/volume/drivers/hpe/hpe_lefthand_iscsi.py#L898 & failed and then their is a race condition to call https://github.com/openstack/cinder/blob/driverfixes/newton/cinder/volume/drivers/hpe/hpe_lefthand_iscsi.py#L919

and one request which reaches the createServer() succeed and other request failed with error
hpelefthandclient.exceptions.HTTPServerError: Error (HTTP 500) SERVER_ALREADY_EXISTS - The server with the name "$1" already exists. Use a unique name and try again.

Fix:
------
we need to provide some locking mechanism to avoid such race situation