)]}'
{"nova/compute/manager.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"a68b1effc54b340244f025070084ccb8f13bde26","unresolved":false,"context_lines":[{"line_number":3838,"context_line":"                        \u0027%(host)s for instance during revert\u0027),"},{"line_number":3839,"context_line":"                      {\u0027node\u0027: instance.node, \u0027host\u0027: instance.host},"},{"line_number":3840,"context_line":"                      instance\u003dinstance)"},{"line_number":3841,"context_line":"            return"},{"line_number":3842,"context_line":""},{"line_number":3843,"context_line":"        # Fetch the original allocation that the instance had on the source"},{"line_number":3844,"context_line":"        # node, which are now held by the migration"}],"source_content_type":"text/x-python","patch_set":11,"id":"7f515b1d_f41e2bb9","line":3841,"updated":"2017-09-28 22:29:02.000000000","message":"return False","commit_id":"c2b3ada1af9c4d80daa8ee8497814fce1efa5ade"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"a68b1effc54b340244f025070084ccb8f13bde26","unresolved":false,"context_lines":[{"line_number":3963,"context_line":"                    # by the scheduler for the destination node."},{"line_number":3964,"context_line":"                    if migration and not self._revert_allocation("},{"line_number":3965,"context_line":"                            context, instance, migration):"},{"line_number":3966,"context_line":"                        # We did not do a migration-based"},{"line_number":3967,"context_line":"                        # allocation. Note that for a resize to the"},{"line_number":3968,"context_line":"                        # same host, the scheduler will merge the"},{"line_number":3969,"context_line":"                        # flavors, so here we\u0027d be subtracting the new"},{"line_number":3970,"context_line":"                        # flavor from the allocated resources on this"}],"source_content_type":"text/x-python","patch_set":11,"id":"7f515b1d_f44cebc8","line":3967,"range":{"start_line":3966,"start_character":26,"end_line":3967,"end_character":37},"updated":"2017-09-28 22:29:02.000000000","message":"or we failed to find the ComputeNode in the DB... in that case, though, is there really anything we can do?","commit_id":"c2b3ada1af9c4d80daa8ee8497814fce1efa5ade"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"fba04c8a0fcc9a93c190db766a1fd255c155de89","unresolved":false,"context_lines":[{"line_number":3838,"context_line":"                        \u0027%(host)s for instance during revert\u0027),"},{"line_number":3839,"context_line":"                      {\u0027node\u0027: instance.node, \u0027host\u0027: instance.host},"},{"line_number":3840,"context_line":"                      instance\u003dinstance)"},{"line_number":3841,"context_line":"            return"},{"line_number":3842,"context_line":""},{"line_number":3843,"context_line":"        # Fetch the original allocation that the instance had on the source"},{"line_number":3844,"context_line":"        # node, which are now held by the migration"}],"source_content_type":"text/x-python","patch_set":13,"id":"7f515b1d_29abbe1d","line":3841,"range":{"start_line":3841,"start_character":12,"end_line":3841,"end_character":18},"updated":"2017-10-05 16:28:44.000000000","message":"As in this case we did not revert an allocation here we should return False","commit_id":"a4c496423037683b658c9597919535e6e7b5b8f9"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"3deaf30aa0900494e2e330ae05f0259df160ecce","unresolved":false,"context_lines":[{"line_number":3821,"context_line":"                    context, instance, \"resize.revert.end\")"},{"line_number":3822,"context_line":""},{"line_number":3823,"context_line":"    def _revert_allocation(self, context, instance, migration):"},{"line_number":3824,"context_line":"        \"\"\"Revert an allocation that is held by migration to our instance."},{"line_number":3825,"context_line":""},{"line_number":3826,"context_line":"        NB: This assumes that instance.host and instance.node are current."},{"line_number":3827,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":16,"id":"7f515b1d_c94df13b","line":3824,"range":{"start_line":3824,"start_character":45,"end_line":3824,"end_character":47},"updated":"2017-10-09 16:17:02.000000000","message":"by a migration","commit_id":"cd3c38348df5d72181f092e373f73943dc9147a6"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"3deaf30aa0900494e2e330ae05f0259df160ecce","unresolved":false,"context_lines":[{"line_number":3838,"context_line":"                        \u0027%(host)s for instance during revert\u0027),"},{"line_number":3839,"context_line":"                      {\u0027node\u0027: instance.node, \u0027host\u0027: instance.host},"},{"line_number":3840,"context_line":"                      instance\u003dinstance)"},{"line_number":3841,"context_line":"            return"},{"line_number":3842,"context_line":""},{"line_number":3843,"context_line":"        # Fetch the original allocation that the instance had on the source"},{"line_number":3844,"context_line":"        # node, which are now held by the migration"}],"source_content_type":"text/x-python","patch_set":16,"id":"7f515b1d_49b7c1f6","line":3841,"updated":"2017-10-09 16:17:02.000000000","message":"return False?","commit_id":"cd3c38348df5d72181f092e373f73943dc9147a6"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"3deaf30aa0900494e2e330ae05f0259df160ecce","unresolved":false,"context_lines":[{"line_number":3857,"context_line":"        # FIXME(danms): Since we don\u0027t have an atomic operation to adjust"},{"line_number":3858,"context_line":"        # allocations for multiple consumers, we have to have space on the"},{"line_number":3859,"context_line":"        # source for double the claim before we delete the old one"},{"line_number":3860,"context_line":"        # FIXME(danms): This method is flawed in that it asssumes allocations"},{"line_number":3861,"context_line":"        # against only one provider. So, this may overwite allocations against"},{"line_number":3862,"context_line":"        # a shared provider, if we had one."},{"line_number":3863,"context_line":"        LOG.info(_(\u0027Swapping old allocation on %(node)s held by migration \u0027"}],"source_content_type":"text/x-python","patch_set":16,"id":"7f515b1d_6924bd60","line":3860,"range":{"start_line":3860,"start_character":57,"end_line":3860,"end_character":65},"updated":"2017-10-09 16:17:02.000000000","message":"assumes","commit_id":"cd3c38348df5d72181f092e373f73943dc9147a6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8ba0642bd9f4d7acf818a9029d20ae9d20432730","unresolved":false,"context_lines":[{"line_number":3777,"context_line":"            instance.node \u003d migration.source_node"},{"line_number":3778,"context_line":"            instance.save()"},{"line_number":3779,"context_line":""},{"line_number":3780,"context_line":"            self._revert_allocation(context, instance, migration)"},{"line_number":3781,"context_line":""},{"line_number":3782,"context_line":"            self.network_api.setup_networks_on_host(context, instance,"},{"line_number":3783,"context_line":"                                                    migration.source_compute)"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f4e5783_d8565d07","line":3780,"range":{"start_line":3780,"start_character":12,"end_line":3780,"end_character":65},"updated":"2017-10-10 22:08:33.000000000","message":"Shouldn\u0027t we wait to do this until after we\u0027ve done the other cleanup in here? In case something fails. More like around where instance.drop_migration_context() happens?","commit_id":"4b384318ad2024bd6fe0d095da06de8929a7ab61"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"09faaa10c3f6a2eb88b7cc7474c84ba2c8df9703","unresolved":false,"context_lines":[{"line_number":3777,"context_line":"            instance.node \u003d migration.source_node"},{"line_number":3778,"context_line":"            instance.save()"},{"line_number":3779,"context_line":""},{"line_number":3780,"context_line":"            self._revert_allocation(context, instance, migration)"},{"line_number":3781,"context_line":""},{"line_number":3782,"context_line":"            self.network_api.setup_networks_on_host(context, instance,"},{"line_number":3783,"context_line":"                                                    migration.source_compute)"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f4e5783_5cb921e7","line":3780,"range":{"start_line":3780,"start_character":12,"end_line":3780,"end_character":65},"in_reply_to":"5f4e5783_0a8fe02a","updated":"2017-10-11 18:12:55.000000000","message":"\u003e Once we do the above few lines, the instance shows as being on the source again, so having its allocation be on the dest host is confusing.\n\nGood point.","commit_id":"4b384318ad2024bd6fe0d095da06de8929a7ab61"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"342ea50ceb557bdeb797b288a471ae2c41caa029","unresolved":false,"context_lines":[{"line_number":3777,"context_line":"            instance.node \u003d migration.source_node"},{"line_number":3778,"context_line":"            instance.save()"},{"line_number":3779,"context_line":""},{"line_number":3780,"context_line":"            self._revert_allocation(context, instance, migration)"},{"line_number":3781,"context_line":""},{"line_number":3782,"context_line":"            self.network_api.setup_networks_on_host(context, instance,"},{"line_number":3783,"context_line":"                                                    migration.source_compute)"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f4e5783_0a8fe02a","line":3780,"range":{"start_line":3780,"start_character":12,"end_line":3780,"end_character":65},"in_reply_to":"5f4e5783_d8565d07","updated":"2017-10-11 15:00:05.000000000","message":"I think I did this here because it was located close to where we flip the node back on the instance. Once we do the above few lines, the instance shows as being on the source again, so having its allocation be on the dest host is confusing. Why would we not want to flip this back immediately?","commit_id":"4b384318ad2024bd6fe0d095da06de8929a7ab61"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8ba0642bd9f4d7acf818a9029d20ae9d20432730","unresolved":false,"context_lines":[{"line_number":3836,"context_line":"            cn \u003d objects.ComputeNode.get_by_host_and_nodename(context,"},{"line_number":3837,"context_line":"                                                              instance.host,"},{"line_number":3838,"context_line":"                                                              instance.node)"},{"line_number":3839,"context_line":"        except exception.ComputeHostNotFound:"},{"line_number":3840,"context_line":"            LOG.error(_(\u0027Unable to look up compute node %(node)s on host \u0027"},{"line_number":3841,"context_line":"                        \u0027%(host)s for instance during revert\u0027),"},{"line_number":3842,"context_line":"                      {\u0027node\u0027: instance.node, \u0027host\u0027: instance.host},"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f4e5783_187635a6","line":3839,"range":{"start_line":3839,"start_character":25,"end_line":3839,"end_character":44},"updated":"2017-10-10 22:08:33.000000000","message":"You don\u0027t have a test case for this.","commit_id":"4b384318ad2024bd6fe0d095da06de8929a7ab61"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8ba0642bd9f4d7acf818a9029d20ae9d20432730","unresolved":false,"context_lines":[{"line_number":3837,"context_line":"                                                              instance.host,"},{"line_number":3838,"context_line":"                                                              instance.node)"},{"line_number":3839,"context_line":"        except exception.ComputeHostNotFound:"},{"line_number":3840,"context_line":"            LOG.error(_(\u0027Unable to look up compute node %(node)s on host \u0027"},{"line_number":3841,"context_line":"                        \u0027%(host)s for instance during revert\u0027),"},{"line_number":3842,"context_line":"                      {\u0027node\u0027: instance.node, \u0027host\u0027: instance.host},"},{"line_number":3843,"context_line":"                      instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f4e5783_bdd5d3bb","line":3840,"range":{"start_line":3840,"start_character":22,"end_line":3840,"end_character":23},"updated":"2017-10-10 22:08:33.000000000","message":"Don\u0027t need the translation markers anymore.","commit_id":"4b384318ad2024bd6fe0d095da06de8929a7ab61"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"342ea50ceb557bdeb797b288a471ae2c41caa029","unresolved":false,"context_lines":[{"line_number":3837,"context_line":"                                                              instance.host,"},{"line_number":3838,"context_line":"                                                              instance.node)"},{"line_number":3839,"context_line":"        except exception.ComputeHostNotFound:"},{"line_number":3840,"context_line":"            LOG.error(_(\u0027Unable to look up compute node %(node)s on host \u0027"},{"line_number":3841,"context_line":"                        \u0027%(host)s for instance during revert\u0027),"},{"line_number":3842,"context_line":"                      {\u0027node\u0027: instance.node, \u0027host\u0027: instance.host},"},{"line_number":3843,"context_line":"                      instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f4e5783_4aa8381e","line":3840,"range":{"start_line":3840,"start_character":22,"end_line":3840,"end_character":23},"in_reply_to":"5f4e5783_bdd5d3bb","updated":"2017-10-11 15:00:05.000000000","message":"Yep, these were here from before the recent spanking.","commit_id":"4b384318ad2024bd6fe0d095da06de8929a7ab61"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8ba0642bd9f4d7acf818a9029d20ae9d20432730","unresolved":false,"context_lines":[{"line_number":3838,"context_line":"                                                              instance.node)"},{"line_number":3839,"context_line":"        except exception.ComputeHostNotFound:"},{"line_number":3840,"context_line":"            LOG.error(_(\u0027Unable to look up compute node %(node)s on host \u0027"},{"line_number":3841,"context_line":"                        \u0027%(host)s for instance during revert\u0027),"},{"line_number":3842,"context_line":"                      {\u0027node\u0027: instance.node, \u0027host\u0027: instance.host},"},{"line_number":3843,"context_line":"                      instance\u003dinstance)"},{"line_number":3844,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f4e5783_5dab7f1c","line":3841,"range":{"start_line":3841,"start_character":54,"end_line":3841,"end_character":60},"updated":"2017-10-10 22:08:33.000000000","message":"nit: saying revert here and below when this is called from prep_resize could get confusing when debugging later. What we\u0027re really reverting is the resource allocation held by the migration record. Not sure if we could clarify that in the log message by just saying \"allocation revert\" instead.","commit_id":"4b384318ad2024bd6fe0d095da06de8929a7ab61"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"342ea50ceb557bdeb797b288a471ae2c41caa029","unresolved":false,"context_lines":[{"line_number":3838,"context_line":"                                                              instance.node)"},{"line_number":3839,"context_line":"        except exception.ComputeHostNotFound:"},{"line_number":3840,"context_line":"            LOG.error(_(\u0027Unable to look up compute node %(node)s on host \u0027"},{"line_number":3841,"context_line":"                        \u0027%(host)s for instance during revert\u0027),"},{"line_number":3842,"context_line":"                      {\u0027node\u0027: instance.node, \u0027host\u0027: instance.host},"},{"line_number":3843,"context_line":"                      instance\u003dinstance)"},{"line_number":3844,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f4e5783_0a6800f3","line":3841,"range":{"start_line":3841,"start_character":54,"end_line":3841,"end_character":60},"in_reply_to":"5f4e5783_5dab7f1c","updated":"2017-10-11 15:00:05.000000000","message":"Yep.","commit_id":"4b384318ad2024bd6fe0d095da06de8929a7ab61"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8ba0642bd9f4d7acf818a9029d20ae9d20432730","unresolved":false,"context_lines":[{"line_number":3841,"context_line":"                        \u0027%(host)s for instance during revert\u0027),"},{"line_number":3842,"context_line":"                      {\u0027node\u0027: instance.node, \u0027host\u0027: instance.host},"},{"line_number":3843,"context_line":"                      instance\u003dinstance)"},{"line_number":3844,"context_line":"            return"},{"line_number":3845,"context_line":""},{"line_number":3846,"context_line":"        # Fetch the original allocation that the instance had on the source"},{"line_number":3847,"context_line":"        # node, which are now held by the migration"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f4e5783_3d8fa3cd","line":3844,"range":{"start_line":3844,"start_character":12,"end_line":3844,"end_character":18},"updated":"2017-10-10 22:08:33.000000000","message":"Below you\u0027re returning booleans, but here you\u0027re returning None, do you care about the distinction? \n\n\"if migration and not self._revert_allocation\"\n\nin prep_resize is going to work the same either way.","commit_id":"4b384318ad2024bd6fe0d095da06de8929a7ab61"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8ba0642bd9f4d7acf818a9029d20ae9d20432730","unresolved":false,"context_lines":[{"line_number":3846,"context_line":"        # Fetch the original allocation that the instance had on the source"},{"line_number":3847,"context_line":"        # node, which are now held by the migration"},{"line_number":3848,"context_line":"        orig_alloc \u003d self.reportclient.get_allocations_for_instance("},{"line_number":3849,"context_line":"            cn.uuid, migration)"},{"line_number":3850,"context_line":"        if not orig_alloc:"},{"line_number":3851,"context_line":"            # NOTE(danms): This migration did not do per-migration allocation"},{"line_number":3852,"context_line":"            # accounting, so nothing to do here."}],"source_content_type":"text/x-python","patch_set":18,"id":"5f4e5783_9d033743","line":3849,"range":{"start_line":3849,"start_character":12,"end_line":3849,"end_character":19},"updated":"2017-10-10 22:08:33.000000000","message":"I\u0027ve been thinking this for a couple of weeks now, but we could save ourselves some trouble if we stored the source and dest compute node uuids in the Migration object itself, then we wouldn\u0027t have to do this ComputeNode lookup dance here and when rolling back a live migration. It\u0027s a later optimization, but something to keep in mind for a rainy day.","commit_id":"4b384318ad2024bd6fe0d095da06de8929a7ab61"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"342ea50ceb557bdeb797b288a471ae2c41caa029","unresolved":false,"context_lines":[{"line_number":3846,"context_line":"        # Fetch the original allocation that the instance had on the source"},{"line_number":3847,"context_line":"        # node, which are now held by the migration"},{"line_number":3848,"context_line":"        orig_alloc \u003d self.reportclient.get_allocations_for_instance("},{"line_number":3849,"context_line":"            cn.uuid, migration)"},{"line_number":3850,"context_line":"        if not orig_alloc:"},{"line_number":3851,"context_line":"            # NOTE(danms): This migration did not do per-migration allocation"},{"line_number":3852,"context_line":"            # accounting, so nothing to do here."}],"source_content_type":"text/x-python","patch_set":18,"id":"5f4e5783_8a5cf04b","line":3849,"range":{"start_line":3849,"start_character":12,"end_line":3849,"end_character":19},"in_reply_to":"5f4e5783_9d033743","updated":"2017-10-11 15:00:05.000000000","message":"Yeah, although I think that I\u0027m going through hoops I don\u0027t need to with this. I should be able to get all the allocations for the migration, which would just be one against the source, and thus have all the info I need.","commit_id":"4b384318ad2024bd6fe0d095da06de8929a7ab61"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8ba0642bd9f4d7acf818a9029d20ae9d20432730","unresolved":false,"context_lines":[{"line_number":3850,"context_line":"        if not orig_alloc:"},{"line_number":3851,"context_line":"            # NOTE(danms): This migration did not do per-migration allocation"},{"line_number":3852,"context_line":"            # accounting, so nothing to do here."},{"line_number":3853,"context_line":"            LOG.info(_(\u0027Old-style migration %(mig)s is being reverted; \u0027"},{"line_number":3854,"context_line":"                       \u0027no migration claims found on original node \u0027"},{"line_number":3855,"context_line":"                       \u0027%(node)s to swap.\u0027),"},{"line_number":3856,"context_line":"                     {\u0027mig\u0027: migration.uuid, \u0027node\u0027: cn.uuid},"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f4e5783_1d9507e5","line":3853,"range":{"start_line":3853,"start_character":21,"end_line":3853,"end_character":22},"updated":"2017-10-10 22:08:33.000000000","message":"nix the translation markers","commit_id":"4b384318ad2024bd6fe0d095da06de8929a7ab61"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8ba0642bd9f4d7acf818a9029d20ae9d20432730","unresolved":false,"context_lines":[{"line_number":3863,"context_line":"        # FIXME(danms): This method is flawed in that it asssumes allocations"},{"line_number":3864,"context_line":"        # against only one provider. So, this may overwite allocations against"},{"line_number":3865,"context_line":"        # a shared provider, if we had one."},{"line_number":3866,"context_line":"        LOG.info(_(\u0027Swapping old allocation on %(node)s held by migration \u0027"},{"line_number":3867,"context_line":"                   \u0027%(mig)s for instance\u0027),"},{"line_number":3868,"context_line":"                 {\u0027node\u0027: cn.uuid, \u0027mig\u0027: migration.uuid},"},{"line_number":3869,"context_line":"                 instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f4e5783_bd7153e3","line":3866,"range":{"start_line":3866,"start_character":17,"end_line":3866,"end_character":18},"updated":"2017-10-10 22:08:33.000000000","message":"yar","commit_id":"4b384318ad2024bd6fe0d095da06de8929a7ab61"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8ba0642bd9f4d7acf818a9029d20ae9d20432730","unresolved":false,"context_lines":[{"line_number":3867,"context_line":"                   \u0027%(mig)s for instance\u0027),"},{"line_number":3868,"context_line":"                 {\u0027node\u0027: cn.uuid, \u0027mig\u0027: migration.uuid},"},{"line_number":3869,"context_line":"                 instance\u003dinstance)"},{"line_number":3870,"context_line":"        self.reportclient.put_allocations(cn.uuid, instance.uuid, orig_alloc,"},{"line_number":3871,"context_line":"                                          instance.project_id,"},{"line_number":3872,"context_line":"                                          instance.user_id)"},{"line_number":3873,"context_line":"        self.reportclient.delete_allocation_for_instance(migration.uuid)"},{"line_number":3874,"context_line":"        return True"},{"line_number":3875,"context_line":""},{"line_number":3876,"context_line":"    def _prep_resize(self, context, image, instance, instance_type,"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f4e5783_3d56832b","line":3873,"range":{"start_line":3870,"start_character":8,"end_line":3873,"end_character":72},"updated":"2017-10-10 22:08:33.000000000","message":"If we\u0027re doing resize to the same host, do we need to care about doing this?","commit_id":"4b384318ad2024bd6fe0d095da06de8929a7ab61"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"342ea50ceb557bdeb797b288a471ae2c41caa029","unresolved":false,"context_lines":[{"line_number":3867,"context_line":"                   \u0027%(mig)s for instance\u0027),"},{"line_number":3868,"context_line":"                 {\u0027node\u0027: cn.uuid, \u0027mig\u0027: migration.uuid},"},{"line_number":3869,"context_line":"                 instance\u003dinstance)"},{"line_number":3870,"context_line":"        self.reportclient.put_allocations(cn.uuid, instance.uuid, orig_alloc,"},{"line_number":3871,"context_line":"                                          instance.project_id,"},{"line_number":3872,"context_line":"                                          instance.user_id)"},{"line_number":3873,"context_line":"        self.reportclient.delete_allocation_for_instance(migration.uuid)"},{"line_number":3874,"context_line":"        return True"},{"line_number":3875,"context_line":""},{"line_number":3876,"context_line":"    def _prep_resize(self, context, image, instance, instance_type,"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f4e5783_0a36c004","line":3873,"range":{"start_line":3870,"start_character":8,"end_line":3873,"end_character":72},"in_reply_to":"5f4e5783_3d56832b","updated":"2017-10-11 15:00:05.000000000","message":"Yes, because the migration still holds the old allocation.","commit_id":"4b384318ad2024bd6fe0d095da06de8929a7ab61"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8ba0642bd9f4d7acf818a9029d20ae9d20432730","unresolved":false,"context_lines":[{"line_number":3963,"context_line":"                    # Since we hit a failure, we\u0027re either rescheduling or dead"},{"line_number":3964,"context_line":"                    # and either way we need to cleanup any allocations created"},{"line_number":3965,"context_line":"                    # by the scheduler for the destination node."},{"line_number":3966,"context_line":"                    if migration and not self._revert_allocation("},{"line_number":3967,"context_line":"                            context, instance, migration):"},{"line_number":3968,"context_line":"                        # We did not do a migration-based"},{"line_number":3969,"context_line":"                        # allocation. Note that for a resize to the"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f4e5783_d8089d29","line":3966,"range":{"start_line":3966,"start_character":23,"end_line":3966,"end_character":32},"updated":"2017-10-10 22:08:33.000000000","message":"I assume you\u0027ve thought about this and I just haven\u0027t gotten to it later in the series, but we only started passing the migration to prep_resize starting in Queens with I6bc6d28655368084f08fed9c4f56a285b7063338.\n\nBut we will probably need some minimum compute service version check in the scheduler when creating allocations against the source node using the migration, right? Because if we are going to rely on the computes cleaning these up and swapping back to the instance for the allocation, we have to know the computes involved are going to have this code.","commit_id":"4b384318ad2024bd6fe0d095da06de8929a7ab61"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"09faaa10c3f6a2eb88b7cc7474c84ba2c8df9703","unresolved":false,"context_lines":[{"line_number":3963,"context_line":"                    # Since we hit a failure, we\u0027re either rescheduling or dead"},{"line_number":3964,"context_line":"                    # and either way we need to cleanup any allocations created"},{"line_number":3965,"context_line":"                    # by the scheduler for the destination node."},{"line_number":3966,"context_line":"                    if migration and not self._revert_allocation("},{"line_number":3967,"context_line":"                            context, instance, migration):"},{"line_number":3968,"context_line":"                        # We did not do a migration-based"},{"line_number":3969,"context_line":"                        # allocation. Note that for a resize to the"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f4e5783_3ccc2569","line":3966,"range":{"start_line":3966,"start_character":23,"end_line":3966,"end_character":32},"in_reply_to":"5f4e5783_4a2b9893","updated":"2017-10-11 18:12:55.000000000","message":"\u003e That code that passes it doesn\u0027t pre-create and pass it unless\n \u003e computes are new enough.\n\nAh yeah, derp:\n\nhttps://review.openstack.org/#/c/498950/18/nova/conductor/tasks/migrate.py@44\n\nI knew about the change but forgot about the version check.","commit_id":"4b384318ad2024bd6fe0d095da06de8929a7ab61"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"342ea50ceb557bdeb797b288a471ae2c41caa029","unresolved":false,"context_lines":[{"line_number":3963,"context_line":"                    # Since we hit a failure, we\u0027re either rescheduling or dead"},{"line_number":3964,"context_line":"                    # and either way we need to cleanup any allocations created"},{"line_number":3965,"context_line":"                    # by the scheduler for the destination node."},{"line_number":3966,"context_line":"                    if migration and not self._revert_allocation("},{"line_number":3967,"context_line":"                            context, instance, migration):"},{"line_number":3968,"context_line":"                        # We did not do a migration-based"},{"line_number":3969,"context_line":"                        # allocation. Note that for a resize to the"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f4e5783_4a2b9893","line":3966,"range":{"start_line":3966,"start_character":23,"end_line":3966,"end_character":32},"in_reply_to":"5f4e5783_d8089d29","updated":"2017-10-11 15:00:05.000000000","message":"That code that passes it doesn\u0027t pre-create and pass it unless computes are new enough.","commit_id":"4b384318ad2024bd6fe0d095da06de8929a7ab61"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5340b5710b40988f9f4efbae37693a1e1119e204","unresolved":false,"context_lines":[{"line_number":3854,"context_line":""},{"line_number":3855,"context_line":"        if len(orig_alloc) \u003e 1:"},{"line_number":3856,"context_line":"            LOG.error(\u0027New-style migration %(mig)s has allocations against \u0027"},{"line_number":3857,"context_line":"                      \u0027more than one provider %(rps)s. This should not be \u0027"},{"line_number":3858,"context_line":"                      \u0027possible, but reverting it anyway.\u0027,"},{"line_number":3859,"context_line":"                      {\u0027mig\u0027: migration.uuid,"},{"line_number":3860,"context_line":"                       \u0027rps\u0027: \u0027,\u0027.join(orig_alloc.keys())},"},{"line_number":3861,"context_line":"                      instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":20,"id":"5f4e5783_dc29919b","line":3858,"range":{"start_line":3857,"start_character":55,"end_line":3858,"end_character":31},"updated":"2017-10-11 18:31:39.000000000","message":"At least not until we support shared storage providers. Maybe throw a TODO in a comment above this?","commit_id":"1a7a701c0cef396e69fec09671ba17a03644f8ef"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d58b8ed154405d51889d9f9010b48a91763a2477","unresolved":false,"context_lines":[{"line_number":3864,"context_line":"                       \u0027rps\u0027: \u0027,\u0027.join(orig_alloc.keys())},"},{"line_number":3865,"context_line":"                      instance\u003dinstance)"},{"line_number":3866,"context_line":""},{"line_number":3867,"context_line":"        # We only have a claim against one provider, it is the source node"},{"line_number":3868,"context_line":"        cn_uuid \u003d orig_alloc.keys()[0]"},{"line_number":3869,"context_line":""},{"line_number":3870,"context_line":"        # Get just the resources part of the one allocation we need below"}],"source_content_type":"text/x-python","patch_set":21,"id":"5f4e5783_d741503b","line":3867,"range":{"start_line":3867,"start_character":52,"end_line":3867,"end_character":74},"updated":"2017-10-12 15:32:53.000000000","message":"It is only true if len(orig_alloc) \u003d\u003d 1 but I\u0027m fine assuming it as you already logged an ERROR above for the \u003e1 case.","commit_id":"3fc9a774b5fab713e056b05db2c9489dab1c3f23"}],"nova/tests/unit/compute/test_compute_mgr.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"fba04c8a0fcc9a93c190db766a1fd255c155de89","unresolved":false,"context_lines":[{"line_number":5966,"context_line":"            mock_report.get_allocations_for_instance.return_value \u003d a"},{"line_number":5967,"context_line":"            self.migration.uuid \u003d uuids.migration"},{"line_number":5968,"context_line":""},{"line_number":5969,"context_line":"            self.compute._revert_allocation(mock.sentinel.ctx,"},{"line_number":5970,"context_line":"                                            self.instance, self.migration)"},{"line_number":5971,"context_line":""},{"line_number":5972,"context_line":"            mock_report.put_allocations.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":13,"id":"7f515b1d_a42113a2","line":5969,"updated":"2017-10-05 16:28:44.000000000","message":"I think it would make sense to assert the return value as well.","commit_id":"a4c496423037683b658c9597919535e6e7b5b8f9"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"fba04c8a0fcc9a93c190db766a1fd255c155de89","unresolved":false,"context_lines":[{"line_number":5971,"context_line":""},{"line_number":5972,"context_line":"            mock_report.put_allocations.assert_called_once_with("},{"line_number":5973,"context_line":"                cu, self.instance.uuid, {\u0027DISK_GB\u0027: 1},"},{"line_number":5974,"context_line":"                self.instance.project_id, self.instance.user_id)"},{"line_number":5975,"context_line":""},{"line_number":5976,"context_line":"        doit()"},{"line_number":5977,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"7f515b1d_0902420c","line":5974,"updated":"2017-10-05 16:28:44.000000000","message":"I think it would make sense to assert that delete_allocation_for_instance is also called here","commit_id":"a4c496423037683b658c9597919535e6e7b5b8f9"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"fba04c8a0fcc9a93c190db766a1fd255c155de89","unresolved":false,"context_lines":[{"line_number":5982,"context_line":"            mock_report.get_allocations_for_instance.return_value \u003d {}"},{"line_number":5983,"context_line":"            self.migration.uuid \u003d uuids.migration"},{"line_number":5984,"context_line":""},{"line_number":5985,"context_line":"            self.compute._revert_allocation(mock.sentinel.ctx,"},{"line_number":5986,"context_line":"                                            self.instance, self.migration)"},{"line_number":5987,"context_line":""},{"line_number":5988,"context_line":"            self.assertFalse(mock_report.put_allocations.called)"}],"source_content_type":"text/x-python","patch_set":13,"id":"7f515b1d_643b1bd1","line":5985,"updated":"2017-10-05 16:28:44.000000000","message":"ditto","commit_id":"a4c496423037683b658c9597919535e6e7b5b8f9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8ba0642bd9f4d7acf818a9029d20ae9d20432730","unresolved":false,"context_lines":[{"line_number":5971,"context_line":"            mock_report.get_allocations_for_instance.return_value \u003d a"},{"line_number":5972,"context_line":"            self.migration.uuid \u003d uuids.migration"},{"line_number":5973,"context_line":""},{"line_number":5974,"context_line":"            self.compute._revert_allocation(mock.sentinel.ctx,"},{"line_number":5975,"context_line":"                                            self.instance, self.migration)"},{"line_number":5976,"context_line":""},{"line_number":5977,"context_line":"            mock_report.put_allocations.assert_called_once_with("},{"line_number":5978,"context_line":"                cu, self.instance.uuid, {\u0027DISK_GB\u0027: 1},"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f4e5783_9840e537","line":5975,"range":{"start_line":5974,"start_character":12,"end_line":5975,"end_character":74},"updated":"2017-10-10 22:08:33.000000000","message":"assertTrue for the return value?","commit_id":"4b384318ad2024bd6fe0d095da06de8929a7ab61"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8ba0642bd9f4d7acf818a9029d20ae9d20432730","unresolved":false,"context_lines":[{"line_number":5987,"context_line":"            mock_report.get_allocations_for_instance.return_value \u003d {}"},{"line_number":5988,"context_line":"            self.migration.uuid \u003d uuids.migration"},{"line_number":5989,"context_line":""},{"line_number":5990,"context_line":"            self.compute._revert_allocation(mock.sentinel.ctx,"},{"line_number":5991,"context_line":"                                            self.instance, self.migration)"},{"line_number":5992,"context_line":""},{"line_number":5993,"context_line":"            self.assertFalse(mock_report.put_allocations.called)"},{"line_number":5994,"context_line":"            self.assertFalse(mock_report.delete_allocation_for_instance.called)"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f4e5783_584a6d55","line":5991,"range":{"start_line":5990,"start_character":12,"end_line":5991,"end_character":74},"updated":"2017-10-10 22:08:33.000000000","message":"assertFalse?","commit_id":"4b384318ad2024bd6fe0d095da06de8929a7ab61"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5340b5710b40988f9f4efbae37693a1e1119e204","unresolved":false,"context_lines":[{"line_number":5998,"context_line":""},{"line_number":5999,"context_line":"        doit()"},{"line_number":6000,"context_line":""},{"line_number":6001,"context_line":"    def test_revert_allocation_new_style_unpossible(self):"},{"line_number":6002,"context_line":"        \"\"\"Test for the should-not-be-possible case of multiple old allocs."},{"line_number":6003,"context_line":""},{"line_number":6004,"context_line":"        This should not be a thing that can happen, but just verify that"}],"source_content_type":"text/x-python","patch_set":20,"id":"5f4e5783_473caac7","line":6001,"range":{"start_line":6001,"start_character":41,"end_line":6001,"end_character":51},"updated":"2017-10-11 18:31:39.000000000","message":"oh dan, now some spelling typo bot fixer in china is going to detect this and push a patch to fix it, and i\u0027m going to have to troll the mailing list which will in turn create yet another work group / SIG thing.","commit_id":"1a7a701c0cef396e69fec09671ba17a03644f8ef"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5340b5710b40988f9f4efbae37693a1e1119e204","unresolved":false,"context_lines":[{"line_number":6010,"context_line":"        def doit(mock_report):"},{"line_number":6011,"context_line":"            a \u003d {"},{"line_number":6012,"context_line":"                uuids.node: {\u0027resources\u0027: {\u0027DISK_GB\u0027: 1}},"},{"line_number":6013,"context_line":"                uuids.edon: {\u0027resources\u0027: {\u0027DISK_GB\u0027: 1}},"},{"line_number":6014,"context_line":"            }"},{"line_number":6015,"context_line":"            mock_report.get_allocations_for_consumer.return_value \u003d a"},{"line_number":6016,"context_line":"            self.migration.uuid \u003d uuids.migration"}],"source_content_type":"text/x-python","patch_set":20,"id":"5f4e5783_c7765aa5","line":6013,"range":{"start_line":6013,"start_character":22,"end_line":6013,"end_character":26},"updated":"2017-10-11 18:31:39.000000000","message":"i see what you did here","commit_id":"1a7a701c0cef396e69fec09671ba17a03644f8ef"}]}
