)]}'
{"nova/tests/functional/regressions/test_bug_1679750.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"e65e256d586e3c94e47ef78a3a3e8c98aac93a01","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        for usage in usages_during.values():"},{"line_number":96,"context_line":"            self.assertNotEqual(0, usage)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        # Stop the compute service and sleep to trigger local delete."},{"line_number":99,"context_line":"        self.compute.stop()"},{"line_number":100,"context_line":"        time.sleep(2)"},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7f231b9d_8099b720","line":98,"updated":"2017-06-09 22:40:33.000000000","message":"I had to read the bug very closely to understand what \"local delete\" meant, but once I finally got it I was all \"right on\", nice test.","commit_id":"20d1e28df6650fd02501e2d9bae767f049e41697"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a9151a97b75b28c04efb560c306c24544bf13a30","unresolved":false,"context_lines":[{"line_number":25,"context_line":"                                 integrated_helpers.InstanceHelperMixin):"},{"line_number":26,"context_line":"    def setUp(self):"},{"line_number":27,"context_line":"        super(TestLocalDeleteAllocations, self).setUp()"},{"line_number":28,"context_line":"        # Set the service_down_time and report_interval lower to trigger the"},{"line_number":29,"context_line":"        # local delete path faster."},{"line_number":30,"context_line":"        self.flags(service_down_time\u003d2)"},{"line_number":31,"context_line":"        self.flags(report_interval\u003d1)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"        self.useFixture(policy_fixture.RealPolicyFixture())"},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"df3967d1_a0a2c8ac","line":31,"range":{"start_line":28,"start_character":8,"end_line":31,"end_character":37},"updated":"2017-08-03 14:36:58.000000000","message":"Could we just force-down the compute service?\n\nhttps://developer.openstack.org/api-ref/compute/#update-compute-service\n\ngibi did something similar here:\n\nhttps://review.openstack.org/#/c/489973/6/nova/tests/functional/test_servers.py@1535\n\nNote that you\u0027d need to set the api microversion to \u0027latest\u0027 if you\u0027re going to follow the API that gibi is using there, otherwise you need to use PUT /os-services/force-down but that\u0027s deprecated now.","commit_id":"5c7703bb8acc562683a080b454584e7a05c85926"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a9151a97b75b28c04efb560c306c24544bf13a30","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def _get_usages(self, rp_uuid):"},{"line_number":68,"context_line":"        fmt \u003d \u0027/resource_providers/%(uuid)s/usages\u0027"},{"line_number":69,"context_line":"        resp \u003d self.placement_api._fake_get(None, fmt % {\u0027uuid\u0027: rp_uuid})"},{"line_number":70,"context_line":"        return resp.json()[\u0027usages\u0027]"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def test_local_delete_removes_allocations(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"df3967d1_600bc07c","line":69,"range":{"start_line":69,"start_character":15,"end_line":69,"end_character":43},"updated":"2017-08-03 14:36:58.000000000","message":"There is a cleaner way for this now:\n\nhttps://review.openstack.org/#/c/487958/22/nova/tests/fixtures.py\n\nhttps://review.openstack.org/#/c/487958/22/nova/tests/functional/test_servers.py@1134","commit_id":"5c7703bb8acc562683a080b454584e7a05c85926"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a9151a97b75b28c04efb560c306c24544bf13a30","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        have been cleaned up."},{"line_number":78,"context_line":"        \"\"\""},{"line_number":79,"context_line":"        # Get allocations, make sure they are 0."},{"line_number":80,"context_line":"        resp \u003d self.placement_api._fake_get(None, \u0027/resource_providers\u0027)"},{"line_number":81,"context_line":"        rp_uuid \u003d resp.json()[\u0027resource_providers\u0027][0][\u0027uuid\u0027]"},{"line_number":82,"context_line":"        usages_before \u003d self._get_usages(rp_uuid)"},{"line_number":83,"context_line":"        for usage in usages_before.values():"}],"source_content_type":"text/x-python","patch_set":3,"id":"df3967d1_a07ac8ed","line":80,"range":{"start_line":80,"start_character":15,"end_line":80,"end_character":43},"updated":"2017-08-03 14:36:58.000000000","message":"same as above","commit_id":"5c7703bb8acc562683a080b454584e7a05c85926"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a9151a97b75b28c04efb560c306c24544bf13a30","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            self.assertEqual(0, usage)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        # Create a server."},{"line_number":87,"context_line":"        server \u003d dict(name\u003d\u0027local-delete-test\u0027,"},{"line_number":88,"context_line":"                      imageRef\u003dself.image_id,"},{"line_number":89,"context_line":"                      flavorRef\u003dself.flavor_id)"},{"line_number":90,"context_line":"        server \u003d self.api.post_server({\u0027server\u0027: server})"},{"line_number":91,"context_line":"        server \u003d self._wait_for_state_change(self.api, server, \u0027ACTIVE\u0027)"},{"line_number":92,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"df3967d1_008754b7","line":89,"range":{"start_line":87,"start_character":8,"end_line":89,"end_character":47},"updated":"2017-08-03 14:36:58.000000000","message":"Since you\u0027re using the InstanceHelperMixin, you could use _build_minimal_create_server_request in that mixin class, and pass networks\u003d\u0027none\u0027 (with the \u0027latest\u0027 microversion), and then no networking will be attempted, which might save you some of the networking stubs, like set_stub_network_methods.","commit_id":"5c7703bb8acc562683a080b454584e7a05c85926"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"022c1edf064d86c915c3b0277018c406fde7c1ee","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            self.assertEqual(0, usage)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        # Create a server."},{"line_number":87,"context_line":"        server \u003d dict(name\u003d\u0027local-delete-test\u0027,"},{"line_number":88,"context_line":"                      imageRef\u003dself.image_id,"},{"line_number":89,"context_line":"                      flavorRef\u003dself.flavor_id)"},{"line_number":90,"context_line":"        server \u003d self.api.post_server({\u0027server\u0027: server})"},{"line_number":91,"context_line":"        server \u003d self._wait_for_state_change(self.api, server, \u0027ACTIVE\u0027)"},{"line_number":92,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bf3e73b7_381b221c","line":89,"range":{"start_line":87,"start_character":8,"end_line":89,"end_character":47},"in_reply_to":"bf3e73b7_028a2f1a","updated":"2017-08-07 20:59:29.000000000","message":"lol, ++","commit_id":"5c7703bb8acc562683a080b454584e7a05c85926"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9196a9eb293aae19ab50082103d8be81df784d58","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            self.assertEqual(0, usage)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        # Create a server."},{"line_number":87,"context_line":"        server \u003d dict(name\u003d\u0027local-delete-test\u0027,"},{"line_number":88,"context_line":"                      imageRef\u003dself.image_id,"},{"line_number":89,"context_line":"                      flavorRef\u003dself.flavor_id)"},{"line_number":90,"context_line":"        server \u003d self.api.post_server({\u0027server\u0027: server})"},{"line_number":91,"context_line":"        server \u003d self._wait_for_state_change(self.api, server, \u0027ACTIVE\u0027)"},{"line_number":92,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bf3e73b7_028a2f1a","line":89,"range":{"start_line":87,"start_character":8,"end_line":89,"end_character":47},"in_reply_to":"df3967d1_008754b7","updated":"2017-08-07 19:34:11.000000000","message":"I think you might be thinking of the HamburgerHelperMixin.","commit_id":"5c7703bb8acc562683a080b454584e7a05c85926"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a9151a97b75b28c04efb560c306c24544bf13a30","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            self.assertNotEqual(0, usage)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        # Stop the compute service and sleep to trigger local delete."},{"line_number":99,"context_line":"        self.compute.stop()"},{"line_number":100,"context_line":"        time.sleep(2)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        # Delete the server."},{"line_number":103,"context_line":"        self.api.delete_server(server[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"df3967d1_20b3789a","line":100,"range":{"start_line":99,"start_character":8,"end_line":100,"end_character":21},"updated":"2017-08-03 14:36:58.000000000","message":"force-down would allow us to avoid the sleep, but maybe you need to restart the compute service anyway to run the update_available_resource code to \u0027heal\u0027 the allocations?","commit_id":"5c7703bb8acc562683a080b454584e7a05c85926"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9196a9eb293aae19ab50082103d8be81df784d58","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        self.compute.stop()"},{"line_number":100,"context_line":"        time.sleep(2)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        # Delete the server."},{"line_number":103,"context_line":"        self.api.delete_server(server[\u0027id\u0027])"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        # Start the compute service again."}],"source_content_type":"text/x-python","patch_set":3,"id":"bf3e73b7_028fcf23","line":102,"updated":"2017-08-07 19:34:11.000000000","message":"might add a comment above that this will trigger the \"local delete\" since the compute service is down.","commit_id":"5c7703bb8acc562683a080b454584e7a05c85926"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a9151a97b75b28c04efb560c306c24544bf13a30","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        # Delete the server."},{"line_number":103,"context_line":"        self.api.delete_server(server[\u0027id\u0027])"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        # Start the compute service again."},{"line_number":106,"context_line":"        self.compute.start()"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        # Get the allocations again to check against the original."}],"source_content_type":"text/x-python","patch_set":3,"id":"df3967d1_007514cb","line":105,"range":{"start_line":105,"start_character":8,"end_line":105,"end_character":42},"updated":"2017-08-03 14:36:58.000000000","message":"I\u0027d add a comment that this calls the update_available_resource code in the ResourceTracker which is what eventually \"heals\" the allocations for the deleted instance.","commit_id":"5c7703bb8acc562683a080b454584e7a05c85926"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"41770b0312c25781f74e266e277dd57633034433","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        for usage in usages_during.values():"},{"line_number":82,"context_line":"            self.assertNotEqual(0, usage)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        # Disable compute to trigger local delete."},{"line_number":85,"context_line":"        compute_service_id \u003d self.admin_api.get_services("},{"line_number":86,"context_line":"            host\u003dself.compute.host, binary\u003d\u0027nova-compute\u0027)[0][\u0027id\u0027]"},{"line_number":87,"context_line":"        self.admin_api.put_service(compute_service_id, {\u0027status\u0027: \u0027disabled\u0027})"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f436f4f_a3cb7ba3","line":84,"range":{"start_line":84,"start_character":8,"end_line":84,"end_character":50},"updated":"2017-08-08 19:47:37.000000000","message":"You want to force it down:\n\nhttps://github.com/openstack/nova/blob/master/nova/servicegroup/api.py#L77\n\nThat\u0027s what the API is checking:\n\nhttps://github.com/openstack/nova/blob/master/nova/compute/api.py#L1900\n\nYou\u0027d still have to kill the service and restart it though to run the update_available_resource code (credit to Dan for that).","commit_id":"aa78cce42db2b1f3fab6b7543aa177f13bda34cc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f12f4214324835b48ac3cfee0f6719c756cdb2da","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        # Delete the server (will be a local delete because compute is down)."},{"line_number":90,"context_line":"        self.api.delete_server(server[\u0027id\u0027])"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        # Enable the compute service again. When it comes up, it will call the"},{"line_number":93,"context_line":"        # update_available_resource code in the ResourceTracker which is what"},{"line_number":94,"context_line":"        # eventually \"heals\" the allocations for the deleted instance."},{"line_number":95,"context_line":"        self.admin_api.put_service(compute_service_id, {\u0027status\u0027: \u0027enabled\u0027})"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        # Get the allocations again to check against the original."},{"line_number":98,"context_line":"        usages_after \u003d self._get_usages(rp_uuid)"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        # They should match."},{"line_number":101,"context_line":"        self.assertEqual(usages_before, usages_after)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f436f4f_aa835004","line":101,"range":{"start_line":92,"start_character":8,"end_line":101,"end_character":53},"updated":"2017-08-08 17:54:28.000000000","message":"Isn\u0027t this going to be racy? What if we\u0027re getting usages before the update_available_resource runs?","commit_id":"aa78cce42db2b1f3fab6b7543aa177f13bda34cc"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"62bc8661163d015c74bc8fdcc13fb96d62dd670d","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        # Delete the server (will be a local delete because compute is down)."},{"line_number":90,"context_line":"        self.api.delete_server(server[\u0027id\u0027])"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        # Enable the compute service again. When it comes up, it will call the"},{"line_number":93,"context_line":"        # update_available_resource code in the ResourceTracker which is what"},{"line_number":94,"context_line":"        # eventually \"heals\" the allocations for the deleted instance."},{"line_number":95,"context_line":"        self.admin_api.put_service(compute_service_id, {\u0027status\u0027: \u0027enabled\u0027})"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        # Get the allocations again to check against the original."},{"line_number":98,"context_line":"        usages_after \u003d self._get_usages(rp_uuid)"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        # They should match."},{"line_number":101,"context_line":"        self.assertEqual(usages_before, usages_after)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f436f4f_00a91d7a","line":101,"range":{"start_line":92,"start_character":8,"end_line":101,"end_character":53},"in_reply_to":"9f436f4f_aa835004","updated":"2017-08-08 19:21:21.000000000","message":"It seems like it would be racy. I\u0027ll try changing this to call update_available_resource directly.","commit_id":"aa78cce42db2b1f3fab6b7543aa177f13bda34cc"}]}
