)]}'
{"nova/tests/functional/regressions/test_bug_1833581.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f4001bfaae3308a0c7287715348836dc38c5f003","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":2,"context_line":"# not use this file except in compliance with the License. You may obtain"},{"line_number":3,"context_line":"# a copy of the License at"},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_029677f1","line":1,"updated":"2019-07-30 22:38:04.000000000","message":"You\u0027ve got this in the regressions subdirectory but this isn\u0027t really a regression is it? As far as I can tell this is extremely latent behavior so it\u0027s just a bug. How about throwing it in nova/tests/functional/compute/test_init_host.py like I did here?\n\nhttps://review.opendev.org/#/c/670393/5/nova/tests/functional/compute/test_init_host.py","commit_id":"d2e800bc90284bf42487d8b91fc7cad96c2aa391"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3ea689271bbf1a6ac15b89d72b80788924734169","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":2,"context_line":"# not use this file except in compliance with the License. You may obtain"},{"line_number":3,"context_line":"# a copy of the License at"},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_6ba04791","line":1,"in_reply_to":"7faddb67_029677f1","updated":"2019-08-01 15:59:02.000000000","message":"Done","commit_id":"d2e800bc90284bf42487d8b91fc7cad96c2aa391"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f4001bfaae3308a0c7287715348836dc38c5f003","unresolved":false,"context_lines":[{"line_number":30,"context_line":"        self.flavor1 \u003d flavors[0]"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def test_restart_compute_while_instance_waiting_for_resource_claim(self):"},{"line_number":33,"context_line":"        \"\"\"Regression test for bug 1833581 where an instance is stuck in"},{"line_number":34,"context_line":"        BUILD state forever due to compute service is restarted before the"},{"line_number":35,"context_line":"        resource claim finished."},{"line_number":36,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_e2a0fb44","line":33,"range":{"start_line":33,"start_character":11,"end_line":33,"end_character":21},"updated":"2019-07-30 22:38:04.000000000","message":"I think we could nix this unless we can identify something that actually regressed some earlier behavior.","commit_id":"d2e800bc90284bf42487d8b91fc7cad96c2aa391"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3ea689271bbf1a6ac15b89d72b80788924734169","unresolved":false,"context_lines":[{"line_number":30,"context_line":"        self.flavor1 \u003d flavors[0]"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def test_restart_compute_while_instance_waiting_for_resource_claim(self):"},{"line_number":33,"context_line":"        \"\"\"Regression test for bug 1833581 where an instance is stuck in"},{"line_number":34,"context_line":"        BUILD state forever due to compute service is restarted before the"},{"line_number":35,"context_line":"        resource claim finished."},{"line_number":36,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_0ba9937a","line":33,"range":{"start_line":33,"start_character":11,"end_line":33,"end_character":21},"in_reply_to":"7faddb67_e2a0fb44","updated":"2019-08-01 15:59:02.000000000","message":"Done","commit_id":"d2e800bc90284bf42487d8b91fc7cad96c2aa391"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f4001bfaae3308a0c7287715348836dc38c5f003","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        \"\"\""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        # To reproduce the problem we need to stop / kill the compute service"},{"line_number":39,"context_line":"        # when an instance build request is already reached the service but"},{"line_number":40,"context_line":"        # the instance_claim() have not been finished. One way that this"},{"line_number":41,"context_line":"        # happens in practice is when multiple builds are waiting for the"},{"line_number":42,"context_line":"        # \u0027nova-compute-resource\u0027 semaphore. So one way to reproduce this in"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_628c0bd7","line":39,"range":{"start_line":39,"start_character":41,"end_line":39,"end_character":43},"updated":"2019-07-30 22:38:04.000000000","message":"has","commit_id":"d2e800bc90284bf42487d8b91fc7cad96c2aa391"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3ea689271bbf1a6ac15b89d72b80788924734169","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        \"\"\""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        # To reproduce the problem we need to stop / kill the compute service"},{"line_number":39,"context_line":"        # when an instance build request is already reached the service but"},{"line_number":40,"context_line":"        # the instance_claim() have not been finished. One way that this"},{"line_number":41,"context_line":"        # happens in practice is when multiple builds are waiting for the"},{"line_number":42,"context_line":"        # \u0027nova-compute-resource\u0027 semaphore. So one way to reproduce this in"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_abb39fe8","line":39,"range":{"start_line":39,"start_character":41,"end_line":39,"end_character":43},"in_reply_to":"7faddb67_628c0bd7","updated":"2019-08-01 15:59:02.000000000","message":"Done","commit_id":"d2e800bc90284bf42487d8b91fc7cad96c2aa391"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f4001bfaae3308a0c7287715348836dc38c5f003","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        # To reproduce the problem we need to stop / kill the compute service"},{"line_number":39,"context_line":"        # when an instance build request is already reached the service but"},{"line_number":40,"context_line":"        # the instance_claim() have not been finished. One way that this"},{"line_number":41,"context_line":"        # happens in practice is when multiple builds are waiting for the"},{"line_number":42,"context_line":"        # \u0027nova-compute-resource\u0027 semaphore. So one way to reproduce this in"},{"line_number":43,"context_line":"        # the test would be to grab that semaphore, boot an instance, wait for"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_02bf5761","line":40,"range":{"start_line":40,"start_character":31,"end_line":40,"end_character":53},"updated":"2019-07-30 22:38:04.000000000","message":"has not finished","commit_id":"d2e800bc90284bf42487d8b91fc7cad96c2aa391"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3ea689271bbf1a6ac15b89d72b80788924734169","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        # To reproduce the problem we need to stop / kill the compute service"},{"line_number":39,"context_line":"        # when an instance build request is already reached the service but"},{"line_number":40,"context_line":"        # the instance_claim() have not been finished. One way that this"},{"line_number":41,"context_line":"        # happens in practice is when multiple builds are waiting for the"},{"line_number":42,"context_line":"        # \u0027nova-compute-resource\u0027 semaphore. So one way to reproduce this in"},{"line_number":43,"context_line":"        # the test would be to grab that semaphore, boot an instance, wait for"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_4bcc6b69","line":40,"range":{"start_line":40,"start_character":31,"end_line":40,"end_character":53},"in_reply_to":"7faddb67_02bf5761","updated":"2019-08-01 15:59:02.000000000","message":"Done","commit_id":"d2e800bc90284bf42487d8b91fc7cad96c2aa391"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f4001bfaae3308a0c7287715348836dc38c5f003","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        # it to reach the compute then stop the compute."},{"line_number":45,"context_line":"        # Unfortunately when we release the semaphore after the simulated"},{"line_number":46,"context_line":"        # compute restart the original instance_claim execution continues as"},{"line_number":47,"context_line":"        # the stopped compute doesn\u0027t 100% stopped in the func test env. Also"},{"line_number":48,"context_line":"        # we cannot really keep the semaphore forever as this named semaphore"},{"line_number":49,"context_line":"        # is shared between the old and new compute service."},{"line_number":50,"context_line":"        # There is another way to trigger the issue. We can inject a sleep into"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_82b26793","line":47,"range":{"start_line":47,"start_character":30,"end_line":47,"end_character":37},"updated":"2019-07-30 22:38:04.000000000","message":"is not","commit_id":"d2e800bc90284bf42487d8b91fc7cad96c2aa391"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3ea689271bbf1a6ac15b89d72b80788924734169","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        # it to reach the compute then stop the compute."},{"line_number":45,"context_line":"        # Unfortunately when we release the semaphore after the simulated"},{"line_number":46,"context_line":"        # compute restart the original instance_claim execution continues as"},{"line_number":47,"context_line":"        # the stopped compute doesn\u0027t 100% stopped in the func test env. Also"},{"line_number":48,"context_line":"        # we cannot really keep the semaphore forever as this named semaphore"},{"line_number":49,"context_line":"        # is shared between the old and new compute service."},{"line_number":50,"context_line":"        # There is another way to trigger the issue. We can inject a sleep into"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_0bc2f334","line":47,"range":{"start_line":47,"start_character":30,"end_line":47,"end_character":37},"in_reply_to":"7faddb67_82b26793","updated":"2019-08-01 15:59:02.000000000","message":"Done","commit_id":"d2e800bc90284bf42487d8b91fc7cad96c2aa391"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f4001bfaae3308a0c7287715348836dc38c5f003","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        # the stopped compute doesn\u0027t 100% stopped in the func test env. Also"},{"line_number":48,"context_line":"        # we cannot really keep the semaphore forever as this named semaphore"},{"line_number":49,"context_line":"        # is shared between the old and new compute service."},{"line_number":50,"context_line":"        # There is another way to trigger the issue. We can inject a sleep into"},{"line_number":51,"context_line":"        # instance_claim() to stop it. This is less realistic but it works in"},{"line_number":52,"context_line":"        # the test env."},{"line_number":53,"context_line":"        self.flags(instance_build_timeout\u003d1)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        server_req \u003d self._build_minimal_create_server_request("}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_42a8ef1e","line":52,"range":{"start_line":50,"start_character":10,"end_line":52,"end_character":23},"updated":"2019-07-30 22:38:04.000000000","message":"Yeah this is similar to what I needed to do here:\n\nhttps://review.opendev.org/#/c/670393/5/nova/tests/functional/compute/test_init_host.py","commit_id":"d2e800bc90284bf42487d8b91fc7cad96c2aa391"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f4001bfaae3308a0c7287715348836dc38c5f003","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        # There is another way to trigger the issue. We can inject a sleep into"},{"line_number":51,"context_line":"        # instance_claim() to stop it. This is less realistic but it works in"},{"line_number":52,"context_line":"        # the test env."},{"line_number":53,"context_line":"        self.flags(instance_build_timeout\u003d1)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        server_req \u003d self._build_minimal_create_server_request("},{"line_number":56,"context_line":"            self.api, \u0027interrupted-server\u0027, flavor_id\u003dself.flavor1[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_c2429f68","line":53,"updated":"2019-07-30 22:38:04.000000000","message":"Set this before calling _check_instance_build_time so it\u0027s a bit more clear why this is configured?","commit_id":"d2e800bc90284bf42487d8b91fc7cad96c2aa391"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3ea689271bbf1a6ac15b89d72b80788924734169","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        # There is another way to trigger the issue. We can inject a sleep into"},{"line_number":51,"context_line":"        # instance_claim() to stop it. This is less realistic but it works in"},{"line_number":52,"context_line":"        # the test env."},{"line_number":53,"context_line":"        self.flags(instance_build_timeout\u003d1)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        server_req \u003d self._build_minimal_create_server_request("},{"line_number":56,"context_line":"            self.api, \u0027interrupted-server\u0027, flavor_id\u003dself.flavor1[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_cbddbb14","line":53,"in_reply_to":"7faddb67_c2429f68","updated":"2019-08-01 15:59:02.000000000","message":"Done","commit_id":"d2e800bc90284bf42487d8b91fc7cad96c2aa391"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f4001bfaae3308a0c7287715348836dc38c5f003","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        server_req \u003d self._build_minimal_create_server_request("},{"line_number":56,"context_line":"            self.api, \u0027interrupted-server\u0027, flavor_id\u003dself.flavor1[\u0027id\u0027],"},{"line_number":57,"context_line":"            image_uuid\u003d\u0027155d900f-4e14-4e4c-a73d-069cbf4541e6\u0027,"},{"line_number":58,"context_line":"            networks\u003d\u0027none\u0027, az\u003d\u0027nova:host1\u0027)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        def sleep_forever(*args, **kwargs):"},{"line_number":61,"context_line":"            time.sleep(1000000)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_226933f8","line":58,"range":{"start_line":58,"start_character":29,"end_line":58,"end_character":44},"updated":"2019-07-30 22:38:04.000000000","message":"Don\u0027t really need this do we? There is only one compute so you\u0027re going to land on it.","commit_id":"d2e800bc90284bf42487d8b91fc7cad96c2aa391"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3ea689271bbf1a6ac15b89d72b80788924734169","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        server_req \u003d self._build_minimal_create_server_request("},{"line_number":56,"context_line":"            self.api, \u0027interrupted-server\u0027, flavor_id\u003dself.flavor1[\u0027id\u0027],"},{"line_number":57,"context_line":"            image_uuid\u003d\u0027155d900f-4e14-4e4c-a73d-069cbf4541e6\u0027,"},{"line_number":58,"context_line":"            networks\u003d\u0027none\u0027, az\u003d\u0027nova:host1\u0027)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        def sleep_forever(*args, **kwargs):"},{"line_number":61,"context_line":"            time.sleep(1000000)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_ebe2f7d4","line":58,"range":{"start_line":58,"start_character":29,"end_line":58,"end_character":44},"in_reply_to":"7faddb67_226933f8","updated":"2019-08-01 15:59:02.000000000","message":"Done","commit_id":"d2e800bc90284bf42487d8b91fc7cad96c2aa391"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f4001bfaae3308a0c7287715348836dc38c5f003","unresolved":false,"context_lines":[{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        # This is bug 1833581 as the server remains in BUILD state after the"},{"line_number":77,"context_line":"        # compute restart."},{"line_number":78,"context_line":"        self._wait_for_state_change(self.admin_api, server, \u0027BUILD\u0027)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        # Not even the periodic task push this server to ERROR"},{"line_number":81,"context_line":"        self.compute1.manager._check_instance_build_time("}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_6253ab3a","line":78,"updated":"2019-07-30 22:38:04.000000000","message":"Is there something on restart processing of the instance that we could check to make sure the instance was processed on restart, like something in the logs? Although I guess _init_instance won\u0027t be called because the instance.host isn\u0027t set:\n\nhttps://github.com/openstack/nova/blob/78ce2e89e566df28e0c802c8a1891d7065fbdcf6/nova/compute/manager.py#L1261","commit_id":"d2e800bc90284bf42487d8b91fc7cad96c2aa391"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"4dc70c07ec102978e303418c5500339a61fedd7b","unresolved":false,"context_lines":[{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        # This is bug 1833581 as the server remains in BUILD state after the"},{"line_number":77,"context_line":"        # compute restart."},{"line_number":78,"context_line":"        self._wait_for_state_change(self.admin_api, server, \u0027BUILD\u0027)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        # Not even the periodic task push this server to ERROR"},{"line_number":81,"context_line":"        self.compute1.manager._check_instance_build_time("}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_5f25d05a","line":78,"in_reply_to":"7faddb67_6253ab3a","updated":"2019-08-06 08:51:23.000000000","message":"This instance is simply not processed due to the filter you linked.","commit_id":"d2e800bc90284bf42487d8b91fc7cad96c2aa391"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f4001bfaae3308a0c7287715348836dc38c5f003","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        # compute restart."},{"line_number":78,"context_line":"        self._wait_for_state_change(self.admin_api, server, \u0027BUILD\u0027)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        # Not even the periodic task push this server to ERROR"},{"line_number":81,"context_line":"        self.compute1.manager._check_instance_build_time("},{"line_number":82,"context_line":"            context.get_admin_context())"},{"line_number":83,"context_line":"        server \u003d self.admin_api.get_server(server[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_627acbba","line":80,"updated":"2019-07-30 22:38:04.000000000","message":"Maybe mention this is because the server host is still None since the instance_claim didn\u0027t set it.","commit_id":"d2e800bc90284bf42487d8b91fc7cad96c2aa391"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3ea689271bbf1a6ac15b89d72b80788924734169","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        # compute restart."},{"line_number":78,"context_line":"        self._wait_for_state_change(self.admin_api, server, \u0027BUILD\u0027)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        # Not even the periodic task push this server to ERROR"},{"line_number":81,"context_line":"        self.compute1.manager._check_instance_build_time("},{"line_number":82,"context_line":"            context.get_admin_context())"},{"line_number":83,"context_line":"        server \u003d self.admin_api.get_server(server[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_8be343d8","line":80,"in_reply_to":"7faddb67_627acbba","updated":"2019-08-01 15:59:02.000000000","message":"Done","commit_id":"d2e800bc90284bf42487d8b91fc7cad96c2aa391"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f4001bfaae3308a0c7287715348836dc38c5f003","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        self.compute1.manager._check_instance_build_time("},{"line_number":82,"context_line":"            context.get_admin_context())"},{"line_number":83,"context_line":"        server \u003d self.admin_api.get_server(server[\u0027id\u0027])"},{"line_number":84,"context_line":"        self.assertEqual(\u0027BUILD\u0027, server[\u0027status\u0027])"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        # We expect that the instance is pushed to ERROR state during the"},{"line_number":87,"context_line":"        # compute restart."}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_82602703","line":84,"updated":"2019-07-30 22:38:04.000000000","message":"nit: assert the host is also None?","commit_id":"d2e800bc90284bf42487d8b91fc7cad96c2aa391"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3ea689271bbf1a6ac15b89d72b80788924734169","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        self.compute1.manager._check_instance_build_time("},{"line_number":82,"context_line":"            context.get_admin_context())"},{"line_number":83,"context_line":"        server \u003d self.admin_api.get_server(server[\u0027id\u0027])"},{"line_number":84,"context_line":"        self.assertEqual(\u0027BUILD\u0027, server[\u0027status\u0027])"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        # We expect that the instance is pushed to ERROR state during the"},{"line_number":87,"context_line":"        # compute restart."}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_4bd1cbfa","line":84,"in_reply_to":"7faddb67_82602703","updated":"2019-08-01 15:59:02.000000000","message":"Done","commit_id":"d2e800bc90284bf42487d8b91fc7cad96c2aa391"}]}
