Public bug reported: Description ===========
If you make multiple reboot API requests simultaneously, a 500 error response will occur. Steps to reproduce ================== test_reboot.sh ------------------------------------------- #!/bin/bash INSTANCE=$1 for i in $(seq 1 2) do echo "reboot instance: $INSTANCE" openstack server reboot $INSTANCE & done ------------------------------------------- run script ------------------------------------------- $ bash test_reboot.sh ------------------------------------------- Expected result =============== I expect a 202 or 409 response to be output. Actual result ============= A 500 error occurred. ------------------------------------------- Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible. <class 'nova.exception.UnexpectedTaskStateError'> (HTTP 500) (Request-ID: req-062f90da-d980-4d23-9624-2c37874fc9ef) ------------------------------------------- nova-api log ------------------------------------------- 2023-09-25 10:38:05.028 9285 ERROR nova.api.openstack.wsgi [req-062f90da-d980-4d23-9624-2c37874fc9ef e306fe82332941d8a5317738a21cf82c 0f6727c6cc434a219ed84d076d4b0e05 - default default] Unexpected exception in API method: UnexpectedTaskStateError: Conflict updating instance 88ca51ce-f75e-4782-b6cd-85cdc4eb461b. Expected: {'task_state': [None]}. Actual: {'task_state': u'rebooting'} 2023-09-25 10:38:05.038 9285 INFO nova.api.openstack.wsgi [req-062f90da-d980-4d23-9624-2c37874fc9ef e306fe82332941d8a5317738a21cf82c 0f6727c6cc434a219ed84d076d4b0e05 - default default] HTTP exception thrown: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible. 2023-09-25 10:38:05.039 9285 DEBUG nova.api.openstack.wsgi [req-062f90da-d980-4d23-9624-2c37874fc9ef e306fe82332941d8a5317738a21cf82c 0f6727c6cc434a219ed84d076d4b0e05 - default default] Returning 500 to user: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible. 2023-09-25 10:38:05.043 9285 INFO nova.osapi_compute.wsgi.server [req-062f90da-d980-4d23-9624-2c37874fc9ef e306fe82332941d8a5317738a21cf82c 0f6727c6cc434a219ed84d076d4b0e05 - default default] 192.168.0.1 "POST /v2.1/servers/88ca51ce-f75e-4782-b6cd-85cdc4eb461b/action HTTP/1.1" status: 500 len: 646 time: 1.3927691 ------------------------------------------- Environment =========== * openstack version: queens * libvirt + kvm ** Affects: nova Importance: Undecided Assignee: Yonghyun Kim (kshusil82) Status: New ** Changed in: nova Assignee: (unassigned) => Yonghyun Kim (kshusil82) -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/2037241 Title: Error 500 occurs when requesting API simultaneously Status in OpenStack Compute (nova): New Bug description: Description =========== If you make multiple reboot API requests simultaneously, a 500 error response will occur. Steps to reproduce ================== test_reboot.sh ------------------------------------------- #!/bin/bash INSTANCE=$1 for i in $(seq 1 2) do echo "reboot instance: $INSTANCE" openstack server reboot $INSTANCE & done ------------------------------------------- run script ------------------------------------------- $ bash test_reboot.sh ------------------------------------------- Expected result =============== I expect a 202 or 409 response to be output. Actual result ============= A 500 error occurred. ------------------------------------------- Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible. <class 'nova.exception.UnexpectedTaskStateError'> (HTTP 500) (Request-ID: req-062f90da-d980-4d23-9624-2c37874fc9ef) ------------------------------------------- nova-api log ------------------------------------------- 2023-09-25 10:38:05.028 9285 ERROR nova.api.openstack.wsgi [req-062f90da-d980-4d23-9624-2c37874fc9ef e306fe82332941d8a5317738a21cf82c 0f6727c6cc434a219ed84d076d4b0e05 - default default] Unexpected exception in API method: UnexpectedTaskStateError: Conflict updating instance 88ca51ce-f75e-4782-b6cd-85cdc4eb461b. Expected: {'task_state': [None]}. Actual: {'task_state': u'rebooting'} 2023-09-25 10:38:05.038 9285 INFO nova.api.openstack.wsgi [req-062f90da-d980-4d23-9624-2c37874fc9ef e306fe82332941d8a5317738a21cf82c 0f6727c6cc434a219ed84d076d4b0e05 - default default] HTTP exception thrown: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible. 2023-09-25 10:38:05.039 9285 DEBUG nova.api.openstack.wsgi [req-062f90da-d980-4d23-9624-2c37874fc9ef e306fe82332941d8a5317738a21cf82c 0f6727c6cc434a219ed84d076d4b0e05 - default default] Returning 500 to user: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible. 2023-09-25 10:38:05.043 9285 INFO nova.osapi_compute.wsgi.server [req-062f90da-d980-4d23-9624-2c37874fc9ef e306fe82332941d8a5317738a21cf82c 0f6727c6cc434a219ed84d076d4b0e05 - default default] 192.168.0.1 "POST /v2.1/servers/88ca51ce-f75e-4782-b6cd-85cdc4eb461b/action HTTP/1.1" status: 500 len: 646 time: 1.3927691 ------------------------------------------- Environment =========== * openstack version: queens * libvirt + kvm To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/2037241/+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