)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b6f56f16eb8ccdcaf5eac09d9a193e062f6173c9","unresolved":false,"context_lines":[{"line_number":7,"context_line":"placement: refactor healing of allocations in RT"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Updates the RT method for \"healing\" instance allocations so that we"},{"line_number":10,"context_line":"only delete allocations (and delete the entirely for an instance) in"},{"line_number":11,"context_line":"the event that the instance has been SHELVED_OFFLOADED or DELETED. Adds"},{"line_number":12,"context_line":"log statements to the method to give us a good idea of what the state"},{"line_number":13,"context_line":"of various things are during test runs."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9f436f4f_fbbecdfd","line":10,"range":{"start_line":10,"start_character":36,"end_line":10,"end_character":39},"updated":"2017-08-08 16:50:03.000000000","message":"\"them\"","commit_id":"c614988845f68199290ec77ab5fec2b616a46e9a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"49143ee79241304a93f5a9d980d95aa8377c9fbd","unresolved":false,"context_lines":[{"line_number":7,"context_line":"placement: refactor healing of allocations in RT"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Updates the RT method for \"healing\" instance allocations so that we"},{"line_number":10,"context_line":"only delete allocations (and delete the entirely for an instance) in"},{"line_number":11,"context_line":"the event that the instance has been SHELVED_OFFLOADED or DELETED. Adds"},{"line_number":12,"context_line":"log statements to the method to give us a good idea of what the state"},{"line_number":13,"context_line":"of various things are during test runs."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9f436f4f_4d219eb4","line":10,"range":{"start_line":10,"start_character":36,"end_line":10,"end_character":39},"in_reply_to":"9f436f4f_fbbecdfd","updated":"2017-08-08 18:58:30.000000000","message":"Done","commit_id":"c614988845f68199290ec77ab5fec2b616a46e9a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dc00ff55edf15fbcf1f4541b97e3fbdfc3cd989f","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Updates the RT method for \"healing\" instance allocations so that we"},{"line_number":10,"context_line":"only delete allocations (and delete them entirely for an instance) in"},{"line_number":11,"context_line":"the event that the instance has been local-deleted. Adds log statements"},{"line_number":12,"context_line":"to the method to give us a good idea of what the state of various"},{"line_number":13,"context_line":"things are during test runs."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"9f436f4f_31521a15","line":11,"range":{"start_line":11,"start_character":37,"end_line":11,"end_character":50},"updated":"2017-08-09 14:13:34.000000000","message":"I\u0027m not sure what this means in this case, since we generally refer to \u0027local delete\u0027 in the API when the instance is shelved offloaded or the compute host that the instance is on is down.","commit_id":"f2e97b00286f6c369502da96f7bcd12317401083"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dc00ff55edf15fbcf1f4541b97e3fbdfc3cd989f","unresolved":false,"context_lines":[{"line_number":18,"context_line":"to have the confirm/revert resize step on the source or destination"},{"line_number":19,"context_line":"compute host *correct* a doubled-up allocation. What this patch does is"},{"line_number":20,"context_line":"prevent the healing function from deleting allocations unless the"},{"line_number":21,"context_line":"instance is local-deleted."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Partial-bug: #1707071"},{"line_number":24,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"9f436f4f_f15b722b","line":21,"range":{"start_line":21,"start_character":12,"end_line":21,"end_character":25},"updated":"2017-08-09 14:13:34.000000000","message":"same","commit_id":"f2e97b00286f6c369502da96f7bcd12317401083"}],"nova/compute/resource_tracker.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b6f56f16eb8ccdcaf5eac09d9a193e062f6173c9","unresolved":false,"context_lines":[{"line_number":1043,"context_line":""},{"line_number":1044,"context_line":"        self._heal_allocations(context, cn)"},{"line_number":1045,"context_line":""},{"line_number":1046,"context_line":"    def _heal_allocations(self, context, cn):"},{"line_number":1047,"context_line":"        # NOTE(jaypipes): All of this code sucks. It\u0027s basically dealing with"},{"line_number":1048,"context_line":"        # all the corner cases in move, local delete, unshelve and rebuild"},{"line_number":1049,"context_line":"        # operations for when allocations should be deleted when things didn\u0027t"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f436f4f_9b990121","line":1046,"updated":"2017-08-08 16:50:03.000000000","message":"As discussed, this shouldn\u0027t be renamed as all it does is delete things.","commit_id":"c614988845f68199290ec77ab5fec2b616a46e9a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"30b926f2b2e94556658afca080985070690a1d92","unresolved":false,"context_lines":[{"line_number":1043,"context_line":""},{"line_number":1044,"context_line":"        self._heal_allocations(context, cn)"},{"line_number":1045,"context_line":""},{"line_number":1046,"context_line":"    def _heal_allocations(self, context, cn):"},{"line_number":1047,"context_line":"        # NOTE(jaypipes): All of this code sucks. It\u0027s basically dealing with"},{"line_number":1048,"context_line":"        # all the corner cases in move, local delete, unshelve and rebuild"},{"line_number":1049,"context_line":"        # operations for when allocations should be deleted when things didn\u0027t"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f436f4f_f676e43e","line":1046,"in_reply_to":"9f436f4f_9b990121","updated":"2017-08-08 17:21:01.000000000","message":"ack","commit_id":"c614988845f68199290ec77ab5fec2b616a46e9a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9b9c88ec01507d27787d027537ce668921bb624d","unresolved":false,"context_lines":[{"line_number":1043,"context_line":""},{"line_number":1044,"context_line":"        self._heal_allocations(context, cn)"},{"line_number":1045,"context_line":""},{"line_number":1046,"context_line":"    def _heal_allocations(self, context, cn):"},{"line_number":1047,"context_line":"        # NOTE(jaypipes): All of this code sucks. It\u0027s basically dealing with"},{"line_number":1048,"context_line":"        # all the corner cases in move, local delete, unshelve and rebuild"},{"line_number":1049,"context_line":"        # operations for when allocations should be deleted when things didn\u0027t"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f436f4f_ed13b2b7","line":1046,"in_reply_to":"9f436f4f_f676e43e","updated":"2017-08-08 18:49:39.000000000","message":"Done","commit_id":"c614988845f68199290ec77ab5fec2b616a46e9a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b6f56f16eb8ccdcaf5eac09d9a193e062f6173c9","unresolved":false,"context_lines":[{"line_number":1057,"context_line":"                LOG.debug(\"Instance %s actively managed on this compute host \""},{"line_number":1058,"context_line":"                          \"and has allocations in placement: %s.\","},{"line_number":1059,"context_line":"                          instance_uuid, alloc)"},{"line_number":1060,"context_line":"                continue"},{"line_number":1061,"context_line":"            try:"},{"line_number":1062,"context_line":"                instance \u003d objects.Instance.get_by_uuid(context, instance_uuid,"},{"line_number":1063,"context_line":"                                                        expected_attrs\u003d[])"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f436f4f_5beb99af","line":1060,"updated":"2017-08-08 16:50:03.000000000","message":"I don\u0027t think we can make this blanket assertion can we?\n\nLet\u0027s says we\u0027re migrating out to another compute. and there are ocata computes in the system. That means we have our magic heal-o-matic code running on both sides. When the migration completes, it just so happens that our periodic was the last to run, perhaps right after the destination node re-allocated the instance to itself. So, we run here and we should clean up that allocation, but we don\u0027t because .. we have an allocation. We\u0027ll never run the checks below to see that it isn\u0027t even on our host, but since placement says so, we\u0027ll keep it.\n\nI guess that implies that the target will also heal over it eventually, but.. we\u0027ll be wrong until that happens.\n\nEither way, can\u0027t we just remove this check, do the stuff below, and if nothing matches, then don\u0027t delete the allocation?","commit_id":"c614988845f68199290ec77ab5fec2b616a46e9a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9b9c88ec01507d27787d027537ce668921bb624d","unresolved":false,"context_lines":[{"line_number":1057,"context_line":"                LOG.debug(\"Instance %s actively managed on this compute host \""},{"line_number":1058,"context_line":"                          \"and has allocations in placement: %s.\","},{"line_number":1059,"context_line":"                          instance_uuid, alloc)"},{"line_number":1060,"context_line":"                continue"},{"line_number":1061,"context_line":"            try:"},{"line_number":1062,"context_line":"                instance \u003d objects.Instance.get_by_uuid(context, instance_uuid,"},{"line_number":1063,"context_line":"                                                        expected_attrs\u003d[])"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f436f4f_8d8786d8","line":1060,"in_reply_to":"9f436f4f_5beb99af","updated":"2017-08-08 18:49:39.000000000","message":"Actually, the above code hasn\u0027t changed functionally. Before, we were only operating on the result of:\n\n set(allocations.keys()) - tracked_keys\n\nHere, we\u0027re looping through every instance returned in the allocations and for those instances in tracked_instances, we\u0027re just outputting the above log statement.\n\nSo, functionally no change in the behaviour other than the log statement being output. Are you just asking me to remove the log statement?","commit_id":"c614988845f68199290ec77ab5fec2b616a46e9a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b6f56f16eb8ccdcaf5eac09d9a193e062f6173c9","unresolved":false,"context_lines":[{"line_number":1063,"context_line":"                                                        expected_attrs\u003d[])"},{"line_number":1064,"context_line":"            except exception.InstanceNotFound:"},{"line_number":1065,"context_line":"                # The instance is gone, so we definitely want to remove"},{"line_number":1066,"context_line":"                # allocations associated with it."},{"line_number":1067,"context_line":"                LOG.debug(\"Instance %s has been deleted (perhaps locally). \""},{"line_number":1068,"context_line":"                          \"Deleting allocations that remained for this \""},{"line_number":1069,"context_line":"                          \"instance against this compute host: %s.\","}],"source_content_type":"text/x-python","patch_set":1,"id":"9f436f4f_db1789ed","line":1066,"updated":"2017-08-08 16:50:03.000000000","message":"This will be wrong once we have cross-cell migrations.","commit_id":"c614988845f68199290ec77ab5fec2b616a46e9a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"be51e908e91b10d3cda03e854bd920787549ab9c","unresolved":false,"context_lines":[{"line_number":1063,"context_line":"                                                        expected_attrs\u003d[])"},{"line_number":1064,"context_line":"            except exception.InstanceNotFound:"},{"line_number":1065,"context_line":"                # The instance is gone, so we definitely want to remove"},{"line_number":1066,"context_line":"                # allocations associated with it."},{"line_number":1067,"context_line":"                LOG.debug(\"Instance %s has been deleted (perhaps locally). \""},{"line_number":1068,"context_line":"                          \"Deleting allocations that remained for this \""},{"line_number":1069,"context_line":"                          \"instance against this compute host: %s.\","}],"source_content_type":"text/x-python","patch_set":1,"id":"9f436f4f_2dfd3a3a","line":1066,"in_reply_to":"9f436f4f_db1789ed","updated":"2017-08-08 18:54:47.000000000","message":"Hmm. I\u0027ll add a note... :)","commit_id":"c614988845f68199290ec77ab5fec2b616a46e9a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b6f56f16eb8ccdcaf5eac09d9a193e062f6173c9","unresolved":false,"context_lines":[{"line_number":1064,"context_line":"            except exception.InstanceNotFound:"},{"line_number":1065,"context_line":"                # The instance is gone, so we definitely want to remove"},{"line_number":1066,"context_line":"                # allocations associated with it."},{"line_number":1067,"context_line":"                LOG.debug(\"Instance %s has been deleted (perhaps locally). \""},{"line_number":1068,"context_line":"                          \"Deleting allocations that remained for this \""},{"line_number":1069,"context_line":"                          \"instance against this compute host: %s.\","},{"line_number":1070,"context_line":"                          instance_uuid, alloc)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f436f4f_7b453d70","line":1067,"range":{"start_line":1067,"start_character":57,"end_line":1067,"end_character":72},"updated":"2017-08-08 16:50:03.000000000","message":"I actually don\u0027t think this is correct. We only go into this path if we found the instance via InstanceList.get_by_host_and_node(). That means we\u0027d have to race with a delete between that query and this check. The race can happen so it\u0027s good to do this, but I don\u0027t think you need to call out the \"perhaps locally\" thing as if we\u0027re alive enough to hit the race, there wouldn\u0027t have been a local delete.","commit_id":"c614988845f68199290ec77ab5fec2b616a46e9a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"660b4a89a48a4032f6f7df01add656d4c24dab73","unresolved":false,"context_lines":[{"line_number":1064,"context_line":"            except exception.InstanceNotFound:"},{"line_number":1065,"context_line":"                # The instance is gone, so we definitely want to remove"},{"line_number":1066,"context_line":"                # allocations associated with it."},{"line_number":1067,"context_line":"                LOG.debug(\"Instance %s has been deleted (perhaps locally). \""},{"line_number":1068,"context_line":"                          \"Deleting allocations that remained for this \""},{"line_number":1069,"context_line":"                          \"instance against this compute host: %s.\","},{"line_number":1070,"context_line":"                          instance_uuid, alloc)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f436f4f_8aa9ace0","line":1067,"range":{"start_line":1067,"start_character":57,"end_line":1067,"end_character":72},"in_reply_to":"9f436f4f_760d548f","updated":"2017-08-08 17:42:23.000000000","message":"Ah yep, sorry.","commit_id":"c614988845f68199290ec77ab5fec2b616a46e9a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"30b926f2b2e94556658afca080985070690a1d92","unresolved":false,"context_lines":[{"line_number":1064,"context_line":"            except exception.InstanceNotFound:"},{"line_number":1065,"context_line":"                # The instance is gone, so we definitely want to remove"},{"line_number":1066,"context_line":"                # allocations associated with it."},{"line_number":1067,"context_line":"                LOG.debug(\"Instance %s has been deleted (perhaps locally). \""},{"line_number":1068,"context_line":"                          \"Deleting allocations that remained for this \""},{"line_number":1069,"context_line":"                          \"instance against this compute host: %s.\","},{"line_number":1070,"context_line":"                          instance_uuid, alloc)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f436f4f_760d548f","line":1067,"range":{"start_line":1067,"start_character":57,"end_line":1067,"end_character":72},"in_reply_to":"9f436f4f_7b453d70","updated":"2017-08-08 17:21:01.000000000","message":"No, that\u0027s actually that\u0027s not the path to here. The path to here is for placement returning an instance allocation referring to this compute host but this compute host didn\u0027t know about it. This happens when this compute host was down and restarted and the instance was *not* returned from InstanceList.get_by_host_and_node() -- as would be the case with a local-delete instance where the nova-api deleted it but wasn\u0027t able to run terminate_instance() on the compute host.\n\nWe get the instance from placement via the GET /resource_providers/{rp_uuid}/allocations result and check what status the instance is in by calling Instance.get_by_uuid() above on line 1062 and get InstanceNotFound because the instance was locally-deleted (which never ran terminate_instance() on the compute host which would have removed the allocation for the instance)","commit_id":"c614988845f68199290ec77ab5fec2b616a46e9a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b6f56f16eb8ccdcaf5eac09d9a193e062f6173c9","unresolved":false,"context_lines":[{"line_number":1073,"context_line":"            if not instance.host:"},{"line_number":1074,"context_line":"                # Allocations related to instances being scheduled should not"},{"line_number":1075,"context_line":"                # be deleted if we already wrote the allocation previously."},{"line_number":1076,"context_line":"                LOG.debug(\"Instance %s has been scheduled to, the scheduler \""},{"line_number":1077,"context_line":"                          \"has made an allocation against this compute node \""},{"line_number":1078,"context_line":"                          \"but the instance has yet to start. Skipping heal \""},{"line_number":1079,"context_line":"                          \"of allocation: %s.\","}],"source_content_type":"text/x-python","patch_set":1,"id":"9f436f4f_3b5fb542","line":1076,"range":{"start_line":1076,"start_character":58,"end_line":1076,"end_character":60},"updated":"2017-08-08 16:50:03.000000000","message":"to.... us?","commit_id":"c614988845f68199290ec77ab5fec2b616a46e9a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"be51e908e91b10d3cda03e854bd920787549ab9c","unresolved":false,"context_lines":[{"line_number":1073,"context_line":"            if not instance.host:"},{"line_number":1074,"context_line":"                # Allocations related to instances being scheduled should not"},{"line_number":1075,"context_line":"                # be deleted if we already wrote the allocation previously."},{"line_number":1076,"context_line":"                LOG.debug(\"Instance %s has been scheduled to, the scheduler \""},{"line_number":1077,"context_line":"                          \"has made an allocation against this compute node \""},{"line_number":1078,"context_line":"                          \"but the instance has yet to start. Skipping heal \""},{"line_number":1079,"context_line":"                          \"of allocation: %s.\","}],"source_content_type":"text/x-python","patch_set":1,"id":"9f436f4f_8da30650","line":1076,"range":{"start_line":1076,"start_character":58,"end_line":1076,"end_character":60},"in_reply_to":"9f436f4f_3b5fb542","updated":"2017-08-08 18:54:47.000000000","message":"Done","commit_id":"c614988845f68199290ec77ab5fec2b616a46e9a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b6f56f16eb8ccdcaf5eac09d9a193e062f6173c9","unresolved":false,"context_lines":[{"line_number":1085,"context_line":"                # not in the list of actively managed instances. This may be"},{"line_number":1086,"context_line":"                # because the instance has been shelved offloaded, in which"},{"line_number":1087,"context_line":"                # case we want to delete the allocation that references this"},{"line_number":1088,"context_line":"                # compute host, freeing up resources."},{"line_number":1089,"context_line":"                if instance.vm_state \u003d\u003d vm_states.SHELVED_OFFLOADED:"},{"line_number":1090,"context_line":"                    LOG.debug(\"Instance %s has been shelved offloaed. \""},{"line_number":1091,"context_line":"                              \"Deleting allocations that remained for this \""}],"source_content_type":"text/x-python","patch_set":1,"id":"9f436f4f_1b699124","line":1088,"updated":"2017-08-08 16:50:03.000000000","message":"I don\u0027t understand this. If it\u0027s offloaded, then host will be unset right? We update the resource tracker during offload and then we clear the host/node. So I\u0027m not actually sure how we get here if we\u0027re offloaded.","commit_id":"c614988845f68199290ec77ab5fec2b616a46e9a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"30b926f2b2e94556658afca080985070690a1d92","unresolved":false,"context_lines":[{"line_number":1085,"context_line":"                # not in the list of actively managed instances. This may be"},{"line_number":1086,"context_line":"                # because the instance has been shelved offloaded, in which"},{"line_number":1087,"context_line":"                # case we want to delete the allocation that references this"},{"line_number":1088,"context_line":"                # compute host, freeing up resources."},{"line_number":1089,"context_line":"                if instance.vm_state \u003d\u003d vm_states.SHELVED_OFFLOADED:"},{"line_number":1090,"context_line":"                    LOG.debug(\"Instance %s has been shelved offloaed. \""},{"line_number":1091,"context_line":"                              \"Deleting allocations that remained for this \""}],"source_content_type":"text/x-python","patch_set":1,"id":"9f436f4f_b6785cf8","line":1088,"in_reply_to":"9f436f4f_1b699124","updated":"2017-08-08 17:21:01.000000000","message":"That\u0027s the \"normal path\". All of these paths are essentially for when the compute host was down for some period of time and the record-keeping with placement wasn\u0027t done.","commit_id":"c614988845f68199290ec77ab5fec2b616a46e9a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"660b4a89a48a4032f6f7df01add656d4c24dab73","unresolved":false,"context_lines":[{"line_number":1085,"context_line":"                # not in the list of actively managed instances. This may be"},{"line_number":1086,"context_line":"                # because the instance has been shelved offloaded, in which"},{"line_number":1087,"context_line":"                # case we want to delete the allocation that references this"},{"line_number":1088,"context_line":"                # compute host, freeing up resources."},{"line_number":1089,"context_line":"                if instance.vm_state \u003d\u003d vm_states.SHELVED_OFFLOADED:"},{"line_number":1090,"context_line":"                    LOG.debug(\"Instance %s has been shelved offloaed. \""},{"line_number":1091,"context_line":"                              \"Deleting allocations that remained for this \""}],"source_content_type":"text/x-python","patch_set":1,"id":"9f436f4f_6adc4874","line":1088,"in_reply_to":"9f436f4f_b6785cf8","updated":"2017-08-08 17:42:23.000000000","message":"The offload happens on the compute host. it can\u0027t have happened if we weren\u0027t running, and we won\u0027t have saved the instance with the new vm_state and host\u003dNone unless we\u0027ve already deleted the allocation right?\n\nhttps://github.com/openstack/nova/blob/master/nova/compute/manager.py#L4339-LL4349\n\nWe set the vm_state, save, then delete the allocation, and if that worked, we set host\u003dNone and save.","commit_id":"c614988845f68199290ec77ab5fec2b616a46e9a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b6f56f16eb8ccdcaf5eac09d9a193e062f6173c9","unresolved":false,"context_lines":[{"line_number":1087,"context_line":"                # case we want to delete the allocation that references this"},{"line_number":1088,"context_line":"                # compute host, freeing up resources."},{"line_number":1089,"context_line":"                if instance.vm_state \u003d\u003d vm_states.SHELVED_OFFLOADED:"},{"line_number":1090,"context_line":"                    LOG.debug(\"Instance %s has been shelved offloaed. \""},{"line_number":1091,"context_line":"                              \"Deleting allocations that remained for this \""},{"line_number":1092,"context_line":"                              \"instance against this compute host: %s.\","},{"line_number":1093,"context_line":"                              instance_uuid, alloc)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f436f4f_3b2455c6","line":1090,"range":{"start_line":1090,"start_character":60,"end_line":1090,"end_character":68},"updated":"2017-08-08 16:50:03.000000000","message":"offloaded","commit_id":"c614988845f68199290ec77ab5fec2b616a46e9a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"be51e908e91b10d3cda03e854bd920787549ab9c","unresolved":false,"context_lines":[{"line_number":1087,"context_line":"                # case we want to delete the allocation that references this"},{"line_number":1088,"context_line":"                # compute host, freeing up resources."},{"line_number":1089,"context_line":"                if instance.vm_state \u003d\u003d vm_states.SHELVED_OFFLOADED:"},{"line_number":1090,"context_line":"                    LOG.debug(\"Instance %s has been shelved offloaed. \""},{"line_number":1091,"context_line":"                              \"Deleting allocations that remained for this \""},{"line_number":1092,"context_line":"                              \"instance against this compute host: %s.\","},{"line_number":1093,"context_line":"                              instance_uuid, alloc)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f436f4f_4d851ead","line":1090,"range":{"start_line":1090,"start_character":60,"end_line":1090,"end_character":68},"in_reply_to":"9f436f4f_3b2455c6","updated":"2017-08-08 18:54:47.000000000","message":"Done","commit_id":"c614988845f68199290ec77ab5fec2b616a46e9a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b6f56f16eb8ccdcaf5eac09d9a193e062f6173c9","unresolved":false,"context_lines":[{"line_number":1088,"context_line":"                # compute host, freeing up resources."},{"line_number":1089,"context_line":"                if instance.vm_state \u003d\u003d vm_states.SHELVED_OFFLOADED:"},{"line_number":1090,"context_line":"                    LOG.debug(\"Instance %s has been shelved offloaed. \""},{"line_number":1091,"context_line":"                              \"Deleting allocations that remained for this \""},{"line_number":1092,"context_line":"                              \"instance against this compute host: %s.\","},{"line_number":1093,"context_line":"                              instance_uuid, alloc)"},{"line_number":1094,"context_line":"                    self.reportclient.delete_allocation_for_instance("}],"source_content_type":"text/x-python","patch_set":1,"id":"9f436f4f_1b2191b5","line":1091,"range":{"start_line":1091,"start_character":57,"end_line":1091,"end_character":65},"updated":"2017-08-08 16:50:03.000000000","message":"remain","commit_id":"c614988845f68199290ec77ab5fec2b616a46e9a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"be51e908e91b10d3cda03e854bd920787549ab9c","unresolved":false,"context_lines":[{"line_number":1088,"context_line":"                # compute host, freeing up resources."},{"line_number":1089,"context_line":"                if instance.vm_state \u003d\u003d vm_states.SHELVED_OFFLOADED:"},{"line_number":1090,"context_line":"                    LOG.debug(\"Instance %s has been shelved offloaed. \""},{"line_number":1091,"context_line":"                              \"Deleting allocations that remained for this \""},{"line_number":1092,"context_line":"                              \"instance against this compute host: %s.\","},{"line_number":1093,"context_line":"                              instance_uuid, alloc)"},{"line_number":1094,"context_line":"                    self.reportclient.delete_allocation_for_instance("}],"source_content_type":"text/x-python","patch_set":1,"id":"9f436f4f_2d92daf7","line":1091,"range":{"start_line":1091,"start_character":57,"end_line":1091,"end_character":65},"in_reply_to":"9f436f4f_1b2191b5","updated":"2017-08-08 18:54:47.000000000","message":"Done","commit_id":"c614988845f68199290ec77ab5fec2b616a46e9a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b6f56f16eb8ccdcaf5eac09d9a193e062f6173c9","unresolved":false,"context_lines":[{"line_number":1101,"context_line":"                              \"what to do.\", instance_uuid, alloc)"},{"line_number":1102,"context_line":"                    continue"},{"line_number":1103,"context_line":"            if (instance.host !\u003d cn.host or"},{"line_number":1104,"context_line":"                    instance.node !\u003d cn.hypervisor_hostname):"},{"line_number":1105,"context_line":"                # The instance has been moved to another host either via a"},{"line_number":1106,"context_line":"                # migration, evacuation or unshelve in between the time when we"},{"line_number":1107,"context_line":"                # ran InstanceList.get_by_host_and_node(), added those"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f436f4f_fbfc8d3f","line":1104,"updated":"2017-08-08 16:50:03.000000000","message":"Do we really need to be checking both of these all the time? instance.host should be enough, as far as I know, and is pretty much what we consider to mean \"this is ours\" everywhere else.","commit_id":"c614988845f68199290ec77ab5fec2b616a46e9a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"49143ee79241304a93f5a9d980d95aa8377c9fbd","unresolved":false,"context_lines":[{"line_number":1101,"context_line":"                              \"what to do.\", instance_uuid, alloc)"},{"line_number":1102,"context_line":"                    continue"},{"line_number":1103,"context_line":"            if (instance.host !\u003d cn.host or"},{"line_number":1104,"context_line":"                    instance.node !\u003d cn.hypervisor_hostname):"},{"line_number":1105,"context_line":"                # The instance has been moved to another host either via a"},{"line_number":1106,"context_line":"                # migration, evacuation or unshelve in between the time when we"},{"line_number":1107,"context_line":"                # ran InstanceList.get_by_host_and_node(), added those"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f436f4f_2d077a1f","line":1104,"in_reply_to":"9f436f4f_7682f4ca","updated":"2017-08-08 18:58:30.000000000","message":"Done","commit_id":"c614988845f68199290ec77ab5fec2b616a46e9a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"30b926f2b2e94556658afca080985070690a1d92","unresolved":false,"context_lines":[{"line_number":1101,"context_line":"                              \"what to do.\", instance_uuid, alloc)"},{"line_number":1102,"context_line":"                    continue"},{"line_number":1103,"context_line":"            if (instance.host !\u003d cn.host or"},{"line_number":1104,"context_line":"                    instance.node !\u003d cn.hypervisor_hostname):"},{"line_number":1105,"context_line":"                # The instance has been moved to another host either via a"},{"line_number":1106,"context_line":"                # migration, evacuation or unshelve in between the time when we"},{"line_number":1107,"context_line":"                # ran InstanceList.get_by_host_and_node(), added those"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f436f4f_7682f4ca","line":1104,"in_reply_to":"9f436f4f_fbfc8d3f","updated":"2017-08-08 17:21:01.000000000","message":"ack, yeah, agreed.","commit_id":"c614988845f68199290ec77ab5fec2b616a46e9a"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e206e77996053f31666c681444bc695a098c49b4","unresolved":false,"context_lines":[{"line_number":1075,"context_line":"            if not instance.host:"},{"line_number":1076,"context_line":"                # Allocations related to instances being scheduled should not"},{"line_number":1077,"context_line":"                # be deleted if we already wrote the allocation previously."},{"line_number":1078,"context_line":"                LOG.debug(\"Instance %s has been scheduled to this compute \""},{"line_number":1079,"context_line":"                          \"host, the scheduler has made an allocation \""},{"line_number":1080,"context_line":"                          \"against this compute node but the instance has \""},{"line_number":1081,"context_line":"                          \"yet to start. Skipping heal of allocation: %s.\","}],"source_content_type":"text/x-python","patch_set":2,"id":"9f436f4f_ded76023","line":1078,"updated":"2017-08-09 10:13:37.000000000","message":"I don\u0027t know if the following is a possible edge case or not:\nWhat if the instance is scheduled and resource is claimed on this host but the instance fails to spawn in a way that does not trigger re-schedule. Will scheduler delete the claim?","commit_id":"19c7345a3422ce04a1505c6a0f7c00875a55c0db"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"30fd46626182e532b6565be4a2ce54423dc99457","unresolved":false,"context_lines":[{"line_number":1075,"context_line":"            if not instance.host:"},{"line_number":1076,"context_line":"                # Allocations related to instances being scheduled should not"},{"line_number":1077,"context_line":"                # be deleted if we already wrote the allocation previously."},{"line_number":1078,"context_line":"                LOG.debug(\"Instance %s has been scheduled to this compute \""},{"line_number":1079,"context_line":"                          \"host, the scheduler has made an allocation \""},{"line_number":1080,"context_line":"                          \"against this compute node but the instance has \""},{"line_number":1081,"context_line":"                          \"yet to start. Skipping heal of allocation: %s.\","}],"source_content_type":"text/x-python","patch_set":2,"id":"9f436f4f_63845c5f","line":1078,"in_reply_to":"9f436f4f_ded76023","updated":"2017-08-09 12:49:06.000000000","message":"The scheduler won\u0027t delete the claim, no. The compute node does, though, here:\n\nhttps://github.com/openstack/nova/blob/057ca0b7eff76ffbbd460e6c8cbce100d01fa721/nova/compute/resource_tracker.py#L411-L414","commit_id":"19c7345a3422ce04a1505c6a0f7c00875a55c0db"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"9bf6f93107310a2d7255ec293ced433fd6b36362","unresolved":false,"context_lines":[{"line_number":1085,"context_line":"                    instance.node \u003d\u003d cn.hypervisor_hostname):"},{"line_number":1086,"context_line":"                # The instance is supposed to be on this compute host but is"},{"line_number":1087,"context_line":"                # not in the list of actively managed instances."},{"line_number":1088,"context_line":"                LOG.debug(\"Instance %s is not being actively managed by \""},{"line_number":1089,"context_line":"                          \"this compute host but has allocations \""},{"line_number":1090,"context_line":"                          \"referencing this compute host: %s. Skipping \""},{"line_number":1091,"context_line":"                          \"heal of allocation because we do not know \""}],"source_content_type":"text/x-python","patch_set":2,"id":"9f436f4f_fe5fd60b","line":1088,"updated":"2017-08-08 20:27:36.000000000","message":"should this be a warn? or are we expecting it to be common? the message makes it sounds like something we should be more aware of than debug.","commit_id":"19c7345a3422ce04a1505c6a0f7c00875a55c0db"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"30fd46626182e532b6565be4a2ce54423dc99457","unresolved":false,"context_lines":[{"line_number":1085,"context_line":"                    instance.node \u003d\u003d cn.hypervisor_hostname):"},{"line_number":1086,"context_line":"                # The instance is supposed to be on this compute host but is"},{"line_number":1087,"context_line":"                # not in the list of actively managed instances."},{"line_number":1088,"context_line":"                LOG.debug(\"Instance %s is not being actively managed by \""},{"line_number":1089,"context_line":"                          \"this compute host but has allocations \""},{"line_number":1090,"context_line":"                          \"referencing this compute host: %s. Skipping \""},{"line_number":1091,"context_line":"                          \"heal of allocation because we do not know \""}],"source_content_type":"text/x-python","patch_set":2,"id":"9f436f4f_c394288e","line":1088,"in_reply_to":"9f436f4f_fe5fd60b","updated":"2017-08-09 12:49:06.000000000","message":"done.","commit_id":"19c7345a3422ce04a1505c6a0f7c00875a55c0db"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dc00ff55edf15fbcf1f4541b97e3fbdfc3cd989f","unresolved":false,"context_lines":[{"line_number":1045,"context_line":""},{"line_number":1046,"context_line":"    def _remove_deleted_instances_allocations(self, context, cn):"},{"line_number":1047,"context_line":"        # NOTE(jaypipes): All of this code sucks. It\u0027s basically dealing with"},{"line_number":1048,"context_line":"        # all the corner cases in move, local delete, unshelve and rebuild"},{"line_number":1049,"context_line":"        # operations for when allocations should be deleted when things didn\u0027t"},{"line_number":1050,"context_line":"        # happen according to the normal flow of events where the scheduler"},{"line_number":1051,"context_line":"        # always creates allocations for an instance"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_f1a932df","line":1048,"range":{"start_line":1048,"start_character":67,"end_line":1048,"end_character":74},"updated":"2017-08-09 14:13:34.000000000","message":"evacuate? rebuild isn\u0027t a move operation, but evacuate is.","commit_id":"f2e97b00286f6c369502da96f7bcd12317401083"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dc00ff55edf15fbcf1f4541b97e3fbdfc3cd989f","unresolved":false,"context_lines":[{"line_number":1045,"context_line":""},{"line_number":1046,"context_line":"    def _remove_deleted_instances_allocations(self, context, cn):"},{"line_number":1047,"context_line":"        # NOTE(jaypipes): All of this code sucks. It\u0027s basically dealing with"},{"line_number":1048,"context_line":"        # all the corner cases in move, local delete, unshelve and rebuild"},{"line_number":1049,"context_line":"        # operations for when allocations should be deleted when things didn\u0027t"},{"line_number":1050,"context_line":"        # happen according to the normal flow of events where the scheduler"},{"line_number":1051,"context_line":"        # always creates allocations for an instance"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_519b5ec8","line":1048,"range":{"start_line":1048,"start_character":40,"end_line":1048,"end_character":52},"updated":"2017-08-09 14:13:34.000000000","message":"same issue - not sure what \"local\" means here, since \"local delete\" in the API doesn\u0027t get to this code since the compute host is either down, or the instance doesn\u0027t have a host (it\u0027s shelved offloaded). Is this referring to a case where the host is down during the delete in the API (local to the API) and then we hit this code once the nova-compute service comes back up?","commit_id":"f2e97b00286f6c369502da96f7bcd12317401083"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"c0b6e9d584af7e1c6a4290f378529a834160e55f","unresolved":false,"context_lines":[{"line_number":1045,"context_line":""},{"line_number":1046,"context_line":"    def _remove_deleted_instances_allocations(self, context, cn):"},{"line_number":1047,"context_line":"        # NOTE(jaypipes): All of this code sucks. It\u0027s basically dealing with"},{"line_number":1048,"context_line":"        # all the corner cases in move, local delete, unshelve and rebuild"},{"line_number":1049,"context_line":"        # operations for when allocations should be deleted when things didn\u0027t"},{"line_number":1050,"context_line":"        # happen according to the normal flow of events where the scheduler"},{"line_number":1051,"context_line":"        # always creates allocations for an instance"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_8c21adfe","line":1048,"range":{"start_line":1048,"start_character":40,"end_line":1048,"end_character":52},"in_reply_to":"9f436f4f_519b5ec8","updated":"2017-08-09 14:46:37.000000000","message":"No, I definitely mean \"local delete\". This code would be executed once a downed node is restarted after the nova-api service has local-deleted an instance. The allocation would still exist in the placement API, and this code is there to clean that up.","commit_id":"f2e97b00286f6c369502da96f7bcd12317401083"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dc00ff55edf15fbcf1f4541b97e3fbdfc3cd989f","unresolved":false,"context_lines":[{"line_number":1054,"context_line":"                cn.uuid) or {}"},{"line_number":1055,"context_line":"        for instance_uuid, alloc in allocations.items():"},{"line_number":1056,"context_line":"            if instance_uuid in known_instances:"},{"line_number":1057,"context_line":"                LOG.debug(\"Instance %s actively managed on this compute host \""},{"line_number":1058,"context_line":"                          \"and has allocations in placement: %s.\","},{"line_number":1059,"context_line":"                          instance_uuid, alloc)"},{"line_number":1060,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_31d7ba4e","line":1057,"range":{"start_line":1057,"start_character":36,"end_line":1057,"end_character":38},"updated":"2017-08-09 14:13:34.000000000","message":"nit: rather than this we could just use the instance_uuid\u003dinstance_uuid kwarg which is formatted properly by oslo.log.","commit_id":"f2e97b00286f6c369502da96f7bcd12317401083"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dc00ff55edf15fbcf1f4541b97e3fbdfc3cd989f","unresolved":false,"context_lines":[{"line_number":1055,"context_line":"        for instance_uuid, alloc in allocations.items():"},{"line_number":1056,"context_line":"            if instance_uuid in known_instances:"},{"line_number":1057,"context_line":"                LOG.debug(\"Instance %s actively managed on this compute host \""},{"line_number":1058,"context_line":"                          \"and has allocations in placement: %s.\","},{"line_number":1059,"context_line":"                          instance_uuid, alloc)"},{"line_number":1060,"context_line":"                continue"},{"line_number":1061,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_512ebe43","line":1058,"range":{"start_line":1058,"start_character":59,"end_line":1058,"end_character":63},"updated":"2017-08-09 14:13:34.000000000","message":"Do you want to say \"Skipping heal of allocation: %s\" like you have below in the case that instance.host isn\u0027t set?","commit_id":"f2e97b00286f6c369502da96f7bcd12317401083"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"30c7af8923de129d63f30c4bbe5ffe9a6d2cb74a","unresolved":false,"context_lines":[{"line_number":1057,"context_line":"                LOG.debug(\"Instance %s actively managed on this compute host \""},{"line_number":1058,"context_line":"                          \"and has allocations in placement: %s.\","},{"line_number":1059,"context_line":"                          instance_uuid, alloc)"},{"line_number":1060,"context_line":"                continue"},{"line_number":1061,"context_line":"            try:"},{"line_number":1062,"context_line":"                instance \u003d objects.Instance.get_by_uuid(context, instance_uuid,"},{"line_number":1063,"context_line":"                                                        expected_attrs\u003d[])"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_2c6521b6","line":1060,"range":{"start_line":1060,"start_character":16,"end_line":1060,"end_character":24},"updated":"2017-08-09 14:33:27.000000000","message":"Looks like we don\u0027t have a test for this either.","commit_id":"f2e97b00286f6c369502da96f7bcd12317401083"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dc00ff55edf15fbcf1f4541b97e3fbdfc3cd989f","unresolved":false,"context_lines":[{"line_number":1066,"context_line":"                # allocations associated with it."},{"line_number":1067,"context_line":"                # NOTE(jaypipes): This will not be true if/when we support"},{"line_number":1068,"context_line":"                # cross-cell migrations..."},{"line_number":1069,"context_line":"                LOG.debug(\"Instance %s has been deleted (perhaps locally). \""},{"line_number":1070,"context_line":"                          \"Deleting allocations that remained for this \""},{"line_number":1071,"context_line":"                          \"instance against this compute host: %s.\","},{"line_number":1072,"context_line":"                          instance_uuid, alloc)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_915426cc","line":1069,"range":{"start_line":1069,"start_character":65,"end_line":1069,"end_character":72},"updated":"2017-08-09 14:13:34.000000000","message":"We should re-word this. I\u0027d say something like this instead:\n\n\"(perhaps while this host was down)\"","commit_id":"f2e97b00286f6c369502da96f7bcd12317401083"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dc00ff55edf15fbcf1f4541b97e3fbdfc3cd989f","unresolved":false,"context_lines":[{"line_number":1066,"context_line":"                # allocations associated with it."},{"line_number":1067,"context_line":"                # NOTE(jaypipes): This will not be true if/when we support"},{"line_number":1068,"context_line":"                # cross-cell migrations..."},{"line_number":1069,"context_line":"                LOG.debug(\"Instance %s has been deleted (perhaps locally). \""},{"line_number":1070,"context_line":"                          \"Deleting allocations that remained for this \""},{"line_number":1071,"context_line":"                          \"instance against this compute host: %s.\","},{"line_number":1072,"context_line":"                          instance_uuid, alloc)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_313c5a92","line":1069,"range":{"start_line":1069,"start_character":36,"end_line":1069,"end_character":38},"updated":"2017-08-09 14:13:34.000000000","message":"same","commit_id":"f2e97b00286f6c369502da96f7bcd12317401083"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dc00ff55edf15fbcf1f4541b97e3fbdfc3cd989f","unresolved":false,"context_lines":[{"line_number":1067,"context_line":"                # NOTE(jaypipes): This will not be true if/when we support"},{"line_number":1068,"context_line":"                # cross-cell migrations..."},{"line_number":1069,"context_line":"                LOG.debug(\"Instance %s has been deleted (perhaps locally). \""},{"line_number":1070,"context_line":"                          \"Deleting allocations that remained for this \""},{"line_number":1071,"context_line":"                          \"instance against this compute host: %s.\","},{"line_number":1072,"context_line":"                          instance_uuid, alloc)"},{"line_number":1073,"context_line":"                self.reportclient.delete_allocation_for_instance(instance_uuid)"},{"line_number":1074,"context_line":"                continue"},{"line_number":1075,"context_line":"            if not instance.host:"},{"line_number":1076,"context_line":"                # Allocations related to instances being scheduled should not"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_310a1ad2","line":1073,"range":{"start_line":1070,"start_character":26,"end_line":1073,"end_character":79},"updated":"2017-08-09 14:13:34.000000000","message":"So we know this is deleting more than the allocations just for this compute node, right? Since delete_allocation_for_instance deletes *all* allocations for the instance, regardless of resource provider.\n\nThe log message is a bit confusing saying \"against this compute host\" when really it\u0027s against all compute hosts or otherwise.","commit_id":"f2e97b00286f6c369502da96f7bcd12317401083"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dc00ff55edf15fbcf1f4541b97e3fbdfc3cd989f","unresolved":false,"context_lines":[{"line_number":1081,"context_line":"                          \"yet to start. Skipping heal of allocation: %s.\","},{"line_number":1082,"context_line":"                          instance_uuid, alloc)"},{"line_number":1083,"context_line":"                continue"},{"line_number":1084,"context_line":"            if (instance.host \u003d\u003d cn.host and"},{"line_number":1085,"context_line":"                    instance.node \u003d\u003d cn.hypervisor_hostname):"},{"line_number":1086,"context_line":"                # The instance is supposed to be on this compute host but is"},{"line_number":1087,"context_line":"                # not in the list of actively managed instances."},{"line_number":1088,"context_line":"                LOG.warn(\"Instance %s is not being actively managed by \""}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_d13e2e28","line":1085,"range":{"start_line":1084,"start_character":12,"end_line":1085,"end_character":61},"updated":"2017-08-09 14:13:34.000000000","message":"Do we have a test for this?","commit_id":"f2e97b00286f6c369502da96f7bcd12317401083"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dc00ff55edf15fbcf1f4541b97e3fbdfc3cd989f","unresolved":false,"context_lines":[{"line_number":1085,"context_line":"                    instance.node \u003d\u003d cn.hypervisor_hostname):"},{"line_number":1086,"context_line":"                # The instance is supposed to be on this compute host but is"},{"line_number":1087,"context_line":"                # not in the list of actively managed instances."},{"line_number":1088,"context_line":"                LOG.warn(\"Instance %s is not being actively managed by \""},{"line_number":1089,"context_line":"                         \"this compute host but has allocations \""},{"line_number":1090,"context_line":"                         \"referencing this compute host: %s. Skipping \""},{"line_number":1091,"context_line":"                         \"heal of allocation because we do not know \""}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_911b061a","line":1088,"range":{"start_line":1088,"start_character":20,"end_line":1088,"end_character":24},"updated":"2017-08-09 14:13:34.000000000","message":"nit: warning since that\u0027s what\u0027s in py35.","commit_id":"f2e97b00286f6c369502da96f7bcd12317401083"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"00a1e2826065c234ef02e7f7b478e38d69ec092b","unresolved":false,"context_lines":[{"line_number":1091,"context_line":"                         \"heal of allocation because we do not know \""},{"line_number":1092,"context_line":"                         \"what to do.\", instance_uuid, alloc)"},{"line_number":1093,"context_line":"                continue"},{"line_number":1094,"context_line":"            if instance.host !\u003d cn.host:"},{"line_number":1095,"context_line":"                # The instance has been moved to another host either via a"},{"line_number":1096,"context_line":"                # migration, evacuation or unshelve in between the time when we"},{"line_number":1097,"context_line":"                # ran InstanceList.get_by_host_and_node(), added those"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_31f57a58","line":1094,"range":{"start_line":1094,"start_character":12,"end_line":1094,"end_character":40},"updated":"2017-08-09 14:20:22.000000000","message":"Do we have a test for this?","commit_id":"f2e97b00286f6c369502da96f7bcd12317401083"}],"nova/tests/functional/test_servers.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dc00ff55edf15fbcf1f4541b97e3fbdfc3cd989f","unresolved":false,"context_lines":[{"line_number":1379,"context_line":""},{"line_number":1380,"context_line":"        # NOTE(jaypipes): This should be uncommented when bug 1707071 is fixed."},{"line_number":1381,"context_line":"        # Currently, we\u0027re not cleaning up the destination allocation on"},{"line_number":1382,"context_line":"        # confirm and the source allocation on resize"},{"line_number":1383,"context_line":"        # Check that the server only allocates resource from the original host"},{"line_number":1384,"context_line":"        # self.assertEqual(1, len(allocations))"},{"line_number":1385,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_51b8fec6","line":1382,"range":{"start_line":1382,"start_character":47,"end_line":1382,"end_character":53},"updated":"2017-08-09 14:13:34.000000000","message":"confirm? We\u0027d cleanup the source node allocation on resize confirm.","commit_id":"f2e97b00286f6c369502da96f7bcd12317401083"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dc00ff55edf15fbcf1f4541b97e3fbdfc3cd989f","unresolved":false,"context_lines":[{"line_number":1379,"context_line":""},{"line_number":1380,"context_line":"        # NOTE(jaypipes): This should be uncommented when bug 1707071 is fixed."},{"line_number":1381,"context_line":"        # Currently, we\u0027re not cleaning up the destination allocation on"},{"line_number":1382,"context_line":"        # confirm and the source allocation on resize"},{"line_number":1383,"context_line":"        # Check that the server only allocates resource from the original host"},{"line_number":1384,"context_line":"        # self.assertEqual(1, len(allocations))"},{"line_number":1385,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_71a9c279","line":1382,"range":{"start_line":1382,"start_character":10,"end_line":1382,"end_character":17},"updated":"2017-08-09 14:13:34.000000000","message":"revert? This is a resize revert test, so we\u0027d want to cleanup the destination allocation on revert.","commit_id":"f2e97b00286f6c369502da96f7bcd12317401083"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dc00ff55edf15fbcf1f4541b97e3fbdfc3cd989f","unresolved":false,"context_lines":[{"line_number":1416,"context_line":"        dest_usages \u003d self._get_provider_usages(dest_rp_uuid)"},{"line_number":1417,"context_line":""},{"line_number":1418,"context_line":"        # NOTE(jaypipes): This should be uncommented when bug 1707071 is fixed."},{"line_number":1419,"context_line":"        # Currently, we\u0027re not cleaning up the destination allocation on"},{"line_number":1420,"context_line":"        # confirm and the source allocation on resize"},{"line_number":1421,"context_line":"        # source_usages \u003d self._get_provider_usages(source_rp_uuid)"},{"line_number":1422,"context_line":"        # self.assertEqual({\u0027VCPU\u0027: 0,"},{"line_number":1423,"context_line":"        #                   \u0027MEMORY_MB\u0027: 0,"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_f1b6d2d9","line":1420,"range":{"start_line":1419,"start_character":10,"end_line":1420,"end_character":53},"updated":"2017-08-09 14:13:34.000000000","message":"same as above","commit_id":"f2e97b00286f6c369502da96f7bcd12317401083"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dc00ff55edf15fbcf1f4541b97e3fbdfc3cd989f","unresolved":false,"context_lines":[{"line_number":1431,"context_line":"        allocations \u003d self._get_allocations_by_server_uuid(server[\u0027id\u0027])"},{"line_number":1432,"context_line":""},{"line_number":1433,"context_line":"        # NOTE(jaypipes): This should be uncommented when bug 1707071 is fixed."},{"line_number":1434,"context_line":"        # Currently, we\u0027re not cleaning up the destination allocation on"},{"line_number":1435,"context_line":"        # confirm and the source allocation on resize"},{"line_number":1436,"context_line":"        # and the server allocates only from the target host"},{"line_number":1437,"context_line":"        # self.assertEqual(1, len(allocations))"},{"line_number":1438,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_b1c84a55","line":1435,"range":{"start_line":1434,"start_character":10,"end_line":1435,"end_character":53},"updated":"2017-08-09 14:13:34.000000000","message":"same","commit_id":"f2e97b00286f6c369502da96f7bcd12317401083"}],"nova/tests/unit/compute/test_resource_tracker.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"9bf6f93107310a2d7255ec293ced433fd6b36362","unresolved":false,"context_lines":[{"line_number":2440,"context_line":""},{"line_number":2441,"context_line":"    @mock.patch(\u0027nova.objects.Instance.get_by_uuid\u0027)"},{"line_number":2442,"context_line":"    def test_remove_deleted_instances_allocations_no_instance(self,"},{"line_number":2443,"context_line":"            mock_inst_get):"},{"line_number":2444,"context_line":"        # If for some reason an instance is no longer available, but"},{"line_number":2445,"context_line":"        # there are allocations for it, we want to be sure those"},{"line_number":2446,"context_line":"        # allocations are removed, not that an InstanceNotFound"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f436f4f_7ef766f7","line":2443,"updated":"2017-08-08 20:27:36.000000000","message":"your automagic reformatting went into territory you hadn\u0027t otherwise touched","commit_id":"19c7345a3422ce04a1505c6a0f7c00875a55c0db"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"3ac55403316386cccbe8c53893288f2713f42127","unresolved":false,"context_lines":[{"line_number":2440,"context_line":""},{"line_number":2441,"context_line":"    @mock.patch(\u0027nova.objects.Instance.get_by_uuid\u0027)"},{"line_number":2442,"context_line":"    def test_remove_deleted_instances_allocations_no_instance(self,"},{"line_number":2443,"context_line":"            mock_inst_get):"},{"line_number":2444,"context_line":"        # If for some reason an instance is no longer available, but"},{"line_number":2445,"context_line":"        # there are allocations for it, we want to be sure those"},{"line_number":2446,"context_line":"        # allocations are removed, not that an InstanceNotFound"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f436f4f_3ec8be53","line":2443,"in_reply_to":"9f436f4f_7ef766f7","updated":"2017-08-08 20:37:18.000000000","message":"heh, thanks. was something I missed while rebase-fixing","commit_id":"19c7345a3422ce04a1505c6a0f7c00875a55c0db"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"d738359c03f73f10c260480cff810be141515aa5","unresolved":false,"context_lines":[{"line_number":2440,"context_line":""},{"line_number":2441,"context_line":"    @mock.patch(\u0027nova.objects.Instance.get_by_uuid\u0027)"},{"line_number":2442,"context_line":"    def test_remove_deleted_instances_allocations_no_instance(self,"},{"line_number":2443,"context_line":"            mock_inst_get):"},{"line_number":2444,"context_line":"        # If for some reason an instance is no longer available, but"},{"line_number":2445,"context_line":"        # there are allocations for it, we want to be sure those"},{"line_number":2446,"context_line":"        # allocations are removed, not that an InstanceNotFound"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_834500b6","line":2443,"updated":"2017-08-09 12:57:42.000000000","message":"Unrelated whitespace change, but thank you. :)","commit_id":"f2e97b00286f6c369502da96f7bcd12317401083"}]}
