)]}'
{"nova/conductor/manager.py":[{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"09c1a36f99903f2ed955a6d85ca9fdcbb07b9379","unresolved":false,"context_lines":[{"line_number":253,"context_line":"                context, instance_uuid, \u0027compute_task\u0027, method, updates,"},{"line_number":254,"context_line":"                ex, request_spec, self.db)"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"    def _cleanup_allocated_networks("},{"line_number":257,"context_line":"            self, context, instance, requested_networks):"},{"line_number":258,"context_line":"        self.network_api.deallocate_for_instance("},{"line_number":259,"context_line":"            context, instance, requested_networks\u003drequested_networks)"}],"source_content_type":"text/x-python","patch_set":9,"id":"da6ed579_41dcba72","line":256,"updated":"2016-01-14 19:29:16.000000000","message":"The cleanup method used in compute/manager.py has exception handling around deallocate_for_instance.  That should be added here as well.  Without it I think we\u0027ll end up with the RPC layer complaining about unexpected exceptions.","commit_id":"08d24b733ee9f4da44bfbb8d6d3914924a41ccdc"},{"author":{"_account_id":13248,"name":"Wenzhi Yu","email":"wenzhi_yu@163.com","username":"yuywz"},"change_message_id":"f715c8c551c8e9e1fb0ccebdf667e41de0942f34","unresolved":false,"context_lines":[{"line_number":253,"context_line":"                context, instance_uuid, \u0027compute_task\u0027, method, updates,"},{"line_number":254,"context_line":"                ex, request_spec, self.db)"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"    def _cleanup_allocated_networks("},{"line_number":257,"context_line":"            self, context, instance, requested_networks):"},{"line_number":258,"context_line":"        self.network_api.deallocate_for_instance("},{"line_number":259,"context_line":"            context, instance, requested_networks\u003drequested_networks)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba63e191_87e264d4","line":256,"in_reply_to":"da6ed579_41dcba72","updated":"2016-01-19 07:44:00.000000000","message":"Hi Andrew, already added the exception handling logic in patch https://review.openstack.org/#/c/269462/ please review, thanks!","commit_id":"08d24b733ee9f4da44bfbb8d6d3914924a41ccdc"}],"nova/tests/unit/conductor/test_conductor.py":[{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"d7a3daaffa8de7205fd3a257b62f03f05c113f45","unresolved":false,"context_lines":[{"line_number":497,"context_line":"        self.mox.StubOutWithMock(self.conductor_manager.scheduler_client,"},{"line_number":498,"context_line":"                \u0027select_destinations\u0027)"},{"line_number":499,"context_line":"        self.mox.StubOutWithMock(self.conductor_manager,"},{"line_number":500,"context_line":"                \u0027_cleanup_allocated_networks\u0027)"},{"line_number":501,"context_line":""},{"line_number":502,"context_line":"        scheduler_utils.build_request_spec(self.context, image,"},{"line_number":503,"context_line":"                mox.IgnoreArg()).AndReturn(spec)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da85f559_6bdee140","line":500,"updated":"2015-11-10 09:26:53.000000000","message":"I think you should use mock now, also changing all mox in this test to mock","commit_id":"e2375cd7acde68bad80ff0f1e1a904e7f128e7bd"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"e79eaf12a4b9982206ed03dfea005419b5bdbe04","unresolved":false,"context_lines":[{"line_number":497,"context_line":"        self.mox.StubOutWithMock(self.conductor_manager.scheduler_client,"},{"line_number":498,"context_line":"                \u0027select_destinations\u0027)"},{"line_number":499,"context_line":"        self.mox.StubOutWithMock(self.conductor_manager,"},{"line_number":500,"context_line":"                \u0027_cleanup_allocated_networks\u0027)"},{"line_number":501,"context_line":""},{"line_number":502,"context_line":"        scheduler_utils.build_request_spec(self.context, image,"},{"line_number":503,"context_line":"                mox.IgnoreArg()).AndReturn(spec)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da85f559_a4fa9c41","line":500,"in_reply_to":"da85f559_6bdee140","updated":"2015-11-10 18:24:20.000000000","message":"+1 on the comment above.","commit_id":"e2375cd7acde68bad80ff0f1e1a904e7f128e7bd"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"520297b01dc19e0de2c0f6525179a8b76a2fc061","unresolved":false,"context_lines":[{"line_number":502,"context_line":"                \u0027instance_properties\u0027: instances[0]}"},{"line_number":503,"context_line":"        exception \u003d exc.NoValidHost(reason\u003d\u0027fake-reason\u0027)"},{"line_number":504,"context_line":""},{"line_number":505,"context_line":"        spawn_mock.side_effect \u003d lambda f, *a, **k: f(*a, **k)"},{"line_number":506,"context_line":"        bs_mock.return_value \u003d spec"},{"line_number":507,"context_line":"        sd_mock.side_effect \u003d exception"},{"line_number":508,"context_line":"        updates \u003d {\u0027vm_state\u0027: vm_states.ERROR, \u0027task_state\u0027: None}"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_fa9c94c1","line":505,"updated":"2015-11-11 14:53:12.000000000","message":"I assume you copied this from test_build_instances_scheduler_group_failure() below. I would also copy the comment about what this side_effect is doing, as it isn\u0027t obvious otherwise.","commit_id":"7c75f2a2d936a5def0d7b0113d73477e87f53ca9"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"47d2916661dcf1097f42e0c601c1cc73bcfe987f","unresolved":false,"context_lines":[{"line_number":499,"context_line":"                \u0027instance_properties\u0027: instances[0]}"},{"line_number":500,"context_line":"        exception \u003d exc.NoValidHost(reason\u003d\u0027fake-reason\u0027)"},{"line_number":501,"context_line":""},{"line_number":502,"context_line":"        # NOTE: LocalComputeTaskAPI use eventlet spawn that makes mocking"},{"line_number":503,"context_line":"        # hard so use direct call instead."},{"line_number":504,"context_line":"        spawn_mock.side_effect \u003d lambda f, *a, **k: f(*a, **k)"},{"line_number":505,"context_line":"        bs_mock.return_value \u003d spec"},{"line_number":506,"context_line":"        sd_mock.side_effect \u003d exception"},{"line_number":507,"context_line":"        updates \u003d {\u0027vm_state\u0027: vm_states.ERROR, \u0027task_state\u0027: None}"}],"source_content_type":"text/x-python","patch_set":8,"id":"da6ed579_05baca6e","line":504,"range":{"start_line":502,"start_character":0,"end_line":504,"end_character":62},"updated":"2016-01-13 00:39:12.000000000","message":"There\u0027s a fixture for this that you should use:\n\n self.useFixture(fixtures.SpawnIsSynchronous())\n\nand with this you also don\u0027t have to @mock.patch(\u0027nova.utils.spawn_n\u0027) this test. You\u0027ll also need to \"from nova.tests import fixtures\" in the imports for this file","commit_id":"8989aa646e3925601f2784cf06c114f45c49fabb"}]}
