)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"9e900901b8789e334db9f63cdb79e793647bd25a","unresolved":true,"context_lines":[{"line_number":9,"context_line":"This commit adds bug reproducer for the #2106085. The test case"},{"line_number":10,"context_line":"reproduces 500 Internal Server error status calling the lock"},{"line_number":11,"context_line":"server action API before instance record is created in the main db."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Related-Bug: #2106085"},{"line_number":14,"context_line":"Change-Id: Iadf28ac52677af07e3081d57434b51317c8093bf"},{"line_number":15,"context_line":"Signed-off-by: Masahito Muroi \u003cmasahito.muroi@linecorp.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"770878d7_6e3ada15","line":12,"updated":"2026-05-29 16:32:06.000000000","message":"i suspsect this is a class of issue that affect all instance action as its an implict precondition for all instnace action that the intial server creat has compelted beofre any isntance acton can be made on it.\n\ncompleted means  in active or error state","commit_id":"fa46ec9b1cdc22060b4e87043bba2ff0adc3a6dc"},{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"5626dc5d67078fa3de91a7878f7f4b05270803d9","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This commit adds bug reproducer for the #2106085. The test case"},{"line_number":10,"context_line":"reproduces 500 Internal Server error status calling the lock"},{"line_number":11,"context_line":"server action API before instance record is created in the main db."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Related-Bug: #2106085"},{"line_number":14,"context_line":"Change-Id: Iadf28ac52677af07e3081d57434b51317c8093bf"},{"line_number":15,"context_line":"Signed-off-by: Masahito Muroi \u003cmasahito.muroi@linecorp.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"42dc00ac_8503d663","line":12,"in_reply_to":"770878d7_6e3ada15","updated":"2026-07-14 04:19:47.000000000","message":"Thanks. I checked the all action API and found the four action APIs returns 500 Internal Server Error.\n\n- lock action API\n- unlock action API\n- inject networkinfo action API\n- reset state action API\n\nAdded the reproducers for the four APIs.","commit_id":"fa46ec9b1cdc22060b4e87043bba2ff0adc3a6dc"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"5626dc5d67078fa3de91a7878f7f4b05270803d9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"42858b4a_27cfbe77","updated":"2026-07-14 04:19:47.000000000","message":"Thanks for the quick review. Updated.","commit_id":"fa46ec9b1cdc22060b4e87043bba2ff0adc3a6dc"}],"nova/tests/functional/regressions/test_bug_2106085.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"9e900901b8789e334db9f63cdb79e793647bd25a","unresolved":true,"context_lines":[{"line_number":20,"context_line":"    Validate lock server API response status."},{"line_number":21,"context_line":"    \"\"\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    CAST_AS_CALL \u003d False"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    def test_lock_without_instance_record(self):"},{"line_number":26,"context_line":"        request_body \u003d self._build_server()"},{"line_number":27,"context_line":"        server \u003d self.api.post_server({\u0027server\u0027: request_body})"},{"line_number":28,"context_line":"        kwargs \u003d {"},{"line_number":29,"context_line":"            \"check_response_status\": [500]"},{"line_number":30,"context_line":"        }"},{"line_number":31,"context_line":"        self.api.post_server_action(server[\u0027id\u0027], {\"lock\": None}, **kwargs)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    def test_lock_with_instance_record(self):"},{"line_number":34,"context_line":"        server \u003d self._create_server(expected_state\u003d\"ACTIVE\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"0301d8bb_57b80323","line":31,"range":{"start_line":23,"start_character":4,"end_line":31,"end_character":75},"updated":"2026-05-29 16:32:06.000000000","message":"this is racy\n\nwe need to instead us  threading lock or event to stop the instance form reachign active before the server is added to the cell db\u0027s isntances table and then post the lock request\n\nwe have examples of this in the other regresion tests.","commit_id":"fa46ec9b1cdc22060b4e87043bba2ff0adc3a6dc"},{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"5626dc5d67078fa3de91a7878f7f4b05270803d9","unresolved":false,"context_lines":[{"line_number":20,"context_line":"    Validate lock server API response status."},{"line_number":21,"context_line":"    \"\"\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    CAST_AS_CALL \u003d False"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    def test_lock_without_instance_record(self):"},{"line_number":26,"context_line":"        request_body \u003d self._build_server()"},{"line_number":27,"context_line":"        server \u003d self.api.post_server({\u0027server\u0027: request_body})"},{"line_number":28,"context_line":"        kwargs \u003d {"},{"line_number":29,"context_line":"            \"check_response_status\": [500]"},{"line_number":30,"context_line":"        }"},{"line_number":31,"context_line":"        self.api.post_server_action(server[\u0027id\u0027], {\"lock\": None}, **kwargs)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    def test_lock_with_instance_record(self):"},{"line_number":34,"context_line":"        server \u003d self._create_server(expected_state\u003d\"ACTIVE\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"3065a21a_5571a29a","line":31,"range":{"start_line":23,"start_character":4,"end_line":31,"end_character":75},"in_reply_to":"0301d8bb_57b80323","updated":"2026-07-14 04:19:47.000000000","message":"Done","commit_id":"fa46ec9b1cdc22060b4e87043bba2ff0adc3a6dc"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"063313d2beffb28097b159b7ae6d89f655992783","unresolved":true,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    CAST_AS_CALL \u003d False"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    @mock.patch("},{"line_number":29,"context_line":"        \u0027nova.conductor.manager.ComputeTaskManager.\u0027"},{"line_number":30,"context_line":"        \u0027schedule_and_build_instances\u0027)"},{"line_number":31,"context_line":"    def test_lock_without_instance_record(self, mocked_scheduled_and_build):"},{"line_number":32,"context_line":"        request_body \u003d self._build_server()"},{"line_number":33,"context_line":"        server \u003d self.api.post_server({\u0027server\u0027: request_body})"}],"source_content_type":"text/x-python","patch_set":2,"id":"e713e65c_2ff254f9","line":30,"range":{"start_line":28,"start_character":0,"end_line":30,"end_character":39},"updated":"2026-07-14 12:46:42.000000000","message":"this is not the correct way to do this\n\nyour currently mokeypatching the function with an empty mock so that it will return non and do none of the side effects\n\nwhat you should be doing is adding a lock/threading event that pasause the server creation so you can determisticly invoke the server action to demondstate the bug\nthen trigger the event or release the lock so the function can complete its normal operatioan and show it gets to active\n\n\nhttps://github.com/openstack/nova/blob/d71abb1dcc7e9483f7bb2bfa0d3b4ca2372810d4/nova/tests/functional/regressions/test_bug_2085975.py#L71-L128\n\nand \n\nhttps://github.com/openstack/nova/blob/d71abb1dcc7e9483f7bb2bfa0d3b4ca2372810d4/nova/tests/functional/regressions/test_bug_2088066.py#L41-L101\n\ndemonstrate how to do this properly.","commit_id":"ed16482c1c5f7be058990979567e612b530b86f3"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"095b73a070ff20f93630f6d4a0eedfb2ee1beece","unresolved":true,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    CAST_AS_CALL \u003d False"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    @mock.patch("},{"line_number":29,"context_line":"        \u0027nova.conductor.manager.ComputeTaskManager.\u0027"},{"line_number":30,"context_line":"        \u0027schedule_and_build_instances\u0027)"},{"line_number":31,"context_line":"    def test_lock_without_instance_record(self, mocked_scheduled_and_build):"},{"line_number":32,"context_line":"        request_body \u003d self._build_server()"},{"line_number":33,"context_line":"        server \u003d self.api.post_server({\u0027server\u0027: request_body})"}],"source_content_type":"text/x-python","patch_set":2,"id":"efe034f3_7687658b","line":30,"range":{"start_line":28,"start_character":0,"end_line":30,"end_character":39},"in_reply_to":"0d0aa15d_b8c0c84f","updated":"2026-07-15 10:13:11.000000000","message":"where its mocked does not matter\n\nin the functional test we are running the API, scheduler, conductor and compute agent\n\nwe try to avoid mocking any nova code in functional tests and instead mock only at the edges i.e. mock the libvirt interaction or use SQLite to provide a db or mock rabbitmq.\n\nwe do not want to simulate a failure via using mocks we want to simulate the failure via reproducing the input or in this this case by wrapping the real code\nand adding threading event or locks to make the execution order deterministic\n\nthat part of the core design of our functionl regressions suite and want make it more powerful then our unit test suite for testing multi process interactions.","commit_id":"ed16482c1c5f7be058990979567e612b530b86f3"},{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"0689427905bb131ea272a0ef865e480adcbea2b9","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    CAST_AS_CALL \u003d False"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    @mock.patch("},{"line_number":29,"context_line":"        \u0027nova.conductor.manager.ComputeTaskManager.\u0027"},{"line_number":30,"context_line":"        \u0027schedule_and_build_instances\u0027)"},{"line_number":31,"context_line":"    def test_lock_without_instance_record(self, mocked_scheduled_and_build):"},{"line_number":32,"context_line":"        request_body \u003d self._build_server()"},{"line_number":33,"context_line":"        server \u003d self.api.post_server({\u0027server\u0027: request_body})"}],"source_content_type":"text/x-python","patch_set":2,"id":"0d0aa15d_b8c0c84f","line":30,"range":{"start_line":28,"start_character":0,"end_line":30,"end_character":39},"in_reply_to":"b288e60a_bf4affee","updated":"2026-07-15 07:03:52.000000000","message":"oops, please ignore my previous reply. I missed this mocked compute manager instead the conductor manager.\n\nUpdated the test scenario following your comment. thanks.","commit_id":"ed16482c1c5f7be058990979567e612b530b86f3"},{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"f260460e336f59b042c223bd7f8d4ea093d18ecf","unresolved":true,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    CAST_AS_CALL \u003d False"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    @mock.patch("},{"line_number":29,"context_line":"        \u0027nova.conductor.manager.ComputeTaskManager.\u0027"},{"line_number":30,"context_line":"        \u0027schedule_and_build_instances\u0027)"},{"line_number":31,"context_line":"    def test_lock_without_instance_record(self, mocked_scheduled_and_build):"},{"line_number":32,"context_line":"        request_body \u003d self._build_server()"},{"line_number":33,"context_line":"        server \u003d self.api.post_server({\u0027server\u0027: request_body})"}],"source_content_type":"text/x-python","patch_set":2,"id":"b288e60a_bf4affee","line":30,"range":{"start_line":28,"start_character":0,"end_line":30,"end_character":39},"in_reply_to":"e713e65c_2ff254f9","updated":"2026-07-15 02:35:13.000000000","message":"I may get your point.  The reproducer should simulate not only the 500 Error but the completion of its server creation even though some action API come in, shouldn\u0027t it?\n\nThe schedule_and_build_instances method on the compute manager is implemented as a Cast RPC, so no one checks the mocked return value.","commit_id":"ed16482c1c5f7be058990979567e612b530b86f3"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"b6f7f29a499e05062ba8284bf4a3da479b1b20b2","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    CAST_AS_CALL \u003d False"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    @mock.patch("},{"line_number":29,"context_line":"        \u0027nova.conductor.manager.ComputeTaskManager.\u0027"},{"line_number":30,"context_line":"        \u0027schedule_and_build_instances\u0027)"},{"line_number":31,"context_line":"    def test_lock_without_instance_record(self, mocked_scheduled_and_build):"},{"line_number":32,"context_line":"        request_body \u003d self._build_server()"},{"line_number":33,"context_line":"        server \u003d self.api.post_server({\u0027server\u0027: request_body})"}],"source_content_type":"text/x-python","patch_set":2,"id":"8c2877bb_f608ba3a","line":30,"range":{"start_line":28,"start_character":0,"end_line":30,"end_character":39},"in_reply_to":"efe034f3_7687658b","updated":"2026-07-15 10:16:59.000000000","message":"looking at v3 this is much better","commit_id":"ed16482c1c5f7be058990979567e612b530b86f3"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"b6f7f29a499e05062ba8284bf4a3da479b1b20b2","unresolved":true,"context_lines":[{"line_number":62,"context_line":"        # Resume the server creation."},{"line_number":63,"context_line":"        self.contd.set()"},{"line_number":64,"context_line":"        self._wait_for_state_change(server, \u0027ACTIVE\u0027)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        # Ensure the lock action API works after the server launched."},{"line_number":67,"context_line":"        kwargs \u003d {"},{"line_number":68,"context_line":"            \"check_response_status\": [202]"},{"line_number":69,"context_line":"        }"},{"line_number":70,"context_line":"        self.api.post_server_action(server[\u0027id\u0027], {\"lock\": None}, **kwargs)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    @mock.patch("},{"line_number":73,"context_line":"        \u0027nova.conductor.manager.ComputeTaskManager.\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"8f673d77_73233224","line":70,"range":{"start_line":65,"start_character":1,"end_line":70,"end_character":75},"updated":"2026-07-15 10:16:59.000000000","message":"we dont actully need this part but its ok to keep\n\n\nself._wait_for_state_change(server, \u0027ACTIVE\u0027) demonstrates that there isnt a fault in the server creation but this is also fine","commit_id":"6eac583ec31aedba5c3221d37bb26f6940f941f2"}]}
