)]}'
{"nova/compute/manager.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"20a8d32208638d37adea1bdfa576677b75cf6f29","unresolved":false,"context_lines":[{"line_number":1775,"context_line":"        attempts \u003d retries + 1"},{"line_number":1776,"context_line":"        retry_time \u003d 1"},{"line_number":1777,"context_line":""},{"line_number":1778,"context_line":"        instance.refresh()"},{"line_number":1779,"context_line":"        for attempt in range(1, attempts + 1):"},{"line_number":1780,"context_line":"            try:"},{"line_number":1781,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5ad0253b_691ded0e","line":1778,"updated":"2015-04-28 17:20:47.000000000","message":"Why did you add this?","commit_id":"76e200648731ef74dc17ea00849ab4541c6ed67e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"20a8d32208638d37adea1bdfa576677b75cf6f29","unresolved":false,"context_lines":[{"line_number":1778,"context_line":"        instance.refresh()"},{"line_number":1779,"context_line":"        for attempt in range(1, attempts + 1):"},{"line_number":1780,"context_line":"            try:"},{"line_number":1781,"context_line":""},{"line_number":1782,"context_line":"                nwinfo \u003d self.network_api.allocate_for_instance("},{"line_number":1783,"context_line":"                        context, instance, vpn\u003dis_vpn,"},{"line_number":1784,"context_line":"                        requested_networks\u003drequested_networks,"}],"source_content_type":"text/x-python","patch_set":3,"id":"5ad0253b_a92ae52a","line":1781,"updated":"2015-04-28 17:20:47.000000000","message":"Please don\u0027t add unrelated whitespace.","commit_id":"76e200648731ef74dc17ea00849ab4541c6ed67e"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"329efe6080640e05068247371e37757730545ac2","unresolved":false,"context_lines":[{"line_number":1785,"context_line":"                LOG.debug(\u0027Instance network_info: |%s|\u0027, nwinfo,"},{"line_number":1786,"context_line":"                          instance\u003dinstance)"},{"line_number":1787,"context_line":"                instance.system_metadata[\u0027network_allocated\u0027] \u003d \u0027True\u0027"},{"line_number":1788,"context_line":"                # NOTE(JoshNang) do no save the instance here, as it can cause"},{"line_number":1789,"context_line":"                # races. _spawn() shares a reference to instance and waits for"},{"line_number":1790,"context_line":"                # this async greenthread to finish before calling"},{"line_number":1791,"context_line":"                # instance.save()."}],"source_content_type":"text/x-python","patch_set":5,"id":"3acd31a7_20049f7c","line":1788,"updated":"2015-04-29 19:34:36.000000000","message":"s/no/not/","commit_id":"af2586a56a7e1ce89d6757cdcf72618124df02b2"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"48eb0e996638fa69b784758972d3bf1f9de55bdd","unresolved":false,"context_lines":[{"line_number":1785,"context_line":"                LOG.debug(\u0027Instance network_info: |%s|\u0027, nwinfo,"},{"line_number":1786,"context_line":"                          instance\u003dinstance)"},{"line_number":1787,"context_line":"                instance.system_metadata[\u0027network_allocated\u0027] \u003d \u0027True\u0027"},{"line_number":1788,"context_line":"                # NOTE(JoshNang) do no save the instance here, as it can cause"},{"line_number":1789,"context_line":"                # races. _spawn() shares a reference to instance and waits for"},{"line_number":1790,"context_line":"                # this async greenthread to finish before calling"},{"line_number":1791,"context_line":"                # instance.save()."}],"source_content_type":"text/x-python","patch_set":5,"id":"3acd31a7_a8e618b2","line":1788,"in_reply_to":"3acd31a7_20049f7c","updated":"2015-05-01 20:11:39.000000000","message":"Done","commit_id":"af2586a56a7e1ce89d6757cdcf72618124df02b2"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"71f4f80c85f2a78b47abe75cfea83eb805eb1889","unresolved":false,"context_lines":[{"line_number":1785,"context_line":"                LOG.debug(\u0027Instance network_info: |%s|\u0027, nwinfo,"},{"line_number":1786,"context_line":"                          instance\u003dinstance)"},{"line_number":1787,"context_line":"                sys_meta \u003d instance.system_metadata"},{"line_number":1788,"context_line":"                sys_meta[\u0027network_allocated\u0027] \u003d \u0027True\u0027"},{"line_number":1789,"context_line":"                self._instance_update(context, instance.uuid,"},{"line_number":1790,"context_line":"                        system_metadata\u003dsys_meta)"},{"line_number":1791,"context_line":"                return nwinfo"}],"source_content_type":"text/x-python","patch_set":6,"id":"3acd31a7_291c3911","side":"PARENT","line":1788,"updated":"2015-05-03 11:50:43.000000000","message":"As my understand, this also can change the instance obj. Or maybe missing something...","commit_id":"dde1c1e175d35e1a39708f75409ce80e8ff75020"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"4344a6b6552c892b11f6e61c66c9d9714b44457e","unresolved":false,"context_lines":[{"line_number":1785,"context_line":"                LOG.debug(\u0027Instance network_info: |%s|\u0027, nwinfo,"},{"line_number":1786,"context_line":"                          instance\u003dinstance)"},{"line_number":1787,"context_line":"                sys_meta \u003d instance.system_metadata"},{"line_number":1788,"context_line":"                sys_meta[\u0027network_allocated\u0027] \u003d \u0027True\u0027"},{"line_number":1789,"context_line":"                self._instance_update(context, instance.uuid,"},{"line_number":1790,"context_line":"                        system_metadata\u003dsys_meta)"},{"line_number":1791,"context_line":"                return nwinfo"}],"source_content_type":"text/x-python","patch_set":6,"id":"3acd31a7_0765d2df","side":"PARENT","line":1788,"in_reply_to":"3acd31a7_291c3911","updated":"2015-05-04 15:30:55.000000000","message":"If refreshed it would update the instance object, but it doesn\u0027t update the object directly.","commit_id":"dde1c1e175d35e1a39708f75409ce80e8ff75020"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"71f4f80c85f2a78b47abe75cfea83eb805eb1889","unresolved":false,"context_lines":[{"line_number":1788,"context_line":"                # NOTE(JoshNang) do not save the instance here, as it can cause"},{"line_number":1789,"context_line":"                # races. _spawn() shares a reference to instance and waits for"},{"line_number":1790,"context_line":"                # this async greenthread to finish before calling"},{"line_number":1791,"context_line":"                # instance.save()."},{"line_number":1792,"context_line":"                return nwinfo"},{"line_number":1793,"context_line":"            except Exception:"},{"line_number":1794,"context_line":"                exc_info \u003d sys.exc_info()"}],"source_content_type":"text/x-python","patch_set":6,"id":"3acd31a7_09173dee","line":1791,"updated":"2015-05-03 11:50:43.000000000","message":"The race only happenedd  when there is another save update the system_metadata I guess?","commit_id":"58d1ff30ae679bd0f174fb26a2d78cb99e4538f7"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"4344a6b6552c892b11f6e61c66c9d9714b44457e","unresolved":false,"context_lines":[{"line_number":1788,"context_line":"                # NOTE(JoshNang) do not save the instance here, as it can cause"},{"line_number":1789,"context_line":"                # races. _spawn() shares a reference to instance and waits for"},{"line_number":1790,"context_line":"                # this async greenthread to finish before calling"},{"line_number":1791,"context_line":"                # instance.save()."},{"line_number":1792,"context_line":"                return nwinfo"},{"line_number":1793,"context_line":"            except Exception:"},{"line_number":1794,"context_line":"                exc_info \u003d sys.exc_info()"}],"source_content_type":"text/x-python","patch_set":6,"id":"3acd31a7_ac13a5b7","line":1791,"in_reply_to":"3acd31a7_09173dee","updated":"2015-05-04 15:30:55.000000000","message":"It can be when anything changes.  One of the issues that I saw is that a .save() here could pick up a something like a \"instance.task_state \u003d blah\" on the instance on the other greenthread, which would save it to the db and then a later .save(expected_task_state\u003d...) would fail.","commit_id":"58d1ff30ae679bd0f174fb26a2d78cb99e4538f7"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"f6c18f9fb937cd71391ed2c161fed9ff8e68736e","unresolved":false,"context_lines":[{"line_number":1786,"context_line":"                          instance\u003dinstance)"},{"line_number":1787,"context_line":"                instance.system_metadata[\u0027network_allocated\u0027] \u003d \u0027True\u0027"},{"line_number":1788,"context_line":"                # NOTE(JoshNang) do not save the instance here, as it can cause"},{"line_number":1789,"context_line":"                # races. _spawn() shares a reference to instance and waits for"},{"line_number":1790,"context_line":"                # this async greenthread to finish before calling"},{"line_number":1791,"context_line":"                # instance.save()."},{"line_number":1792,"context_line":"                return nwinfo"}],"source_content_type":"text/x-python","patch_set":7,"id":"3acd31a7_627fa6ab","line":1789,"updated":"2015-05-05 19:56:10.000000000","message":"Minor nit, that I failed to mention previously :( but _spawn is going away.  It\u0027s the tersely name build_and_run_instance path now.","commit_id":"5ec8e02728eb2e6efb200934cc1770e0b90bfe3a"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"9b9cb43545e7a5106aff0084a7860ee838e47057","unresolved":false,"context_lines":[{"line_number":1786,"context_line":"                          instance\u003dinstance)"},{"line_number":1787,"context_line":"                instance.system_metadata[\u0027network_allocated\u0027] \u003d \u0027True\u0027"},{"line_number":1788,"context_line":"                # NOTE(JoshNang) do not save the instance here, as it can cause"},{"line_number":1789,"context_line":"                # races. _spawn() shares a reference to instance and waits for"},{"line_number":1790,"context_line":"                # this async greenthread to finish before calling"},{"line_number":1791,"context_line":"                # instance.save()."},{"line_number":1792,"context_line":"                return nwinfo"}],"source_content_type":"text/x-python","patch_set":7,"id":"3acd31a7_4f717275","line":1789,"in_reply_to":"3acd31a7_627fa6ab","updated":"2015-05-05 20:51:23.000000000","message":"Ahh yeah. I was trying to figure out why there were a couple code paths that seemed pretty similar. I guess I missed your deprecated comment on run_instance().","commit_id":"5ec8e02728eb2e6efb200934cc1770e0b90bfe3a"}],"nova/tests/unit/compute/test_compute.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"20a8d32208638d37adea1bdfa576677b75cf6f29","unresolved":false,"context_lines":[{"line_number":1647,"context_line":"                self.assertFalse(instance[\u0027access_ip_v6\u0027])"},{"line_number":1648,"context_line":"            return orig_save(**kwargs)"},{"line_number":1649,"context_line":""},{"line_number":1650,"context_line":"        self.stubs.Set(instance, \u0027save\u0027, _instance_save)"},{"line_number":1651,"context_line":""},{"line_number":1652,"context_line":"        try:"},{"line_number":1653,"context_line":"            self.compute.run_instance(self.context, instance, {}, {}, [], None,"}],"source_content_type":"text/x-python","patch_set":3,"id":"5ad0253b_29eed5ec","line":1650,"updated":"2015-04-28 17:20:47.000000000","message":"You should use mock for this.\n\nHowever, is this related to the change? I don\u0027t see that this is in any way concerned with network_allocated.","commit_id":"76e200648731ef74dc17ea00849ab4541c6ed67e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"20a8d32208638d37adea1bdfa576677b75cf6f29","unresolved":false,"context_lines":[{"line_number":3876,"context_line":"        self.compute.terminate_instance(self.context, instance, [], [])"},{"line_number":3877,"context_line":""},{"line_number":3878,"context_line":"    @mock.patch.object(objects.Instance, \u0027save\u0027)"},{"line_number":3879,"context_line":"    def test_run_instance_queries_macs(self, mock_save):"},{"line_number":3880,"context_line":"        # run_instance should ask the driver for node mac addresses and pass"},{"line_number":3881,"context_line":"        # that to the network_api in use."},{"line_number":3882,"context_line":"        fake_network.unset_stub_network_methods(self.stubs)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5ad0253b_69928d59","line":3879,"updated":"2015-04-28 17:20:47.000000000","message":"This too. Maybe because of the allocate_for_instance?","commit_id":"76e200648731ef74dc17ea00849ab4541c6ed67e"}],"nova/tests/unit/compute/test_compute_mgr.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9432caec920205b1e82140d7adfd3f8b09531eb4","unresolved":false,"context_lines":[{"line_number":218,"context_line":"                security_groups\u003dsec_groups,"},{"line_number":219,"context_line":"                dhcp_options\u003ddhcp_options).AndReturn(final_result)"},{"line_number":220,"context_line":"        self.compute._instance_update(self.context, instance[\u0027uuid\u0027],"},{"line_number":221,"context_line":"                system_metadata\u003d{\u0027network_allocated\u0027: \u0027True\u0027})"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"        self.mox.ReplayAll()"},{"line_number":224,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3acd31a7_c0af2b93","side":"PARENT","line":221,"updated":"2015-04-29 19:28:48.000000000","message":"You should mock the instance.save() and ensure it\u0027s *not* called. If this test isn\u0027t appropriate for such a thing, then write one.","commit_id":"dde1c1e175d35e1a39708f75409ce80e8ff75020"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"48eb0e996638fa69b784758972d3bf1f9de55bdd","unresolved":false,"context_lines":[{"line_number":218,"context_line":"                security_groups\u003dsec_groups,"},{"line_number":219,"context_line":"                dhcp_options\u003ddhcp_options).AndReturn(final_result)"},{"line_number":220,"context_line":"        self.compute._instance_update(self.context, instance[\u0027uuid\u0027],"},{"line_number":221,"context_line":"                system_metadata\u003d{\u0027network_allocated\u0027: \u0027True\u0027})"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"        self.mox.ReplayAll()"},{"line_number":224,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3acd31a7_689239a1","side":"PARENT","line":221,"in_reply_to":"3acd31a7_c0af2b93","updated":"2015-05-01 20:11:39.000000000","message":"+1. I\u0027ll test here, since the test is \"don\u0027t save when allocating networks, it will be handled elsewhere\".","commit_id":"dde1c1e175d35e1a39708f75409ce80e8ff75020"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"34662e823da1255fea94d433e8ead66193749d2f","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        self.flags(network_allocate_retries\u003d8)"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"        nwapi \u003d self.compute.network_api"},{"line_number":190,"context_line":"        self.mox.StubOutWithMock(nwapi, \u0027allocate_for_instance\u0027)"},{"line_number":191,"context_line":"        self.mox.StubOutWithMock(self.compute, \u0027_instance_update\u0027)"},{"line_number":192,"context_line":"        self.mox.StubOutWithMock(time, \u0027sleep\u0027)"},{"line_number":193,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3acd31a7_806a5319","line":190,"updated":"2015-04-29 19:37:54.000000000","message":"What Dan said, plus this wouldn\u0027t be needed anymore.  Change to a mock and assert it\u0027s not called (or instance.save for that matter).","commit_id":"af2586a56a7e1ce89d6757cdcf72618124df02b2"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"48eb0e996638fa69b784758972d3bf1f9de55bdd","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        self.flags(network_allocate_retries\u003d8)"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"        nwapi \u003d self.compute.network_api"},{"line_number":190,"context_line":"        self.mox.StubOutWithMock(nwapi, \u0027allocate_for_instance\u0027)"},{"line_number":191,"context_line":"        self.mox.StubOutWithMock(self.compute, \u0027_instance_update\u0027)"},{"line_number":192,"context_line":"        self.mox.StubOutWithMock(time, \u0027sleep\u0027)"},{"line_number":193,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3acd31a7_4891bd98","line":190,"in_reply_to":"3acd31a7_806a5319","updated":"2015-05-01 20:11:39.000000000","message":"Done","commit_id":"af2586a56a7e1ce89d6757cdcf72618124df02b2"}]}
