)]}'
{"nova/compute/manager.py":[{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"4f1f0e4d15950b30c0a573311d519c7e83501251","unresolved":false,"context_lines":[{"line_number":3396,"context_line":"                host\u003dself.host, power_state\u003dcurrent_power_state,"},{"line_number":3397,"context_line":"                vm_state\u003dvm_states.ACTIVE, task_state\u003dNone,"},{"line_number":3398,"context_line":"                expected_task_state\u003dtask_states.MIGRATING,"},{"line_number":3399,"context_line":"                node\u003dnode_name)"},{"line_number":3400,"context_line":""},{"line_number":3401,"context_line":"        # NOTE(vish): this is necessary to update dhcp"},{"line_number":3402,"context_line":"        self.network_api.setup_networks_on_host(context, instance, self.host)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2FqBA%3D","line":3399,"updated":"2013-04-30 12:00:22.000000000","message":"What value does node_name have if compute_node is None? I can\u0027t see a default value anywhere?","commit_id":"3fec7ddbbda403ce4bb7faeb73c6bdf22a2179b0"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"bc7f9f0cb8668f104fbfea0184d91338b3d243d0","unresolved":false,"context_lines":[{"line_number":3396,"context_line":"                host\u003dself.host, power_state\u003dcurrent_power_state,"},{"line_number":3397,"context_line":"                vm_state\u003dvm_states.ACTIVE, task_state\u003dNone,"},{"line_number":3398,"context_line":"                expected_task_state\u003dtask_states.MIGRATING,"},{"line_number":3399,"context_line":"                node\u003dnode_name)"},{"line_number":3400,"context_line":""},{"line_number":3401,"context_line":"        # NOTE(vish): this is necessary to update dhcp"},{"line_number":3402,"context_line":"        self.network_api.setup_networks_on_host(context, instance, self.host)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2Fpp4%3D","line":3399,"in_reply_to":"AAAAOn%2F%2FqBA%3D","updated":"2013-04-30 16:16:37.000000000","message":"Ugh, not only that but it can\u0027t actually happen.  _get_compute_info returns either the compute node or raises an exception if it\u0027s not found, so this is wrong on all kinds of levels.","commit_id":"3fec7ddbbda403ce4bb7faeb73c6bdf22a2179b0"},{"author":{"_account_id":5174,"name":"Mauro Sergio Martins Rodrigues","email":"maurosr@linux.vnet.ibm.com","username":"maurosr"},"change_message_id":"ac2d6cd6af9e23efdc55de70f6af84566595ece3","unresolved":false,"context_lines":[{"line_number":3392,"context_line":"        try:"},{"line_number":3393,"context_line":"            compute_node \u003d self._get_compute_info(context, self.host)"},{"line_number":3394,"context_line":"        except exception.NotFound:"},{"line_number":3395,"context_line":"            compute_node \u003d None"},{"line_number":3396,"context_line":"        if compute_node:"},{"line_number":3397,"context_line":"            node_name \u003d compute_node[\u0027hypervisor_hostname\u0027]"},{"line_number":3398,"context_line":"            instance \u003d self._instance_update(context, instance[\u0027uuid\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FpXU%3D","line":3395,"updated":"2013-04-30 18:11:41.000000000","message":"Two things, one question and one comment:\nComment: I think we should log when this situation happen.\nQuestion: is it a problem to do instance_update passing node\u003dcompute_node in a situation like this where compute_node is none? If not I think we should update it with none, IMHO better assume a problem and do not offer the information than offer the wrong one.","commit_id":"70b41f4de0564d6ea359d9c37024d606f1c7557a"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"9f67b3c806ff700a90e66220fbde0b7fae49077c","unresolved":false,"context_lines":[{"line_number":3392,"context_line":"        try:"},{"line_number":3393,"context_line":"            compute_node \u003d self._get_compute_info(context, self.host)"},{"line_number":3394,"context_line":"        except exception.NotFound:"},{"line_number":3395,"context_line":"            compute_node \u003d None"},{"line_number":3396,"context_line":"        if compute_node:"},{"line_number":3397,"context_line":"            node_name \u003d compute_node[\u0027hypervisor_hostname\u0027]"},{"line_number":3398,"context_line":"            instance \u003d self._instance_update(context, instance[\u0027uuid\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FpPs%3D","line":3395,"in_reply_to":"AAAAOn%2F%2FpWU%3D","updated":"2013-04-30 19:51:01.000000000","message":"My thought was to maintain the current behavior if we couldn\u0027t get the compute node, but since the current behavior is wrong maybe it would be better to use Mauro\u0027s suggestion and set it to None so it\u0027s clear that it isn\u0027t valid?\n\nI\u0027ll definitely add the logging.","commit_id":"70b41f4de0564d6ea359d9c37024d606f1c7557a"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"edde7c1113628b5a9d1e161461b89893c6ab4778","unresolved":false,"context_lines":[{"line_number":3392,"context_line":"        try:"},{"line_number":3393,"context_line":"            compute_node \u003d self._get_compute_info(context, self.host)"},{"line_number":3394,"context_line":"        except exception.NotFound:"},{"line_number":3395,"context_line":"            compute_node \u003d None"},{"line_number":3396,"context_line":"        if compute_node:"},{"line_number":3397,"context_line":"            node_name \u003d compute_node[\u0027hypervisor_hostname\u0027]"},{"line_number":3398,"context_line":"            instance \u003d self._instance_update(context, instance[\u0027uuid\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FpWU%3D","line":3395,"in_reply_to":"AAAAOn%2F%2FpXU%3D","updated":"2013-04-30 18:33:56.000000000","message":"Mauro, I think this is specifically not passing node\u003dnode_name when compute_node is None.\n\nI would like to see this expressed more clearly, but I think it\u0027s doing the right thing.","commit_id":"70b41f4de0564d6ea359d9c37024d606f1c7557a"},{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"c44abf16a2f46c22a1a69cd232d8cee6d945abc1","unresolved":false,"context_lines":[{"line_number":3394,"context_line":"        except exception.NotFound:"},{"line_number":3395,"context_line":"            LOG.exception(_(\u0027Failed to get compute_info for %s\u0027) % self.host)"},{"line_number":3396,"context_line":"            compute_node \u003d None"},{"line_number":3397,"context_line":"        if compute_node:"},{"line_number":3398,"context_line":"            node_name \u003d compute_node[\u0027hypervisor_hostname\u0027]"},{"line_number":3399,"context_line":"            instance \u003d self._instance_update(context, instance[\u0027uuid\u0027],"},{"line_number":3400,"context_line":"                    host\u003dself.host, power_state\u003dcurrent_power_state,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FoS8%3D","line":3397,"updated":"2013-05-01 07:37:38.000000000","message":"This code now feels a bit odd. Couldn\u0027t the contents of the if just be inside the try (and without the if)?","commit_id":"c08032efa775e0f6dfb118dc4f22cb804c4827d9"},{"author":{"_account_id":5174,"name":"Mauro Sergio Martins Rodrigues","email":"maurosr@linux.vnet.ibm.com","username":"maurosr"},"change_message_id":"79cfaf3b9a500e50ef3c475947d18c005131835c","unresolved":false,"context_lines":[{"line_number":3402,"context_line":"            instance \u003d self._instance_update(context, instance[\u0027uuid\u0027],"},{"line_number":3403,"context_line":"                    host\u003dself.host, power_state\u003dcurrent_power_state,"},{"line_number":3404,"context_line":"                    vm_state\u003dvm_states.ACTIVE, task_state\u003dNone,"},{"line_number":3405,"context_line":"                    expected_task_state\u003dtask_states.MIGRATING)"},{"line_number":3406,"context_line":""},{"line_number":3407,"context_line":"        # NOTE(vish): this is necessary to update dhcp"},{"line_number":3408,"context_line":"        self.network_api.setup_networks_on_host(context, instance, self.host)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2FlJ0%3D","line":3405,"updated":"2013-05-03 02:07:57.000000000","message":"question again hehe: I thought you agreed (in review 3) to pass node\u003dnode_name even in the case where you cant get compute info (and node_name is None, so once you update it it would receive none and replace the previous value with None), am I right?\n\nIf so what about do this like this:\n\nnode_name \u003d None\ntry:\n    compute_node \u003d self._get_compute_info(context, self.host)\n    node_name \u003d compute_node[\u0027hypervisor_hostname\u0027]\nexcept exception.NotFound:\n    LOG.exception(_(\u0027Failed to get compute_info for %s\u0027) % self.host)\nfinally:\n    instance \u003d self._instance_update(context, instance[\u0027uuid\u0027],\n                                     host\u003dself.host,power_state\u003dcurrent_power_state,\n                                     vm_state\u003dvm_states.ACTIVE, task_state\u003dNone,\n                                     expected_task_state\u003dtask_states.MIGRATING,\n                                     node\u003dnode_name)\n\npaste here just to make easier to read: http://paste.openstack.org/show/36777/\n\nYou would avoid to repeat yourself *and* guarantee that if you cannot get compute info you will at least show that it is invalid updating it with none","commit_id":"2e81df49d6b46240a3c0b4e6206e08e87e879e7a"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"bc1ec09ca735222ca0be1968218f7bd2dbe5bee5","unresolved":false,"context_lines":[{"line_number":3402,"context_line":"            instance \u003d self._instance_update(context, instance[\u0027uuid\u0027],"},{"line_number":3403,"context_line":"                    host\u003dself.host, power_state\u003dcurrent_power_state,"},{"line_number":3404,"context_line":"                    vm_state\u003dvm_states.ACTIVE, task_state\u003dNone,"},{"line_number":3405,"context_line":"                    expected_task_state\u003dtask_states.MIGRATING)"},{"line_number":3406,"context_line":""},{"line_number":3407,"context_line":"        # NOTE(vish): this is necessary to update dhcp"},{"line_number":3408,"context_line":"        self.network_api.setup_networks_on_host(context, instance, self.host)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2Fkjk%3D","line":3405,"in_reply_to":"AAAAOn%2F%2FlJ0%3D","updated":"2013-05-03 14:51:21.000000000","message":"Yeah, I guess I was looking for some more discussion about how to handle the errors, but I think your suggestion makes sense.  I\u0027ll submit a new change.","commit_id":"2e81df49d6b46240a3c0b4e6206e08e87e879e7a"}],"nova/tests/compute/test_compute.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ed9f300c1bbe446157186219cc89dae9a84690e4","unresolved":false,"context_lines":[{"line_number":3564,"context_line":""},{"line_number":3565,"context_line":"        self.mox.ReplayAll()"},{"line_number":3566,"context_line":""},{"line_number":3567,"context_line":"        self.compute.post_live_migration_at_destination(admin_ctxt, instance)"},{"line_number":3568,"context_line":""},{"line_number":3569,"context_line":"        self.mox.VerifyAll()"},{"line_number":3570,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2Fs8c%3D","line":3567,"updated":"2013-04-26 23:06:55.000000000","message":"Can you check that node is actually correct after it\u0027s done to make sure it wasn\u0027t reverted or overridden? Checking that the code you changed is doing what you expect is different than making sure it has the effect you expect :)","commit_id":"0da998580a85ecb92f6140a1589ffdb407023cdc"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"c3547a52b4da33dcbd59d807ca1a11b9b8339769","unresolved":false,"context_lines":[{"line_number":3564,"context_line":""},{"line_number":3565,"context_line":"        self.mox.ReplayAll()"},{"line_number":3566,"context_line":""},{"line_number":3567,"context_line":"        self.compute.post_live_migration_at_destination(admin_ctxt, instance)"},{"line_number":3568,"context_line":""},{"line_number":3569,"context_line":"        self.mox.VerifyAll()"},{"line_number":3570,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FqqQ%3D","line":3567,"in_reply_to":"AAAAOn%2F%2Fs8c%3D","updated":"2013-04-29 21:59:45.000000000","message":"Okay, I had to unstub _instance_update to make the update actually happen, but I think that should do the trick.  Let me know what you think.","commit_id":"0da998580a85ecb92f6140a1589ffdb407023cdc"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ed9f300c1bbe446157186219cc89dae9a84690e4","unresolved":false,"context_lines":[{"line_number":3566,"context_line":""},{"line_number":3567,"context_line":"        self.compute.post_live_migration_at_destination(admin_ctxt, instance)"},{"line_number":3568,"context_line":""},{"line_number":3569,"context_line":"        self.mox.VerifyAll()"},{"line_number":3570,"context_line":""},{"line_number":3571,"context_line":"    def test_run_kill_vm(self):"},{"line_number":3572,"context_line":"        # Detect when a vm is terminated behind the scenes."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2Fs8o%3D","line":3569,"updated":"2013-04-26 23:06:55.000000000","message":"This isn\u0027t necessary, as tearDown() does it for us, right?","commit_id":"0da998580a85ecb92f6140a1589ffdb407023cdc"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"c3547a52b4da33dcbd59d807ca1a11b9b8339769","unresolved":false,"context_lines":[{"line_number":3566,"context_line":""},{"line_number":3567,"context_line":"        self.compute.post_live_migration_at_destination(admin_ctxt, instance)"},{"line_number":3568,"context_line":""},{"line_number":3569,"context_line":"        self.mox.VerifyAll()"},{"line_number":3570,"context_line":""},{"line_number":3571,"context_line":"    def test_run_kill_vm(self):"},{"line_number":3572,"context_line":"        # Detect when a vm is terminated behind the scenes."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FrSI%3D","line":3569,"in_reply_to":"AAAAOn%2F%2Fs8o%3D","updated":"2013-04-29 21:59:45.000000000","message":"Hmm, apparently it does.  I thought it wasn\u0027t getting called when I was working on this, but now I can\u0027t figure out exactly why.  I\u0027ll remove it.","commit_id":"0da998580a85ecb92f6140a1589ffdb407023cdc"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"edde7c1113628b5a9d1e161461b89893c6ab4778","unresolved":false,"context_lines":[{"line_number":3619,"context_line":"        self.compute._get_power_state(admin_ctxt, instance).AndReturn("},{"line_number":3620,"context_line":"                \u0027fake_power_state\u0027)"},{"line_number":3621,"context_line":"        if compute_info:"},{"line_number":3622,"context_line":"            fake_compute_info \u003d {\u0027hypervisor_hostname\u0027: self.compute.host}"},{"line_number":3623,"context_line":"            self.compute._get_compute_info(mox.IgnoreArg(),"},{"line_number":3624,"context_line":"                                           mox.IgnoreArg()).AndReturn("},{"line_number":3625,"context_line":"                                                            fake_compute_info)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FpWM%3D","line":3622,"updated":"2013-04-30 18:33:56.000000000","message":"I think this test is expressing the wrong thing: hypervisor_hostname is not compute.host! A compute host may have many nodes associated to it, each with a unique hypervisor_hostname.","commit_id":"70b41f4de0564d6ea359d9c37024d606f1c7557a"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"9f67b3c806ff700a90e66220fbde0b7fae49077c","unresolved":false,"context_lines":[{"line_number":3619,"context_line":"        self.compute._get_power_state(admin_ctxt, instance).AndReturn("},{"line_number":3620,"context_line":"                \u0027fake_power_state\u0027)"},{"line_number":3621,"context_line":"        if compute_info:"},{"line_number":3622,"context_line":"            fake_compute_info \u003d {\u0027hypervisor_hostname\u0027: self.compute.host}"},{"line_number":3623,"context_line":"            self.compute._get_compute_info(mox.IgnoreArg(),"},{"line_number":3624,"context_line":"                                           mox.IgnoreArg()).AndReturn("},{"line_number":3625,"context_line":"                                                            fake_compute_info)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FpPk%3D","line":3622,"in_reply_to":"AAAAOn%2F%2FpWM%3D","updated":"2013-04-30 19:51:01.000000000","message":"True, that was a bad assumption on my part.  I will make it completely separate from the compute host.","commit_id":"70b41f4de0564d6ea359d9c37024d606f1c7557a"},{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"b9578f2154032b7b45f743303c3a7b5f63401a11","unresolved":false,"context_lines":[{"line_number":3590,"context_line":"        self.mox.ReplayAll()"},{"line_number":3591,"context_line":"        self.compute._post_live_migration(c, inst_ref, dest)"},{"line_number":3592,"context_line":""},{"line_number":3593,"context_line":"    def _test_post_live_migration_at_destination(self, compute_info\u003dTrue):"},{"line_number":3594,"context_line":"        self.mox.StubOutWithMock(self.compute.network_api,"},{"line_number":3595,"context_line":"                                 \u0027setup_networks_on_host\u0027)"},{"line_number":3596,"context_line":"        self.mox.StubOutWithMock(self.compute.conductor_api,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2Fmuc%3D","line":3593,"updated":"2013-05-02 04:05:16.000000000","message":"Why rename the method?","commit_id":"2e81df49d6b46240a3c0b4e6206e08e87e879e7a"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"8c4da041378464cd55482ce46267c81b66e7323a","unresolved":false,"context_lines":[{"line_number":3590,"context_line":"        self.mox.ReplayAll()"},{"line_number":3591,"context_line":"        self.compute._post_live_migration(c, inst_ref, dest)"},{"line_number":3592,"context_line":""},{"line_number":3593,"context_line":"    def _test_post_live_migration_at_destination(self, compute_info\u003dTrue):"},{"line_number":3594,"context_line":"        self.mox.StubOutWithMock(self.compute.network_api,"},{"line_number":3595,"context_line":"                                 \u0027setup_networks_on_host\u0027)"},{"line_number":3596,"context_line":"        self.mox.StubOutWithMock(self.compute.conductor_api,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2Fl%2F4%3D","line":3593,"in_reply_to":"AAAAOn%2F%2Fmuc%3D","updated":"2013-05-02 15:13:51.000000000","message":"This now gets called below with the appropriate compute_info parameter instead of being a test itself.  I suppose I could remove the compute_info\u003dTrue test below since the parameter defaults to that, but I think I like this form better.  If you would prefer it the other way I can change it though.","commit_id":"2e81df49d6b46240a3c0b4e6206e08e87e879e7a"},{"author":{"_account_id":5174,"name":"Mauro Sergio Martins Rodrigues","email":"maurosr@linux.vnet.ibm.com","username":"maurosr"},"change_message_id":"79cfaf3b9a500e50ef3c475947d18c005131835c","unresolved":false,"context_lines":[{"line_number":3619,"context_line":"                False,"},{"line_number":3620,"context_line":"                fake_block_dev_info)"},{"line_number":3621,"context_line":"        self.compute._get_power_state(admin_ctxt, instance).AndReturn("},{"line_number":3622,"context_line":"                \u0027fake_power_state\u0027)"},{"line_number":3623,"context_line":"        if compute_info:"},{"line_number":3624,"context_line":"            hypervisor_hostname \u003d \u0027fake_hypervisor_hostname\u0027"},{"line_number":3625,"context_line":"            fake_compute_info \u003d {\u0027hypervisor_hostname\u0027: hypervisor_hostname}"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2FlK8%3D","line":3622,"updated":"2013-05-03 02:07:57.000000000","message":"I think would be nice to have all the specific parts below into the tests, instead of here, this way we avoid this if/else here, and let clear what conditions we have to approve each test","commit_id":"2e81df49d6b46240a3c0b4e6206e08e87e879e7a"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"bc1ec09ca735222ca0be1968218f7bd2dbe5bee5","unresolved":false,"context_lines":[{"line_number":3619,"context_line":"                False,"},{"line_number":3620,"context_line":"                fake_block_dev_info)"},{"line_number":3621,"context_line":"        self.compute._get_power_state(admin_ctxt, instance).AndReturn("},{"line_number":3622,"context_line":"                \u0027fake_power_state\u0027)"},{"line_number":3623,"context_line":"        if compute_info:"},{"line_number":3624,"context_line":"            hypervisor_hostname \u003d \u0027fake_hypervisor_hostname\u0027"},{"line_number":3625,"context_line":"            fake_compute_info \u003d {\u0027hypervisor_hostname\u0027: hypervisor_hostname}"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2Fkhc%3D","line":3622,"in_reply_to":"AAAAOn%2F%2FlK8%3D","updated":"2013-05-03 14:51:21.000000000","message":"Okay, I think I can do that too.","commit_id":"2e81df49d6b46240a3c0b4e6206e08e87e879e7a"}]}
