)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9bb67e084751150f93e96762bbcc84a1d4722018","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Grab fresh info from the driver during nova start/stop actions"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In drivers that use a cache to store the node info (presently only"},{"line_number":10,"context_line":"ironic), the \"_get_power_state\" function called during instance start or"},{"line_number":11,"context_line":"stop actions grabs the information from the node cache and saves it"},{"line_number":12,"context_line":"in the nova database instead of getting fresh information from the"},{"line_number":13,"context_line":"driver. This leads to inconsistency between the vm_state and power_state"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9fb8cfa7_625b1754","line":10,"range":{"start_line":10,"start_character":0,"end_line":10,"end_character":6},"updated":"2019-06-18 21:20:54.000000000","message":"nts: since I907b69eb689cf6c169a4869cfc7889308ca419d5","commit_id":"c9ad7ab24e04139a68f31a192dda827a811c2d1e"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"e54a0ea77386400a08639dff103d76bcf0a24039","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Grab fresh info from the driver during nova start/stop actions"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In drivers that use a cache to store the node info (presently only"},{"line_number":10,"context_line":"ironic), the \"_get_power_state\" function called during instance start or"},{"line_number":11,"context_line":"stop actions grabs the information from the node cache and saves it"},{"line_number":12,"context_line":"in the nova database instead of getting fresh information from the"},{"line_number":13,"context_line":"driver. This leads to inconsistency between the vm_state and power_state"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9fb8cfa7_9bd3f6d5","line":10,"range":{"start_line":10,"start_character":0,"end_line":10,"end_character":6},"in_reply_to":"9fb8cfa7_625b1754","updated":"2019-06-20 08:39:55.000000000","message":"oops its since I0069cbc327d952d42dbb8fe54949faab89995a7e","commit_id":"c9ad7ab24e04139a68f31a192dda827a811c2d1e"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21f453dfbf791e9b70e54354df9090040349e892","unresolved":false,"context_lines":[{"line_number":19,"context_line":"for about ten minutes which is the default value for the"},{"line_number":20,"context_line":"sync_power_state_interval interval."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"This patch changes the \"use_cache\" to False when doing a start or stop"},{"line_number":23,"context_line":"on an instance."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"[1] I907b69eb689cf6c169a4869cfc7889308ca419d5"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9fb8cfa7_e9ca839f","line":23,"range":{"start_line":22,"start_character":0,"end_line":23,"end_character":15},"updated":"2019-06-19 10:01:30.000000000","message":"I am not sure what all instance actions are supported for the ironic driver other than start/stop.. maybe also reboot ? in which case I have to change those actions to not use cache when getting the power_state.","commit_id":"dfe7e3de10671cf9cb3d9c0474e33e4253582941"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"79edc2b8139328ce8f4a44120448619ce0374daf","unresolved":false,"context_lines":[{"line_number":19,"context_line":"for about ten minutes which is the default value for the"},{"line_number":20,"context_line":"sync_power_state_interval interval."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"This patch changes the \"use_cache\" to False when doing a start or stop"},{"line_number":23,"context_line":"on an instance."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"[1] I907b69eb689cf6c169a4869cfc7889308ca419d5"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9fb8cfa7_de3f2e85","line":23,"range":{"start_line":22,"start_character":0,"end_line":23,"end_character":15},"in_reply_to":"9fb8cfa7_8950a7d6","updated":"2019-06-19 14:09:12.000000000","message":"I wonder if it would be better simply to always use_cache\u003dFalse from _get_power_state and _sync_power_states, rather than trying to pick and choose higher up in the stack. I\u0027m not sure what good it would ever conceivably do to use a cached power state.","commit_id":"dfe7e3de10671cf9cb3d9c0474e33e4253582941"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"507279d96c7891e05139fae04795d23ea6bf41a2","unresolved":false,"context_lines":[{"line_number":19,"context_line":"for about ten minutes which is the default value for the"},{"line_number":20,"context_line":"sync_power_state_interval interval."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"This patch changes the \"use_cache\" to False when doing a start or stop"},{"line_number":23,"context_line":"on an instance."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"[1] I907b69eb689cf6c169a4869cfc7889308ca419d5"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9fb8cfa7_bbd11a5a","line":23,"range":{"start_line":22,"start_character":0,"end_line":23,"end_character":15},"in_reply_to":"9fb8cfa7_de3f2e85","updated":"2019-06-20 08:13:14.000000000","message":"\u003e I wonder if it would be better simply to always use_cache\u003dFalse\n \u003e from _get_power_state and _sync_power_states, rather than trying to\n \u003e pick and choose higher up in the stack. I\u0027m not sure what good it\n \u003e would ever conceivably do to use a cached power state.\n\nAFAIK, the only good is during the nova-ironic power sync, where instead of always hitting the ironic-api in a serial fashion for all the nodes, it uses the cache and then hits the ironic-api only if there is an inconsistency to confirm the real-time power-state. But I agree with you that for at least all the actions on an instance, we should just stop using the cache, since anyways no other driver uses the cache and even for ironic it doesn\u0027t support all actions like pause/unpause etc.. I think its only start/stop/reboot. So it shouldn\u0027t hurt.","commit_id":"dfe7e3de10671cf9cb3d9c0474e33e4253582941"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"da4b1837af7097571449bc5c7b153626df98f3a6","unresolved":false,"context_lines":[{"line_number":19,"context_line":"for about ten minutes which is the default value for the"},{"line_number":20,"context_line":"sync_power_state_interval interval."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"This patch changes the \"use_cache\" to False when doing a start or stop"},{"line_number":23,"context_line":"on an instance."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"[1] I907b69eb689cf6c169a4869cfc7889308ca419d5"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9fb8cfa7_8950a7d6","line":23,"range":{"start_line":22,"start_character":0,"end_line":23,"end_character":15},"in_reply_to":"9fb8cfa7_e9ca839f","updated":"2019-06-19 12:37:11.000000000","message":"yep I have to update this to support reboot, let me see if there are other actions supported by the ironic driver.","commit_id":"dfe7e3de10671cf9cb3d9c0474e33e4253582941"}],"nova/compute/manager.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9bb67e084751150f93e96762bbcc84a1d4722018","unresolved":false,"context_lines":[{"line_number":2831,"context_line":""},{"line_number":2832,"context_line":"            self._power_off_instance(context, instance, clean_shutdown)"},{"line_number":2833,"context_line":"            instance.power_state \u003d self._get_power_state("},{"line_number":2834,"context_line":"                context, instance, use_cache\u003dFalse)"},{"line_number":2835,"context_line":"            instance.vm_state \u003d vm_states.STOPPED"},{"line_number":2836,"context_line":"            instance.task_state \u003d None"},{"line_number":2837,"context_line":"            instance.save(expected_task_state\u003dexpected_task_state)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_8212cb61","line":2834,"range":{"start_line":2834,"start_character":35,"end_line":2834,"end_character":50},"updated":"2019-06-18 21:20:54.000000000","message":"don\u0027t seem to have UT for this","commit_id":"c9ad7ab24e04139a68f31a192dda827a811c2d1e"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"84d2d4f9d4efc68c13331dfb01d80445754f19de","unresolved":false,"context_lines":[{"line_number":2831,"context_line":""},{"line_number":2832,"context_line":"            self._power_off_instance(context, instance, clean_shutdown)"},{"line_number":2833,"context_line":"            instance.power_state \u003d self._get_power_state("},{"line_number":2834,"context_line":"                context, instance, use_cache\u003dFalse)"},{"line_number":2835,"context_line":"            instance.vm_state \u003d vm_states.STOPPED"},{"line_number":2836,"context_line":"            instance.task_state \u003d None"},{"line_number":2837,"context_line":"            instance.save(expected_task_state\u003dexpected_task_state)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_f8332f61","line":2834,"range":{"start_line":2834,"start_character":35,"end_line":2834,"end_character":50},"in_reply_to":"9fb8cfa7_8212cb61","updated":"2019-06-19 07:38:55.000000000","message":"yeah well I just thought its a cache bool trivial change and didn\u0027t add one but if you feel it needs a UT I can add one.","commit_id":"c9ad7ab24e04139a68f31a192dda827a811c2d1e"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9bb67e084751150f93e96762bbcc84a1d4722018","unresolved":false,"context_lines":[{"line_number":2882,"context_line":"            phase\u003dfields.NotificationPhase.START)"},{"line_number":2883,"context_line":"        self._power_on(context, instance)"},{"line_number":2884,"context_line":"        instance.power_state \u003d self._get_power_state("},{"line_number":2885,"context_line":"            context, instance, use_cache\u003dFalse)"},{"line_number":2886,"context_line":"        instance.vm_state \u003d vm_states.ACTIVE"},{"line_number":2887,"context_line":"        instance.task_state \u003d None"},{"line_number":2888,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_a217cf51","line":2885,"range":{"start_line":2885,"start_character":31,"end_line":2885,"end_character":46},"updated":"2019-06-18 21:20:54.000000000","message":"ditto","commit_id":"c9ad7ab24e04139a68f31a192dda827a811c2d1e"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"f67010c6ddef13c1647ea89602d8b3c0c7f59109","unresolved":false,"context_lines":[{"line_number":1277,"context_line":"        self.update_available_resource(nova.context.get_admin_context(),"},{"line_number":1278,"context_line":"                                       startup\u003dTrue)"},{"line_number":1279,"context_line":""},{"line_number":1280,"context_line":"    def _get_power_state(self, context, instance, use_cache\u003dFalse):"},{"line_number":1281,"context_line":"        \"\"\"Retrieve the power state for the given instance.\"\"\""},{"line_number":1282,"context_line":"        LOG.debug(\u0027Checking state\u0027, instance\u003dinstance)"},{"line_number":1283,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_9b10d6aa","line":1280,"range":{"start_line":1280,"start_character":50,"end_line":1280,"end_character":65},"updated":"2019-06-20 08:38:03.000000000","message":"I know we could just pass it in the get_info directly, this is just a fail-safe in case someone feels it should be use_cache\u003dTrue for something in the future.","commit_id":"bc22a2e75c9d17ec44dbab6257a1e1290de595dc"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"32e5beeec7de47a34ca2d2ee6330adc292451e26","unresolved":false,"context_lines":[{"line_number":1277,"context_line":"        self.update_available_resource(nova.context.get_admin_context(),"},{"line_number":1278,"context_line":"                                       startup\u003dTrue)"},{"line_number":1279,"context_line":""},{"line_number":1280,"context_line":"    def _get_power_state(self, context, instance, use_cache\u003dFalse):"},{"line_number":1281,"context_line":"        \"\"\"Retrieve the power state for the given instance.\"\"\""},{"line_number":1282,"context_line":"        LOG.debug(\u0027Checking state\u0027, instance\u003dinstance)"},{"line_number":1283,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fb8cfa7_c762f116","line":1280,"range":{"start_line":1280,"start_character":48,"end_line":1280,"end_character":65},"updated":"2019-06-20 13:20:38.000000000","message":"I get why you did this, but I think you should leave it out. If/when someone needs it, they can add it. (aka YAGNI)","commit_id":"b000c667f22b29ee745288a833e3d8718b69c90b"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"4e0b9a16b3c7b4bf992a706b81ba594d5f5a7595","unresolved":false,"context_lines":[{"line_number":1277,"context_line":"        self.update_available_resource(nova.context.get_admin_context(),"},{"line_number":1278,"context_line":"                                       startup\u003dTrue)"},{"line_number":1279,"context_line":""},{"line_number":1280,"context_line":"    def _get_power_state(self, context, instance, use_cache\u003dFalse):"},{"line_number":1281,"context_line":"        \"\"\"Retrieve the power state for the given instance.\"\"\""},{"line_number":1282,"context_line":"        LOG.debug(\u0027Checking state\u0027, instance\u003dinstance)"},{"line_number":1283,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fb8cfa7_ff642c4b","line":1280,"range":{"start_line":1280,"start_character":48,"end_line":1280,"end_character":65},"in_reply_to":"9fb8cfa7_c762f116","updated":"2019-06-24 12:30:44.000000000","message":"ack you are right, I can update.","commit_id":"b000c667f22b29ee745288a833e3d8718b69c90b"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"32e5beeec7de47a34ca2d2ee6330adc292451e26","unresolved":false,"context_lines":[{"line_number":7840,"context_line":"            return"},{"line_number":7841,"context_line":"        # No pending tasks. Now try to figure out the real vm_power_state."},{"line_number":7842,"context_line":"        try:"},{"line_number":7843,"context_line":"            vm_instance \u003d self.driver.get_info(db_instance)"},{"line_number":7844,"context_line":"            vm_power_state \u003d vm_instance.state"},{"line_number":7845,"context_line":"        except exception.InstanceNotFound:"},{"line_number":7846,"context_line":"            vm_power_state \u003d power_state.NOSTATE"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fb8cfa7_67fea539","line":7843,"range":{"start_line":7843,"start_character":12,"end_line":7843,"end_character":59},"updated":"2019-06-20 13:20:38.000000000","message":"IMO we should pass use_cache\u003dFalse here as well","commit_id":"b000c667f22b29ee745288a833e3d8718b69c90b"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"11985e02de736118f9d3e1aed0697fff3177e7f6","unresolved":false,"context_lines":[{"line_number":7840,"context_line":"            return"},{"line_number":7841,"context_line":"        # No pending tasks. Now try to figure out the real vm_power_state."},{"line_number":7842,"context_line":"        try:"},{"line_number":7843,"context_line":"            vm_instance \u003d self.driver.get_info(db_instance)"},{"line_number":7844,"context_line":"            vm_power_state \u003d vm_instance.state"},{"line_number":7845,"context_line":"        except exception.InstanceNotFound:"},{"line_number":7846,"context_line":"            vm_power_state \u003d power_state.NOSTATE"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fb8cfa7_35b95778","line":7843,"range":{"start_line":7843,"start_character":12,"end_line":7843,"end_character":59},"in_reply_to":"9fb8cfa7_3f71640d","updated":"2019-06-26 17:20:35.000000000","message":"okay","commit_id":"b000c667f22b29ee745288a833e3d8718b69c90b"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"4e0b9a16b3c7b4bf992a706b81ba594d5f5a7595","unresolved":false,"context_lines":[{"line_number":7840,"context_line":"            return"},{"line_number":7841,"context_line":"        # No pending tasks. Now try to figure out the real vm_power_state."},{"line_number":7842,"context_line":"        try:"},{"line_number":7843,"context_line":"            vm_instance \u003d self.driver.get_info(db_instance)"},{"line_number":7844,"context_line":"            vm_power_state \u003d vm_instance.state"},{"line_number":7845,"context_line":"        except exception.InstanceNotFound:"},{"line_number":7846,"context_line":"            vm_power_state \u003d power_state.NOSTATE"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fb8cfa7_3f71640d","line":7843,"range":{"start_line":7843,"start_character":12,"end_line":7843,"end_character":59},"in_reply_to":"9fb8cfa7_67fea539","updated":"2019-06-24 12:30:44.000000000","message":"I guess this is the main reason why the cache was introduced, to not hammer ironic api during power syncs. I think this should stay since we also had another patch where only when an inconsistency was encountered, we would pull it again from the api, but this is handled down in the ironic driver.","commit_id":"b000c667f22b29ee745288a833e3d8718b69c90b"}]}
