)]}'
{"nova/compute/manager.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"fa12fcf498bf55416b4d0e984697d32173cb5bff","unresolved":false,"context_lines":[{"line_number":7609,"context_line":"        elif vm_state \u003d\u003d vm_states.ACTIVE:"},{"line_number":7610,"context_line":"            # The only rational power state should be RUNNING"},{"line_number":7611,"context_line":"            if vm_power_state in (power_state.SHUTDOWN,"},{"line_number":7612,"context_line":"                                  power_state.CRASHED):"},{"line_number":7613,"context_line":"                # this is an exceptional case; make sure our data is up"},{"line_number":7614,"context_line":"                # to date before slamming through a power off"},{"line_number":7615,"context_line":"                vm_instance \u003d self.driver.get_info(db_instance,"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_c9228ba3","line":7612,"updated":"2019-02-14 23:15:09.000000000","message":"I was thinking, I wonder if we could put this part into a helper method, to avoid making all the room for the statements even smaller with yet another indentation.","commit_id":"da972e3432ef0f7a242510a52484bc5660d9806c"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"55ac5593f033d90624230d359111c761a9187678","unresolved":false,"context_lines":[{"line_number":7609,"context_line":"        elif vm_state \u003d\u003d vm_states.ACTIVE:"},{"line_number":7610,"context_line":"            # The only rational power state should be RUNNING"},{"line_number":7611,"context_line":"            if vm_power_state in (power_state.SHUTDOWN,"},{"line_number":7612,"context_line":"                                  power_state.CRASHED):"},{"line_number":7613,"context_line":"                # this is an exceptional case; make sure our data is up"},{"line_number":7614,"context_line":"                # to date before slamming through a power off"},{"line_number":7615,"context_line":"                vm_instance \u003d self.driver.get_info(db_instance,"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_53f1396a","line":7612,"in_reply_to":"9fdfeff1_c9228ba3","updated":"2019-02-18 22:03:27.000000000","message":"Good idea, done","commit_id":"da972e3432ef0f7a242510a52484bc5660d9806c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"017d1158e29a1422d37307478385ff67fb42fdf4","unresolved":false,"context_lines":[{"line_number":7546,"context_line":"                                           vm_power_state):"},{"line_number":7547,"context_line":"        # this is an exceptional case; make sure our data is up"},{"line_number":7548,"context_line":"        # to date before slamming through a power off"},{"line_number":7549,"context_line":"        # TODO(jroll) remove the check for TypeError here;"},{"line_number":7550,"context_line":"        # it\u0027s only here to be able to backport this without"},{"line_number":7551,"context_line":"        # breaking out-of-tree drivers."},{"line_number":7552,"context_line":"        try:"},{"line_number":7553,"context_line":"            vm_instance \u003d self.driver.get_info(db_instance,"},{"line_number":7554,"context_line":"                                               use_cache\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9fdfeff1_d146bc21","line":7551,"range":{"start_line":7549,"start_character":0,"end_line":7551,"end_character":39},"updated":"2019-02-27 19:57:22.000000000","message":"whereupon you can also remove the vm_power_state arg to this method, yah?","commit_id":"a4d348fd499328cd58fb786504b0dda37d677f57"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"11218f852d8ef47caa458a056641415f44693d39","unresolved":false,"context_lines":[{"line_number":7546,"context_line":"                                           vm_power_state):"},{"line_number":7547,"context_line":"        # this is an exceptional case; make sure our data is up"},{"line_number":7548,"context_line":"        # to date before slamming through a power off"},{"line_number":7549,"context_line":"        # TODO(jroll) remove the check for TypeError here;"},{"line_number":7550,"context_line":"        # it\u0027s only here to be able to backport this without"},{"line_number":7551,"context_line":"        # breaking out-of-tree drivers."},{"line_number":7552,"context_line":"        try:"},{"line_number":7553,"context_line":"            vm_instance \u003d self.driver.get_info(db_instance,"},{"line_number":7554,"context_line":"                                               use_cache\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9fdfeff1_c6058d11","line":7551,"range":{"start_line":7549,"start_character":0,"end_line":7551,"end_character":39},"in_reply_to":"9fdfeff1_d146bc21","updated":"2019-02-28 14:21:31.000000000","message":"Yes.","commit_id":"a4d348fd499328cd58fb786504b0dda37d677f57"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4b3151aab44bb801a05edd08f7a643ab8fd00ed3","unresolved":false,"context_lines":[{"line_number":7525,"context_line":"            return"},{"line_number":7526,"context_line":"        # No pending tasks. Now try to figure out the real vm_power_state."},{"line_number":7527,"context_line":"        try:"},{"line_number":7528,"context_line":"            vm_instance \u003d self.driver.get_info(db_instance)"},{"line_number":7529,"context_line":"            vm_power_state \u003d vm_instance.state"},{"line_number":7530,"context_line":"        except exception.InstanceNotFound:"},{"line_number":7531,"context_line":"            vm_power_state \u003d power_state.NOSTATE"},{"line_number":7532,"context_line":"        # Note(maoy): the above get_info call might take a long time,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_72a48d07","line":7529,"range":{"start_line":7528,"start_character":12,"end_line":7529,"end_character":46},"updated":"2019-02-28 23:15:46.000000000","message":"OK so this is where a non-ironic driver before this change would get it\u0027s vm_power_state and pass that through...","commit_id":"448139b5a7876ffc86b625f5897fccafe3353786"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"66be719318b7bb1f0d64a13b73b9c417481b2aee","unresolved":false,"context_lines":[{"line_number":7554,"context_line":"                                               use_cache\u003dFalse)"},{"line_number":7555,"context_line":"            vm_power_state \u003d vm_instance.state"},{"line_number":7556,"context_line":"        except TypeError:"},{"line_number":7557,"context_line":"            pass"},{"line_number":7558,"context_line":""},{"line_number":7559,"context_line":"        # if it still looks off, go ahead and call stop()"},{"line_number":7560,"context_line":"        if vm_power_state in (power_state.SHUTDOWN,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_521e295f","line":7557,"updated":"2019-02-28 23:09:49.000000000","message":"Do we not want to emit a warning log here? For out of tree people to update their driver?","commit_id":"448139b5a7876ffc86b625f5897fccafe3353786"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"673ccb42d89bb149fafc1d586fc2cd9ca92094f6","unresolved":false,"context_lines":[{"line_number":7554,"context_line":"                                               use_cache\u003dFalse)"},{"line_number":7555,"context_line":"            vm_power_state \u003d vm_instance.state"},{"line_number":7556,"context_line":"        except TypeError:"},{"line_number":7557,"context_line":"            pass"},{"line_number":7558,"context_line":""},{"line_number":7559,"context_line":"        # if it still looks off, go ahead and call stop()"},{"line_number":7560,"context_line":"        if vm_power_state in (power_state.SHUTDOWN,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_f22cfd93","line":7557,"range":{"start_line":7557,"start_character":12,"end_line":7557,"end_character":16},"updated":"2019-02-28 23:12:40.000000000","message":"I\u0027d probably log this yeah? That\u0027s an indication to an out of tree driver they have an interface change to make, but maybe not a big deal if they don\u0027t need this anyway - however, their driver wouldn\u0027t be doing the power sync state stuff properly right?\n\nIn other words:\n\ntry:\n  vm_instance \u003d self.driver.get_info(db_instance,\n                                     use_cache\u003dFalse)\nexcept TypeError:\n  LOG.warning(\u0027something about your driver is out of date\u0027\n  vm_instance \u003d self.driver.get_info(db_instance)\nvm_power_state \u003d vm_instance.state","commit_id":"448139b5a7876ffc86b625f5897fccafe3353786"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"de983e28e821d21987884aee4c8d3ca7732fa75c","unresolved":false,"context_lines":[{"line_number":7554,"context_line":"                                               use_cache\u003dFalse)"},{"line_number":7555,"context_line":"            vm_power_state \u003d vm_instance.state"},{"line_number":7556,"context_line":"        except TypeError:"},{"line_number":7557,"context_line":"            pass"},{"line_number":7558,"context_line":""},{"line_number":7559,"context_line":"        # if it still looks off, go ahead and call stop()"},{"line_number":7560,"context_line":"        if vm_power_state in (power_state.SHUTDOWN,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_323cc5bd","line":7557,"in_reply_to":"9fdfeff1_521e295f","updated":"2019-02-28 23:11:41.000000000","message":"But maybe that\u0027s overkill for out-of-tree handling. It\u0027s already mentioned in the reno.","commit_id":"448139b5a7876ffc86b625f5897fccafe3353786"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"de682805696a59e1caa2cfcbc33af71ccb744e64","unresolved":false,"context_lines":[{"line_number":7554,"context_line":"                                               use_cache\u003dFalse)"},{"line_number":7555,"context_line":"            vm_power_state \u003d vm_instance.state"},{"line_number":7556,"context_line":"        except TypeError:"},{"line_number":7557,"context_line":"            pass"},{"line_number":7558,"context_line":""},{"line_number":7559,"context_line":"        # if it still looks off, go ahead and call stop()"},{"line_number":7560,"context_line":"        if vm_power_state in (power_state.SHUTDOWN,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_027281e3","line":7557,"range":{"start_line":7557,"start_character":12,"end_line":7557,"end_character":16},"in_reply_to":"9fdfeff1_9284915f","updated":"2019-03-01 17:08:16.000000000","message":"Yeah, we\u0027re okay logic-wise. I\u0027ll throw a warning in.","commit_id":"448139b5a7876ffc86b625f5897fccafe3353786"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4b3151aab44bb801a05edd08f7a643ab8fd00ed3","unresolved":false,"context_lines":[{"line_number":7554,"context_line":"                                               use_cache\u003dFalse)"},{"line_number":7555,"context_line":"            vm_power_state \u003d vm_instance.state"},{"line_number":7556,"context_line":"        except TypeError:"},{"line_number":7557,"context_line":"            pass"},{"line_number":7558,"context_line":""},{"line_number":7559,"context_line":"        # if it still looks off, go ahead and call stop()"},{"line_number":7560,"context_line":"        if vm_power_state in (power_state.SHUTDOWN,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_9284915f","line":7557,"range":{"start_line":7557,"start_character":12,"end_line":7557,"end_character":16},"in_reply_to":"9fdfeff1_f22cfd93","updated":"2019-02-28 23:15:46.000000000","message":"\u003e however, their driver wouldn\u0027t be doing the power sync state stuff properly right?\n\nNevermind, I guess we\u0027d just use the vm_power_state passed in and use that as before, but without doing any cache checking. So we\u0027re OK?","commit_id":"448139b5a7876ffc86b625f5897fccafe3353786"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"ce2c5b5ca5bbbcea5b966dd88cc8693f7e82ca21","unresolved":false,"context_lines":[{"line_number":7556,"context_line":"        except TypeError:"},{"line_number":7557,"context_line":"            LOG.warning(\"Your virt driver appears to not support the \""},{"line_number":7558,"context_line":"                        \"\u0027use_cache\u0027 parameter to the \u0027get_info\u0027 method; \""},{"line_number":7559,"context_line":"                        \"please update your virt driver.\")"},{"line_number":7560,"context_line":""},{"line_number":7561,"context_line":"        # if it still looks off, go ahead and call stop()"},{"line_number":7562,"context_line":"        if vm_power_state in (power_state.SHUTDOWN,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9fdfeff1_92ec7af5","line":7559,"updated":"2019-03-01 20:39:53.000000000","message":"✔","commit_id":"19cb8280232fd3b0ba0000a475d061ea9fb10e1a"}],"nova/tests/unit/compute/test_compute_mgr.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"839f90e1dbd26fd11aeb87b36e4de1b98d630c60","unresolved":false,"context_lines":[{"line_number":1796,"context_line":"    @mock.patch.object(objects.Instance, \u0027save\u0027)"},{"line_number":1797,"context_line":"    def test_sync_instance_power_state_running_stopped(self, mock_save,"},{"line_number":1798,"context_line":"                                                       mock_refresh,"},{"line_number":1799,"context_line":"                                                       mock_get_info):"},{"line_number":1800,"context_line":"        mock_get_info.return_value \u003d hardware.InstanceInfo("},{"line_number":1801,"context_line":"            state\u003dpower_state.SHUTDOWN)"},{"line_number":1802,"context_line":"        instance \u003d self._get_sync_instance(power_state.RUNNING,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_f759028e","line":1799,"range":{"start_line":1799,"start_character":55,"end_line":1799,"end_character":68},"updated":"2019-02-20 17:10:28.000000000","message":"Don\u0027t you want to assert this is called with use_cache\u003dFalse?","commit_id":"d02427f51823019974f2a5316e0cdd567be12711"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"158da838af7be54dce60c67bb9617dc29cfff805","unresolved":false,"context_lines":[{"line_number":1796,"context_line":"    @mock.patch.object(objects.Instance, \u0027save\u0027)"},{"line_number":1797,"context_line":"    def test_sync_instance_power_state_running_stopped(self, mock_save,"},{"line_number":1798,"context_line":"                                                       mock_refresh,"},{"line_number":1799,"context_line":"                                                       mock_get_info):"},{"line_number":1800,"context_line":"        mock_get_info.return_value \u003d hardware.InstanceInfo("},{"line_number":1801,"context_line":"            state\u003dpower_state.SHUTDOWN)"},{"line_number":1802,"context_line":"        instance \u003d self._get_sync_instance(power_state.RUNNING,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_d70b14d2","line":1799,"range":{"start_line":1799,"start_character":55,"end_line":1799,"end_character":68},"in_reply_to":"9fdfeff1_f759028e","updated":"2019-02-27 16:24:29.000000000","message":"Done","commit_id":"d02427f51823019974f2a5316e0cdd567be12711"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"839f90e1dbd26fd11aeb87b36e4de1b98d630c60","unresolved":false,"context_lines":[{"line_number":1820,"context_line":"            mock.patch.object(self.compute.compute_api, \u0027force_stop\u0027),"},{"line_number":1821,"context_line":"            mock.patch.object(self.compute.driver, \u0027get_info\u0027)"},{"line_number":1822,"context_line":"        ) as (mock_refresh, mock_save, mock_stop, mock_delete, mock_force,"},{"line_number":1823,"context_line":"              mock_get_info):"},{"line_number":1824,"context_line":"            mock_get_info.return_value \u003d hardware.InstanceInfo("},{"line_number":1825,"context_line":"                state\u003ddriver_power_state)"},{"line_number":1826,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_d7507e61","line":1823,"range":{"start_line":1823,"start_character":14,"end_line":1823,"end_character":27},"updated":"2019-02-20 17:10:28.000000000","message":"same","commit_id":"d02427f51823019974f2a5316e0cdd567be12711"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"158da838af7be54dce60c67bb9617dc29cfff805","unresolved":false,"context_lines":[{"line_number":1820,"context_line":"            mock.patch.object(self.compute.compute_api, \u0027force_stop\u0027),"},{"line_number":1821,"context_line":"            mock.patch.object(self.compute.driver, \u0027get_info\u0027)"},{"line_number":1822,"context_line":"        ) as (mock_refresh, mock_save, mock_stop, mock_delete, mock_force,"},{"line_number":1823,"context_line":"              mock_get_info):"},{"line_number":1824,"context_line":"            mock_get_info.return_value \u003d hardware.InstanceInfo("},{"line_number":1825,"context_line":"                state\u003ddriver_power_state)"},{"line_number":1826,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_f70e58e2","line":1823,"range":{"start_line":1823,"start_character":14,"end_line":1823,"end_character":27},"in_reply_to":"9fdfeff1_d7507e61","updated":"2019-02-27 16:24:29.000000000","message":"Done","commit_id":"d02427f51823019974f2a5316e0cdd567be12711"}],"nova/tests/unit/virt/ironic/test_driver.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"e4ff625b34ad3d96c8fe1aca61ed01151e4f6aab","unresolved":false,"context_lines":[{"line_number":1124,"context_line":"        result \u003d self.driver.get_info(instance, use_cache\u003dFalse)"},{"line_number":1125,"context_line":"        self.assertEqual(hardware.InstanceInfo(state\u003dnova_states.RUNNING),"},{"line_number":1126,"context_line":"                         result)"},{"line_number":1127,"context_line":"        mock_gbiu.assert_called_once()"},{"line_number":1128,"context_line":"        mock_gbiu.assert_called_once_with(instance.uuid,"},{"line_number":1129,"context_line":"                                          fields\u003dironic_driver._NODE_FIELDS)"},{"line_number":1130,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_2ee42b3c","line":1127,"updated":"2019-02-20 00:20:04.000000000","message":"This line looks redundant with L1128. (Ah, I see it\u0027s just a copy-paste from test_get_info_not_found_in_cache)","commit_id":"d02427f51823019974f2a5316e0cdd567be12711"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"bb273e97f1b30f3250195cce6e7b36991d6f1c15","unresolved":false,"context_lines":[{"line_number":1124,"context_line":"        result \u003d self.driver.get_info(instance, use_cache\u003dFalse)"},{"line_number":1125,"context_line":"        self.assertEqual(hardware.InstanceInfo(state\u003dnova_states.RUNNING),"},{"line_number":1126,"context_line":"                         result)"},{"line_number":1127,"context_line":"        mock_gbiu.assert_called_once()"},{"line_number":1128,"context_line":"        mock_gbiu.assert_called_once_with(instance.uuid,"},{"line_number":1129,"context_line":"                                          fields\u003dironic_driver._NODE_FIELDS)"},{"line_number":1130,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_7dd8991d","line":1127,"in_reply_to":"9fdfeff1_2ee42b3c","updated":"2019-02-20 12:36:59.000000000","message":"Whoops, will remove.","commit_id":"d02427f51823019974f2a5316e0cdd567be12711"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"158da838af7be54dce60c67bb9617dc29cfff805","unresolved":false,"context_lines":[{"line_number":1124,"context_line":"        result \u003d self.driver.get_info(instance, use_cache\u003dFalse)"},{"line_number":1125,"context_line":"        self.assertEqual(hardware.InstanceInfo(state\u003dnova_states.RUNNING),"},{"line_number":1126,"context_line":"                         result)"},{"line_number":1127,"context_line":"        mock_gbiu.assert_called_once()"},{"line_number":1128,"context_line":"        mock_gbiu.assert_called_once_with(instance.uuid,"},{"line_number":1129,"context_line":"                                          fields\u003dironic_driver._NODE_FIELDS)"},{"line_number":1130,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_f75bb882","line":1127,"in_reply_to":"9fdfeff1_7dd8991d","updated":"2019-02-27 16:24:29.000000000","message":"Done","commit_id":"d02427f51823019974f2a5316e0cdd567be12711"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"e4ff625b34ad3d96c8fe1aca61ed01151e4f6aab","unresolved":false,"context_lines":[{"line_number":1126,"context_line":"                         result)"},{"line_number":1127,"context_line":"        mock_gbiu.assert_called_once()"},{"line_number":1128,"context_line":"        mock_gbiu.assert_called_once_with(instance.uuid,"},{"line_number":1129,"context_line":"                                          fields\u003dironic_driver._NODE_FIELDS)"},{"line_number":1130,"context_line":""},{"line_number":1131,"context_line":"    @mock.patch.object(ironic_driver.IronicDriver, \u0027_get_node_list\u0027)"},{"line_number":1132,"context_line":"    @mock.patch.object(objects.InstanceList, \u0027get_uuids_by_host\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_54681e86","line":1129,"updated":"2019-02-20 00:20:04.000000000","message":"Note to self: this verifies that we\u0027ve fetched fresh data from ironic.","commit_id":"d02427f51823019974f2a5316e0cdd567be12711"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"bb273e97f1b30f3250195cce6e7b36991d6f1c15","unresolved":false,"context_lines":[{"line_number":1126,"context_line":"                         result)"},{"line_number":1127,"context_line":"        mock_gbiu.assert_called_once()"},{"line_number":1128,"context_line":"        mock_gbiu.assert_called_once_with(instance.uuid,"},{"line_number":1129,"context_line":"                                          fields\u003dironic_driver._NODE_FIELDS)"},{"line_number":1130,"context_line":""},{"line_number":1131,"context_line":"    @mock.patch.object(ironic_driver.IronicDriver, \u0027_get_node_list\u0027)"},{"line_number":1132,"context_line":"    @mock.patch.object(objects.InstanceList, \u0027get_uuids_by_host\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_ddf4258a","line":1129,"in_reply_to":"9fdfeff1_54681e86","updated":"2019-02-20 12:36:59.000000000","message":"I\u0027ll add a comment, if that helps :)","commit_id":"d02427f51823019974f2a5316e0cdd567be12711"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"158da838af7be54dce60c67bb9617dc29cfff805","unresolved":false,"context_lines":[{"line_number":1126,"context_line":"                         result)"},{"line_number":1127,"context_line":"        mock_gbiu.assert_called_once()"},{"line_number":1128,"context_line":"        mock_gbiu.assert_called_once_with(instance.uuid,"},{"line_number":1129,"context_line":"                                          fields\u003dironic_driver._NODE_FIELDS)"},{"line_number":1130,"context_line":""},{"line_number":1131,"context_line":"    @mock.patch.object(ironic_driver.IronicDriver, \u0027_get_node_list\u0027)"},{"line_number":1132,"context_line":"    @mock.patch.object(objects.InstanceList, \u0027get_uuids_by_host\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_9756ec5b","line":1129,"in_reply_to":"9fdfeff1_ddf4258a","updated":"2019-02-27 16:24:29.000000000","message":"Done","commit_id":"d02427f51823019974f2a5316e0cdd567be12711"}],"nova/virt/driver.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"fa12fcf498bf55416b4d0e984697d32173cb5bff","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        \"\"\""},{"line_number":158,"context_line":"        pass"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def get_info(self, instance, use_cache\u003dTrue):"},{"line_number":161,"context_line":"        \"\"\"Get the current status of an instance."},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"        :param instance: nova.objects.instance.Instance object"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_49153b3c","line":160,"updated":"2019-02-14 23:15:09.000000000","message":"Initially I thought, this seems like an ironic-specific kwarg, but really any driver could implement a cache for this. So, I think it does fit in a generic way across any driver.","commit_id":"da972e3432ef0f7a242510a52484bc5660d9806c"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"55ac5593f033d90624230d359111c761a9187678","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        \"\"\""},{"line_number":158,"context_line":"        pass"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def get_info(self, instance, use_cache\u003dTrue):"},{"line_number":161,"context_line":"        \"\"\"Get the current status of an instance."},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"        :param instance: nova.objects.instance.Instance object"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_af5d9916","line":160,"in_reply_to":"9fdfeff1_49153b3c","updated":"2019-02-18 22:03:27.000000000","message":"Cool. Still need to add it to the other drivers.","commit_id":"da972e3432ef0f7a242510a52484bc5660d9806c"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"fa12fcf498bf55416b4d0e984697d32173cb5bff","unresolved":false,"context_lines":[{"line_number":160,"context_line":"    def get_info(self, instance, use_cache\u003dTrue):"},{"line_number":161,"context_line":"        \"\"\"Get the current status of an instance."},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"        :param instance: nova.objects.instance.Instance object"},{"line_number":164,"context_line":"        :returns: An InstanceInfo object"},{"line_number":165,"context_line":"        \"\"\""},{"line_number":166,"context_line":"        # TODO(Vek): Need to pass context in for access to auth_token"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_c58a71bd","line":163,"updated":"2019-02-14 23:15:09.000000000","message":"Need to add use_cache param to docstring.","commit_id":"da972e3432ef0f7a242510a52484bc5660d9806c"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"55ac5593f033d90624230d359111c761a9187678","unresolved":false,"context_lines":[{"line_number":160,"context_line":"    def get_info(self, instance, use_cache\u003dTrue):"},{"line_number":161,"context_line":"        \"\"\"Get the current status of an instance."},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"        :param instance: nova.objects.instance.Instance object"},{"line_number":164,"context_line":"        :returns: An InstanceInfo object"},{"line_number":165,"context_line":"        \"\"\""},{"line_number":166,"context_line":"        # TODO(Vek): Need to pass context in for access to auth_token"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_efa881da","line":163,"in_reply_to":"9fdfeff1_c58a71bd","updated":"2019-02-18 22:03:27.000000000","message":"Done","commit_id":"da972e3432ef0f7a242510a52484bc5660d9806c"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"e4ff625b34ad3d96c8fe1aca61ed01151e4f6aab","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        \"\"\""},{"line_number":158,"context_line":"        pass"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def get_info(self, instance, use_cache\u003dTrue):"},{"line_number":161,"context_line":"        \"\"\"Get the current status of an instance."},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"        :param instance: nova.objects.instance.Instance object"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_e524feb1","line":160,"updated":"2019-02-20 00:20:04.000000000","message":"Note: if the intent is to backport this fix, I\u0027m not sure if the addition of virt driver method signature change is going to be OK with stable policy. We should ask mriedem to confirm.","commit_id":"d02427f51823019974f2a5316e0cdd567be12711"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"158da838af7be54dce60c67bb9617dc29cfff805","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        \"\"\""},{"line_number":158,"context_line":"        pass"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def get_info(self, instance, use_cache\u003dTrue):"},{"line_number":161,"context_line":"        \"\"\"Get the current status of an instance."},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"        :param instance: nova.objects.instance.Instance object"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_f7e9787e","line":160,"in_reply_to":"9fdfeff1_177046dc","updated":"2019-02-27 16:24:29.000000000","message":"Done","commit_id":"d02427f51823019974f2a5316e0cdd567be12711"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"839f90e1dbd26fd11aeb87b36e4de1b98d630c60","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        \"\"\""},{"line_number":158,"context_line":"        pass"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def get_info(self, instance, use_cache\u003dTrue):"},{"line_number":161,"context_line":"        \"\"\"Get the current status of an instance."},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"        :param instance: nova.objects.instance.Instance object"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_177046dc","line":160,"in_reply_to":"9fdfeff1_1d386d3b","updated":"2019-02-20 17:10:28.000000000","message":"This will break out of tree drivers on stable if they don\u0027t add the kwarg when upgrading to the same code once the compute manager starts passing the kwarg:\n\nhttp://paste.openstack.org/show/745484/\n\nThe worst that will happen is the sync task will be busted until that out of tree driver interface is fixed.\n\nThis would at least be a note to the mailing list to make out of tree driver maintainers aware (as a courtesy). One could arguably also add a release note (upgrade) but that might be going overboard when we don\u0027t really have a versioned contract/interface with virt drivers. Another option is handling TypeError in the code that calls this and fallback to calling get_info() without the kwarg and then remove that in a follow up.","commit_id":"d02427f51823019974f2a5316e0cdd567be12711"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"bb273e97f1b30f3250195cce6e7b36991d6f1c15","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        \"\"\""},{"line_number":158,"context_line":"        pass"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def get_info(self, instance, use_cache\u003dTrue):"},{"line_number":161,"context_line":"        \"\"\"Get the current status of an instance."},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"        :param instance: nova.objects.instance.Instance object"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_1d386d3b","line":160,"in_reply_to":"9fdfeff1_e524feb1","updated":"2019-02-20 12:36:59.000000000","message":"Hrm, that\u0027s a good point. It feels fine given out of tree drivers aren\u0027t supported, but would also like Matt\u0027s opinion.\n\nI guess deployers can always cherry-pick this if needed, though it isn\u0027t ideal.","commit_id":"d02427f51823019974f2a5316e0cdd567be12711"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2c8d623395ca3a363a58b529b38b1e8adcfb334a","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        \"\"\"Get the current status of an instance."},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"        :param instance: nova.objects.instance.Instance object"},{"line_number":164,"context_line":"        :param use_cache: boolean to indicate if the driver should be allowed"},{"line_number":165,"context_line":"                          to use cached data to return instance status."},{"line_number":166,"context_line":"        :returns: An InstanceInfo object"},{"line_number":167,"context_line":"        \"\"\""},{"line_number":168,"context_line":"        # TODO(Vek): Need to pass context in for access to auth_token"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_f206f01c","line":165,"range":{"start_line":164,"start_character":8,"end_line":165,"end_character":71},"updated":"2019-02-20 17:12:49.000000000","message":"The default to True looks a bit weird in the drivers that don\u0027t use this variable, i.e. it\u0027s called \"use_cache\" but most drivers aren\u0027t using it. So maybe in this description it would be good to say, \"This only applies to drivers which cache instance state information. For drivers that do not use a cache, this parameter can be ignored.\"","commit_id":"d02427f51823019974f2a5316e0cdd567be12711"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"158da838af7be54dce60c67bb9617dc29cfff805","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        \"\"\"Get the current status of an instance."},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"        :param instance: nova.objects.instance.Instance object"},{"line_number":164,"context_line":"        :param use_cache: boolean to indicate if the driver should be allowed"},{"line_number":165,"context_line":"                          to use cached data to return instance status."},{"line_number":166,"context_line":"        :returns: An InstanceInfo object"},{"line_number":167,"context_line":"        \"\"\""},{"line_number":168,"context_line":"        # TODO(Vek): Need to pass context in for access to auth_token"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_37f4e05a","line":165,"range":{"start_line":164,"start_character":8,"end_line":165,"end_character":71},"in_reply_to":"9fdfeff1_f206f01c","updated":"2019-02-27 16:24:29.000000000","message":"Done","commit_id":"d02427f51823019974f2a5316e0cdd567be12711"}],"nova/virt/ironic/driver.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"fa12fcf498bf55416b4d0e984697d32173cb5bff","unresolved":false,"context_lines":[{"line_number":883,"context_line":"        If the instance is not found this method returns (a dictionary"},{"line_number":884,"context_line":"        with) NOSTATE and all resources \u003d\u003d 0."},{"line_number":885,"context_line":""},{"line_number":886,"context_line":"        :param instance: the instance object."},{"line_number":887,"context_line":"        :returns: an InstanceInfo object"},{"line_number":888,"context_line":"        \"\"\""},{"line_number":889,"context_line":"        def _fetch_from_ironic(self, instance):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_8590e9ee","line":886,"updated":"2019-02-14 23:15:09.000000000","message":"Need to add use_cache param to docstring.","commit_id":"da972e3432ef0f7a242510a52484bc5660d9806c"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"55ac5593f033d90624230d359111c761a9187678","unresolved":false,"context_lines":[{"line_number":883,"context_line":"        If the instance is not found this method returns (a dictionary"},{"line_number":884,"context_line":"        with) NOSTATE and all resources \u003d\u003d 0."},{"line_number":885,"context_line":""},{"line_number":886,"context_line":"        :param instance: the instance object."},{"line_number":887,"context_line":"        :returns: an InstanceInfo object"},{"line_number":888,"context_line":"        \"\"\""},{"line_number":889,"context_line":"        def _fetch_from_ironic(self, instance):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_afb27948","line":886,"in_reply_to":"9fdfeff1_8590e9ee","updated":"2019-02-18 22:03:27.000000000","message":"Done","commit_id":"da972e3432ef0f7a242510a52484bc5660d9806c"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"fa12fcf498bf55416b4d0e984697d32173cb5bff","unresolved":false,"context_lines":[{"line_number":906,"context_line":"                break"},{"line_number":907,"context_line":"        else:"},{"line_number":908,"context_line":"            # if we can\u0027t find the instance, fall back to ironic"},{"line_number":909,"context_line":"            return _fetch_from_ironic(self, instance)"},{"line_number":910,"context_line":""},{"line_number":911,"context_line":"        return hardware.InstanceInfo(state\u003dmap_power_state(node.power_state))"},{"line_number":912,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_e521b5b5","line":909,"updated":"2019-02-14 23:15:09.000000000","message":"This is a change in behavior where, if _validate_instance_and_node doesn\u0027t raise, the result from self.ironicclient.call(\u0027node.get_by_instance_uuid\u0027, ...) will be returned instead of a hardware.InstanceInfo object. I didn\u0027t think that\u0027s intended, but let me know if it is.","commit_id":"da972e3432ef0f7a242510a52484bc5660d9806c"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"55ac5593f033d90624230d359111c761a9187678","unresolved":false,"context_lines":[{"line_number":906,"context_line":"                break"},{"line_number":907,"context_line":"        else:"},{"line_number":908,"context_line":"            # if we can\u0027t find the instance, fall back to ironic"},{"line_number":909,"context_line":"            return _fetch_from_ironic(self, instance)"},{"line_number":910,"context_line":""},{"line_number":911,"context_line":"        return hardware.InstanceInfo(state\u003dmap_power_state(node.power_state))"},{"line_number":912,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_0f7b857b","line":909,"in_reply_to":"9fdfeff1_e521b5b5","updated":"2019-02-18 22:03:27.000000000","message":"Oof, good catch. Thanks!","commit_id":"da972e3432ef0f7a242510a52484bc5660d9806c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a331faa02aa9a1f100ee2a83de8983a621e0c761","unresolved":false,"context_lines":[{"line_number":899,"context_line":"                    state\u003dmap_power_state(ironic_states.NOSTATE))"},{"line_number":900,"context_line":""},{"line_number":901,"context_line":"        if not use_cache:"},{"line_number":902,"context_line":"            return _fetch_from_ironic(self, instance)"},{"line_number":903,"context_line":""},{"line_number":904,"context_line":"        # we should already have a cache for our nodes, refreshed on every"},{"line_number":905,"context_line":"        # RT loop. but if we don\u0027t have a cache, generate it."}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_9230c4ea","line":902,"updated":"2019-02-20 17:14:38.000000000","message":"Probably not for this change, but in a follow up, wouldn\u0027t you want to update the node_cache for this node since you just fetched it fresh from ironic? Because your stale cache could break something elsewhere right? Might as well update it while you have the fresh thing (or put it in the cache if it wasn\u0027t there to begin with).","commit_id":"d02427f51823019974f2a5316e0cdd567be12711"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"158da838af7be54dce60c67bb9617dc29cfff805","unresolved":false,"context_lines":[{"line_number":899,"context_line":"                    state\u003dmap_power_state(ironic_states.NOSTATE))"},{"line_number":900,"context_line":""},{"line_number":901,"context_line":"        if not use_cache:"},{"line_number":902,"context_line":"            return _fetch_from_ironic(self, instance)"},{"line_number":903,"context_line":""},{"line_number":904,"context_line":"        # we should already have a cache for our nodes, refreshed on every"},{"line_number":905,"context_line":"        # RT loop. but if we don\u0027t have a cache, generate it."}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_7a2d6d8d","line":902,"in_reply_to":"9fdfeff1_9230c4ea","updated":"2019-02-27 16:24:29.000000000","message":"Yeah, that might be a good idea. I worry a bit about refreshing multiple times in the power sync loop as that\u0027s a fairly massive API operation, and not many nodes should get into the state that this patch fixes. However, if many nodes do go that way, it\u0027s a lot of API calls. I\u0027ll think on it.","commit_id":"d02427f51823019974f2a5316e0cdd567be12711"}],"nova/virt/powervm/driver.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"017d1158e29a1422d37307478385ff67fb42fdf4","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        \"\"\"Get the current status of an instance."},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        :param instance: nova.objects.instance.Instance object"},{"line_number":123,"context_line":"        :param get_info: unused in this driver"},{"line_number":124,"context_line":"        :returns: An InstanceInfo object."},{"line_number":125,"context_line":"        \"\"\""},{"line_number":126,"context_line":"        return vm.get_vm_info(self.adapter, instance)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9fdfeff1_d11d5c0f","line":123,"range":{"start_line":123,"start_character":15,"end_line":123,"end_character":23},"updated":"2019-02-27 19:57:22.000000000","message":"use_cache","commit_id":"a4d348fd499328cd58fb786504b0dda37d677f57"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"11218f852d8ef47caa458a056641415f44693d39","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        \"\"\"Get the current status of an instance."},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        :param instance: nova.objects.instance.Instance object"},{"line_number":123,"context_line":"        :param get_info: unused in this driver"},{"line_number":124,"context_line":"        :returns: An InstanceInfo object."},{"line_number":125,"context_line":"        \"\"\""},{"line_number":126,"context_line":"        return vm.get_vm_info(self.adapter, instance)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9fdfeff1_6614e141","line":123,"range":{"start_line":123,"start_character":15,"end_line":123,"end_character":23},"in_reply_to":"9fdfeff1_d11d5c0f","updated":"2019-02-28 14:21:31.000000000","message":"Jeeeeeeeez.","commit_id":"a4d348fd499328cd58fb786504b0dda37d677f57"}]}
