)]}'
{"nova/compute/api.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"f93dd2871d469d2ae820a121c9bcf1ab6314bcae","unresolved":false,"context_lines":[{"line_number":1015,"context_line":""},{"line_number":1016,"context_line":"        # Commit the reservations"},{"line_number":1017,"context_line":"        quotas.commit()"},{"line_number":1018,"context_line":"        return instances"},{"line_number":1019,"context_line":""},{"line_number":1020,"context_line":"    def _get_bdm_image_metadata(self, context, block_device_mapping,"},{"line_number":1021,"context_line":"                                legacy_bdm\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":9,"id":"bab6814e_490e7435","line":1018,"updated":"2016-05-18 11:14:45.000000000","message":"should we not really return a list of build requests, that include all those instances, then pass that along to the conductor?","commit_id":"0b45f94c9ca77a6a371825cdb8104b00e5edd23e"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"a7866cd9290e1809d9eca74e01fa33ce86511705","unresolved":false,"context_lines":[{"line_number":1015,"context_line":""},{"line_number":1016,"context_line":"        # Commit the reservations"},{"line_number":1017,"context_line":"        quotas.commit()"},{"line_number":1018,"context_line":"        return instances"},{"line_number":1019,"context_line":""},{"line_number":1020,"context_line":"    def _get_bdm_image_metadata(self, context, block_device_mapping,"},{"line_number":1021,"context_line":"                                legacy_bdm\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":9,"id":"bab6814e_fbb0aa8d","line":1018,"in_reply_to":"bab6814e_490e7435","updated":"2016-05-18 20:53:40.000000000","message":"Longer term I would like to do something like that. But for now I\u0027ve been trying to stay flexible while we figure out what\u0027s going to work best. Like not passing BuildRequest over the wire has been useful for being able to modify it without keeping compatibility for older versions that see little or no use.","commit_id":"0b45f94c9ca77a6a371825cdb8104b00e5edd23e"}],"nova/conductor/manager.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"7b0c432f8afe76d69be2fced6edf1c1495f20a3b","unresolved":false,"context_lines":[{"line_number":365,"context_line":"                    instance.uuid)"},{"line_number":366,"context_line":"        except exception.BuildRequestNotFound:"},{"line_number":367,"context_line":"            LOG.debug(\u0027BuildRequest not found for instance %s, likely due to \u0027"},{"line_number":368,"context_line":"                      \u0027an older nova-api service running.\u0027 % instance.uuid)"},{"line_number":369,"context_line":"            return"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"        # The BuildRequest needs to be stored until the instance is mapped to"}],"source_content_type":"text/x-python","patch_set":8,"id":"dab17558_d43509f7","line":368,"range":{"start_line":368,"start_character":58,"end_line":368,"end_character":61},"updated":"2016-05-17 16:46:32.000000000","message":"Use a comma to avoid always formatting string even when not log level DEBUG","commit_id":"d2272b3ea32704bec98a1ff13b18f12e2d256cd0"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"4136de1fdbd896c33d6168252f6bf20cb5be66ff","unresolved":false,"context_lines":[{"line_number":365,"context_line":"                    instance.uuid)"},{"line_number":366,"context_line":"        except exception.BuildRequestNotFound:"},{"line_number":367,"context_line":"            LOG.debug(\u0027BuildRequest not found for instance %s, likely due to \u0027"},{"line_number":368,"context_line":"                      \u0027an older nova-api service running.\u0027 % instance.uuid)"},{"line_number":369,"context_line":"            return"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"        # The BuildRequest needs to be stored until the instance is mapped to"}],"source_content_type":"text/x-python","patch_set":8,"id":"dab17558_0dc94026","line":368,"range":{"start_line":368,"start_character":58,"end_line":368,"end_character":61},"in_reply_to":"dab17558_d43509f7","updated":"2016-05-17 17:40:41.000000000","message":"Done","commit_id":"d2272b3ea32704bec98a1ff13b18f12e2d256cd0"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"7b0c432f8afe76d69be2fced6edf1c1495f20a3b","unresolved":false,"context_lines":[{"line_number":371,"context_line":"        # The BuildRequest needs to be stored until the instance is mapped to"},{"line_number":372,"context_line":"        # an instance table. At that point it will never be used again and"},{"line_number":373,"context_line":"        # should be deleted."},{"line_number":374,"context_line":"        # TODO(alaski): Sync API updates to the build_request to the"},{"line_number":375,"context_line":"        # instance before it is destroyed. Right now only locked_by can"},{"line_number":376,"context_line":"        # be updated before this is destroyed."},{"line_number":377,"context_line":"        build_request.destroy()"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"    def _populate_instance_mapping(self, context, instance, host):"}],"source_content_type":"text/x-python","patch_set":8,"id":"dab17558_371e175f","line":376,"range":{"start_line":374,"start_character":8,"end_line":376,"end_character":46},"updated":"2016-05-17 16:46:32.000000000","message":"This should be easily done and contained in the BuildRequest.save code, I hope?","commit_id":"d2272b3ea32704bec98a1ff13b18f12e2d256cd0"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"4136de1fdbd896c33d6168252f6bf20cb5be66ff","unresolved":false,"context_lines":[{"line_number":371,"context_line":"        # The BuildRequest needs to be stored until the instance is mapped to"},{"line_number":372,"context_line":"        # an instance table. At that point it will never be used again and"},{"line_number":373,"context_line":"        # should be deleted."},{"line_number":374,"context_line":"        # TODO(alaski): Sync API updates to the build_request to the"},{"line_number":375,"context_line":"        # instance before it is destroyed. Right now only locked_by can"},{"line_number":376,"context_line":"        # be updated before this is destroyed."},{"line_number":377,"context_line":"        build_request.destroy()"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"    def _populate_instance_mapping(self, context, instance, host):"}],"source_content_type":"text/x-python","patch_set":8,"id":"dab17558_0d1ae07c","line":376,"range":{"start_line":374,"start_character":8,"end_line":376,"end_character":46},"in_reply_to":"dab17558_371e175f","updated":"2016-05-17 17:40:41.000000000","message":"Mostly. We end up with a slight overlap where the instance exists in the db but the mapping still points at the build_request. If a user locks/unlocks at that point the instance in the build_request will be updated and that change should be propagated to the cell db instance record. That will need to be done at the point that we switch the mapping from build_request to instance.","commit_id":"d2272b3ea32704bec98a1ff13b18f12e2d256cd0"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"f93dd2871d469d2ae820a121c9bcf1ab6314bcae","unresolved":false,"context_lines":[{"line_number":361,"context_line":""},{"line_number":362,"context_line":"    def _destroy_build_request(self, context, instance):"},{"line_number":363,"context_line":"        try:"},{"line_number":364,"context_line":"            build_request \u003d objects.BuildRequest.get_by_instance_uuid(context,"},{"line_number":365,"context_line":"                    instance.uuid)"},{"line_number":366,"context_line":"        except exception.BuildRequestNotFound:"},{"line_number":367,"context_line":"            LOG.debug(\u0027BuildRequest not found for instance %(uuid)s, likely \u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"bab6814e_c931c4ee","line":364,"updated":"2016-05-18 11:14:45.000000000","message":"I wonder if we could just pass this across the write, to reduce the need of this extra lookup?","commit_id":"0b45f94c9ca77a6a371825cdb8104b00e5edd23e"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"c71f1efde928e980cd294934678db0fce1224433","unresolved":false,"context_lines":[{"line_number":361,"context_line":""},{"line_number":362,"context_line":"    def _destroy_build_request(self, context, instance):"},{"line_number":363,"context_line":"        try:"},{"line_number":364,"context_line":"            build_request \u003d objects.BuildRequest.get_by_instance_uuid(context,"},{"line_number":365,"context_line":"                    instance.uuid)"},{"line_number":366,"context_line":"        except exception.BuildRequestNotFound:"},{"line_number":367,"context_line":"            LOG.debug(\u0027BuildRequest not found for instance %(uuid)s, likely \u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"bab6814e_cb15119c","line":364,"in_reply_to":"bab6814e_bb6d8206","updated":"2016-05-19 00:39:04.000000000","message":"So I wasn\u0027t thinking when I responded earlier. The next patch I\u0027m going to propose in this series adds a new conductor method which will take the BuildRequest as an argument. nova-api will call that method which will schedule, write the instance to the db, then remove the buildrequest. build_instances will remain for reschedules and will not need to deal with the buildrequest at all. So after that next patch this will no longer need to look up the buildrequest here.","commit_id":"0b45f94c9ca77a6a371825cdb8104b00e5edd23e"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"a7866cd9290e1809d9eca74e01fa33ce86511705","unresolved":false,"context_lines":[{"line_number":361,"context_line":""},{"line_number":362,"context_line":"    def _destroy_build_request(self, context, instance):"},{"line_number":363,"context_line":"        try:"},{"line_number":364,"context_line":"            build_request \u003d objects.BuildRequest.get_by_instance_uuid(context,"},{"line_number":365,"context_line":"                    instance.uuid)"},{"line_number":366,"context_line":"        except exception.BuildRequestNotFound:"},{"line_number":367,"context_line":"            LOG.debug(\u0027BuildRequest not found for instance %(uuid)s, likely \u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"bab6814e_bb6d8206","line":364,"in_reply_to":"bab6814e_c931c4ee","updated":"2016-05-18 20:53:40.000000000","message":"Eventually yes. I have a feeling there are a few changes that would be nice to do in the RPC API so I would like to stack them up and do it once we have a more clear idea on how this interaction should work.","commit_id":"0b45f94c9ca77a6a371825cdb8104b00e5edd23e"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"2dc80c09adfc8d0447103260c0bfc8ea5ebf14d4","unresolved":false,"context_lines":[{"line_number":366,"context_line":"        except exception.BuildRequestNotFound:"},{"line_number":367,"context_line":"            LOG.debug(\u0027BuildRequest not found for instance %(uuid)s, likely \u0027"},{"line_number":368,"context_line":"                      \u0027due to an older nova-api service running.\u0027,"},{"line_number":369,"context_line":"                      {\u0027uuid\u0027: instance.uuid})"},{"line_number":370,"context_line":"            return"},{"line_number":371,"context_line":""},{"line_number":372,"context_line":"        # The BuildRequest needs to be stored until the instance is mapped to"}],"source_content_type":"text/x-python","patch_set":9,"id":"dab17558_51b47434","line":369,"updated":"2016-05-18 02:00:25.000000000","message":"I think you could have just left it as LOG.debug(\u0027...%s...\u0027, instance.uuid) but this is cool too","commit_id":"0b45f94c9ca77a6a371825cdb8104b00e5edd23e"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"a7866cd9290e1809d9eca74e01fa33ce86511705","unresolved":false,"context_lines":[{"line_number":366,"context_line":"        except exception.BuildRequestNotFound:"},{"line_number":367,"context_line":"            LOG.debug(\u0027BuildRequest not found for instance %(uuid)s, likely \u0027"},{"line_number":368,"context_line":"                      \u0027due to an older nova-api service running.\u0027,"},{"line_number":369,"context_line":"                      {\u0027uuid\u0027: instance.uuid})"},{"line_number":370,"context_line":"            return"},{"line_number":371,"context_line":""},{"line_number":372,"context_line":"        # The BuildRequest needs to be stored until the instance is mapped to"}],"source_content_type":"text/x-python","patch_set":9,"id":"bab6814e_3bab521f","line":369,"in_reply_to":"dab17558_51b47434","updated":"2016-05-18 20:53:40.000000000","message":"Okay, wasn\u0027t sure on that.","commit_id":"0b45f94c9ca77a6a371825cdb8104b00e5edd23e"}],"nova/tests/unit/conductor/test_conductor.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"7b0c432f8afe76d69be2fced6edf1c1495f20a3b","unresolved":false,"context_lines":[{"line_number":766,"context_line":"        mock_get_by_host.assert_has_calls([mock.call(self.context, \u0027host1\u0027),"},{"line_number":767,"context_line":"                                           mock.call(self.context, \u0027host2\u0027)])"},{"line_number":768,"context_line":""},{"line_number":769,"context_line":"    @mock.patch.object(objects.Instance, \u0027refresh\u0027, new\u003dmock.MagicMock())"},{"line_number":770,"context_line":"    @mock.patch.object(objects.BuildRequest, \u0027get_by_instance_uuid\u0027)"},{"line_number":771,"context_line":"    @mock.patch.object(scheduler_client.SchedulerClient,"},{"line_number":772,"context_line":"                       \u0027select_destinations\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"dab17558_777edf19","line":769,"range":{"start_line":769,"start_character":52,"end_line":769,"end_character":72},"updated":"2016-05-17 16:46:32.000000000","message":"Aside: I know I suggested it but I\u0027m not sure if it\u0027s worthwhile. Sorry for bringing it up in the past :(","commit_id":"d2272b3ea32704bec98a1ff13b18f12e2d256cd0"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"4136de1fdbd896c33d6168252f6bf20cb5be66ff","unresolved":false,"context_lines":[{"line_number":766,"context_line":"        mock_get_by_host.assert_has_calls([mock.call(self.context, \u0027host1\u0027),"},{"line_number":767,"context_line":"                                           mock.call(self.context, \u0027host2\u0027)])"},{"line_number":768,"context_line":""},{"line_number":769,"context_line":"    @mock.patch.object(objects.Instance, \u0027refresh\u0027, new\u003dmock.MagicMock())"},{"line_number":770,"context_line":"    @mock.patch.object(objects.BuildRequest, \u0027get_by_instance_uuid\u0027)"},{"line_number":771,"context_line":"    @mock.patch.object(scheduler_client.SchedulerClient,"},{"line_number":772,"context_line":"                       \u0027select_destinations\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"dab17558_08280e85","line":769,"range":{"start_line":769,"start_character":52,"end_line":769,"end_character":72},"in_reply_to":"dab17558_777edf19","updated":"2016-05-17 17:40:41.000000000","message":"Heh.","commit_id":"d2272b3ea32704bec98a1ff13b18f12e2d256cd0"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"7b0c432f8afe76d69be2fced6edf1c1495f20a3b","unresolved":false,"context_lines":[{"line_number":855,"context_line":"        do_test()"},{"line_number":856,"context_line":""},{"line_number":857,"context_line":"        for build_req in build_req_mocks:"},{"line_number":858,"context_line":"            self.assertFalse(build_req.called)"},{"line_number":859,"context_line":""},{"line_number":860,"context_line":"    def test_unshelve_instance_on_host(self):"},{"line_number":861,"context_line":"        instance \u003d self._create_fake_instance_obj()"}],"source_content_type":"text/x-python","patch_set":8,"id":"dab17558_f705af79","line":858,"range":{"start_line":858,"start_character":29,"end_line":858,"end_character":45},"updated":"2016-05-17 16:46:32.000000000","message":"Did you mean build_req.destroy.called?","commit_id":"d2272b3ea32704bec98a1ff13b18f12e2d256cd0"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"5ba453ddfb6c3e3e702d7c6540d74242bb66fc62","unresolved":false,"context_lines":[{"line_number":855,"context_line":"        do_test()"},{"line_number":856,"context_line":""},{"line_number":857,"context_line":"        for build_req in build_req_mocks:"},{"line_number":858,"context_line":"            self.assertFalse(build_req.called)"},{"line_number":859,"context_line":""},{"line_number":860,"context_line":"    def test_unshelve_instance_on_host(self):"},{"line_number":861,"context_line":"        instance \u003d self._create_fake_instance_obj()"}],"source_content_type":"text/x-python","patch_set":8,"id":"dab17558_c6ed5626","line":858,"range":{"start_line":858,"start_character":29,"end_line":858,"end_character":45},"in_reply_to":"dab17558_88987ec1","updated":"2016-05-17 18:39:41.000000000","message":"So this whole check is bunk. I only have mocks here because I override the side_effect on #816 with one on #832. So this actually fails, properly, when I check build_req.destroy.called.","commit_id":"d2272b3ea32704bec98a1ff13b18f12e2d256cd0"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"4136de1fdbd896c33d6168252f6bf20cb5be66ff","unresolved":false,"context_lines":[{"line_number":855,"context_line":"        do_test()"},{"line_number":856,"context_line":""},{"line_number":857,"context_line":"        for build_req in build_req_mocks:"},{"line_number":858,"context_line":"            self.assertFalse(build_req.called)"},{"line_number":859,"context_line":""},{"line_number":860,"context_line":"    def test_unshelve_instance_on_host(self):"},{"line_number":861,"context_line":"        instance \u003d self._create_fake_instance_obj()"}],"source_content_type":"text/x-python","patch_set":8,"id":"dab17558_88987ec1","line":858,"range":{"start_line":858,"start_character":29,"end_line":858,"end_character":45},"in_reply_to":"dab17558_f705af79","updated":"2016-05-17 17:40:41.000000000","message":"Sure did.","commit_id":"d2272b3ea32704bec98a1ff13b18f12e2d256cd0"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"448f404284e63c2e3bbb898ebaae6765e2043d72","unresolved":false,"context_lines":[{"line_number":766,"context_line":"        mock_get_by_host.assert_has_calls([mock.call(self.context, \u0027host1\u0027),"},{"line_number":767,"context_line":"                                           mock.call(self.context, \u0027host2\u0027)])"},{"line_number":768,"context_line":""},{"line_number":769,"context_line":"    @mock.patch.object(objects.Instance, \u0027refresh\u0027, new\u003dmock.MagicMock())"},{"line_number":770,"context_line":"    @mock.patch.object(objects.BuildRequest, \u0027get_by_instance_uuid\u0027)"},{"line_number":771,"context_line":"    @mock.patch.object(scheduler_client.SchedulerClient,"},{"line_number":772,"context_line":"                       \u0027select_destinations\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"bab6814e_0e015c38","line":769,"updated":"2016-05-22 22:12:41.000000000","message":"I wasn\u0027t aware of the new kwarg to mock.patch[.object]. Interesting that using it causes the decoarated function to not get passed an argument for the mocked-out thing...","commit_id":"9fe155974c18a90af1b39878773a6c0daca002ea"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"085374ed2b851f7d6ffddb5a2a80683b053023e9","unresolved":false,"context_lines":[{"line_number":766,"context_line":"        mock_get_by_host.assert_has_calls([mock.call(self.context, \u0027host1\u0027),"},{"line_number":767,"context_line":"                                           mock.call(self.context, \u0027host2\u0027)])"},{"line_number":768,"context_line":""},{"line_number":769,"context_line":"    @mock.patch.object(objects.Instance, \u0027refresh\u0027, new\u003dmock.MagicMock())"},{"line_number":770,"context_line":"    @mock.patch.object(objects.BuildRequest, \u0027get_by_instance_uuid\u0027)"},{"line_number":771,"context_line":"    @mock.patch.object(scheduler_client.SchedulerClient,"},{"line_number":772,"context_line":"                       \u0027select_destinations\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"bab6814e_11b83f74","line":769,"in_reply_to":"bab6814e_0e015c38","updated":"2016-05-23 13:18:12.000000000","message":"Good to know, I was using a private argument instead...\n\n:thumb_up:","commit_id":"9fe155974c18a90af1b39878773a6c0daca002ea"}]}
