)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8cfc533eb34925da7ccb08443bb7691f009ee9ed","unresolved":false,"context_lines":[{"line_number":9,"context_line":"When doing the resource audit there is a subtle bug in the current"},{"line_number":10,"context_line":"code.  The problem arises if:"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"1) You have one or more stale migrations which didn\u0027t complete"},{"line_number":13,"context_line":"properly that involve the current compute node."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"2) The instance from the uncompleted migration is currently doing a"},{"line_number":16,"context_line":"resize/migration that does not involve the current compute node."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"9a629dbe_9fff9ca9","line":13,"range":{"start_line":12,"start_character":24,"end_line":13,"end_character":46},"updated":"2016-11-08 23:33:03.000000000","message":"How do you get into this state? I\u0027m not really sure what a stale migration is. Why wouldn\u0027t the instance be in error state?","commit_id":"63267aa57cc50da995917f3b83a11cb02649b0ad"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"254012d63106ead74f2cac967646e1d11b320a7b","unresolved":false,"context_lines":[{"line_number":9,"context_line":"When doing the resource audit there is a subtle bug in the current"},{"line_number":10,"context_line":"code.  The problem arises if:"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"1) You have one or more stale migrations which didn\u0027t complete"},{"line_number":13,"context_line":"properly that involve the current compute node."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"2) The instance from the uncompleted migration is currently doing a"},{"line_number":16,"context_line":"resize/migration that does not involve the current compute node."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"9a629dbe_3f7850c4","line":13,"range":{"start_line":12,"start_character":24,"end_line":13,"end_character":46},"in_reply_to":"9a629dbe_9fff9ca9","updated":"2016-11-08 23:54:22.000000000","message":"The bug report basically says, I had a bug in some local code which tickled this thing. Do you have a recreate scenario for non-local buggy code to verify this is actually a problem?","commit_id":"63267aa57cc50da995917f3b83a11cb02649b0ad"}],"nova/compute/resource_tracker.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9b2e465b748b66682ffbf7dbfa96fa7800dc9562","unresolved":false,"context_lines":[{"line_number":838,"context_line":"            if (instance.migration_context is not None and"},{"line_number":839,"context_line":"                    instance.migration_context.migration_id !\u003d migration.id):"},{"line_number":840,"context_line":"                LOG.warning(_LW(\"Instance migration %(im)s doesn\u0027t match \""},{"line_number":841,"context_line":"                                \"migration %(m)s, skipping migration.\"),"},{"line_number":842,"context_line":"                    {\u0027im\u0027: instance.migration_context.migration_id,"},{"line_number":843,"context_line":"                     \u0027m\u0027: migration.id})"},{"line_number":844,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":4,"id":"dada55a8_cff3289e","line":841,"updated":"2016-07-25 17:18:37.000000000","message":"Perhaps add a note to the log warning message that this can occur when a migration is \"stale\" i.e. when a migration for this instance was happening on another destination host and failed? Also, is this really a warning-level condition? Typically, warnings are for things the admin should address. But in this case, it\u0027s not really addressable, right? Perhaps INFO is a better level?","commit_id":"8d3c36d9ab170f98cd7134272891e8c49e89ccd1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8cfc533eb34925da7ccb08443bb7691f009ee9ed","unresolved":false,"context_lines":[{"line_number":809,"context_line":""},{"line_number":810,"context_line":"            try:"},{"line_number":811,"context_line":"                if uuid not in instances:"},{"line_number":812,"context_line":"                    instances[uuid] \u003d migration.instance"},{"line_number":813,"context_line":"            except exception.InstanceNotFound as e:"},{"line_number":814,"context_line":"                # migration referencing deleted instance"},{"line_number":815,"context_line":"                LOG.debug(\u0027Migration instance not found: %s\u0027, e)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a629dbe_1f80ec45","line":812,"range":{"start_line":812,"start_character":38,"end_line":812,"end_character":56},"updated":"2016-11-08 23:33:03.000000000","message":"OK this is where we\u0027d lazy-load the instance in case it wasn\u0027t matched up in _pair_instances_to_migrations.","commit_id":"63267aa57cc50da995917f3b83a11cb02649b0ad"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8cfc533eb34925da7ccb08443bb7691f009ee9ed","unresolved":false,"context_lines":[{"line_number":816,"context_line":"                continue"},{"line_number":817,"context_line":""},{"line_number":818,"context_line":"            # skip migration if instance isn\u0027t in a resize state:"},{"line_number":819,"context_line":"            if not _instance_in_resize_state(instances[uuid]):"},{"line_number":820,"context_line":"                LOG.warning(_LW(\"Instance not resizing, skipping migration.\"),"},{"line_number":821,"context_line":"                            instance_uuid\u003duuid)"},{"line_number":822,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a629dbe_df3af497","line":819,"range":{"start_line":819,"start_character":19,"end_line":819,"end_character":44},"updated":"2016-11-08 23:33:03.000000000","message":"So what is a stale migration if it passes this check?","commit_id":"63267aa57cc50da995917f3b83a11cb02649b0ad"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"281eb60875292a6d8d0a3abe5aef8242d3045221","unresolved":false,"context_lines":[{"line_number":816,"context_line":"                continue"},{"line_number":817,"context_line":""},{"line_number":818,"context_line":"            # skip migration if instance isn\u0027t in a resize state:"},{"line_number":819,"context_line":"            if not _instance_in_resize_state(instances[uuid]):"},{"line_number":820,"context_line":"                LOG.warning(_LW(\"Instance not resizing, skipping migration.\"),"},{"line_number":821,"context_line":"                            instance_uuid\u003duuid)"},{"line_number":822,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a629dbe_a7e6fa12","line":819,"range":{"start_line":819,"start_character":19,"end_line":819,"end_character":44},"in_reply_to":"9a629dbe_df3af497","updated":"2016-12-05 20:29:40.000000000","message":"What I\u0027m calling a \"stale\" migration is one that\u0027s listed in the DB but isn\u0027t actually in progress anymore.  (Due to compute node crash, for example.)","commit_id":"63267aa57cc50da995917f3b83a11cb02649b0ad"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8cfc533eb34925da7ccb08443bb7691f009ee9ed","unresolved":false,"context_lines":[{"line_number":837,"context_line":"            if (instance.migration_context is not None and"},{"line_number":838,"context_line":"                    instance.migration_context.migration_id !\u003d migration.id):"},{"line_number":839,"context_line":"                LOG.info(_LI(\"Instance migration %(im)s doesn\u0027t match \""},{"line_number":840,"context_line":"                                \"migration %(m)s, skipping migration. This \""},{"line_number":841,"context_line":"                                \"can occur if a previous migration for this \""},{"line_number":842,"context_line":"                                \"instance did not successfully complete.\"),"},{"line_number":843,"context_line":"                    {\u0027im\u0027: instance.migration_context.migration_id,"},{"line_number":844,"context_line":"                     \u0027m\u0027: migration.id})"},{"line_number":845,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a629dbe_ffca58a0","line":842,"range":{"start_line":840,"start_character":32,"end_line":842,"end_character":75},"updated":"2016-11-08 23:33:03.000000000","message":"nit: the alignment here is off, it should be lined up with \"Instance above.","commit_id":"63267aa57cc50da995917f3b83a11cb02649b0ad"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"281eb60875292a6d8d0a3abe5aef8242d3045221","unresolved":false,"context_lines":[{"line_number":837,"context_line":"            if (instance.migration_context is not None and"},{"line_number":838,"context_line":"                    instance.migration_context.migration_id !\u003d migration.id):"},{"line_number":839,"context_line":"                LOG.info(_LI(\"Instance migration %(im)s doesn\u0027t match \""},{"line_number":840,"context_line":"                                \"migration %(m)s, skipping migration. This \""},{"line_number":841,"context_line":"                                \"can occur if a previous migration for this \""},{"line_number":842,"context_line":"                                \"instance did not successfully complete.\"),"},{"line_number":843,"context_line":"                    {\u0027im\u0027: instance.migration_context.migration_id,"},{"line_number":844,"context_line":"                     \u0027m\u0027: migration.id})"},{"line_number":845,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a629dbe_470d1ee7","line":842,"range":{"start_line":840,"start_character":32,"end_line":842,"end_character":75},"in_reply_to":"9a629dbe_ffca58a0","updated":"2016-12-05 20:29:40.000000000","message":"Will fix in next iteration.","commit_id":"63267aa57cc50da995917f3b83a11cb02649b0ad"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"425e7e405747087c33759271ccf8654f31fb05dc","unresolved":false,"context_lines":[{"line_number":842,"context_line":"                                \"instance did not successfully complete.\"),"},{"line_number":843,"context_line":"                    {\u0027im\u0027: instance.migration_context.migration_id,"},{"line_number":844,"context_line":"                     \u0027m\u0027: migration.id})"},{"line_number":845,"context_line":"                continue"},{"line_number":846,"context_line":""},{"line_number":847,"context_line":"            try:"},{"line_number":848,"context_line":"                self._update_usage_from_migration(context, instance, migration)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a629dbe_675b02f7","line":845,"updated":"2016-11-09 15:23:40.000000000","message":"So, this busted migration is going to be processed on this node by default every 60 seconds. Shouldn\u0027t we be cleaning it up somewhere?\n\nI was really thinking we\u0027d handle something like this on compute node startup like we do for instances that were evacuated:\n\nhttps://github.com/openstack/nova/blob/569e463f02b0a631d341b06849217657a22c4569/nova/compute/manager.py#L636","commit_id":"63267aa57cc50da995917f3b83a11cb02649b0ad"}],"nova/tests/unit/compute/test_resource_tracker.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9b2e465b748b66682ffbf7dbfa96fa7800dc9562","unresolved":false,"context_lines":[{"line_number":869,"context_line":"        self.tracker._update_usage_from_migrations("},{"line_number":870,"context_line":"            self.context, [migration_2001])"},{"line_number":871,"context_line":"        mock_get_instance.assert_called_once_with(self.context, instance.uuid)"},{"line_number":872,"context_line":"        self.assertFalse(mock_update_usage.called)"}],"source_content_type":"text/x-python","patch_set":4,"id":"dada55a8_eff8ac7e","line":872,"updated":"2016-07-25 17:18:37.000000000","message":"Please only add new resource tracker tests to test_tracker.py. test_resource_tracker.py is essentially deprecated now and I need to remove the final couple tests in there.","commit_id":"8d3c36d9ab170f98cd7134272891e8c49e89ccd1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8cfc533eb34925da7ccb08443bb7691f009ee9ed","unresolved":false,"context_lines":[{"line_number":2102,"context_line":"        self._setup_rt()"},{"line_number":2103,"context_line":"        # Create an instance which is migrating with a migration id of 2"},{"line_number":2104,"context_line":"        migration_context \u003d objects.MigrationContext(migration_id\u003d2)"},{"line_number":2105,"context_line":"        instance \u003d objects.Instance(vm_state\u003dvm_states.RESIZED,"},{"line_number":2106,"context_line":"                                    task_state\u003dNone,"},{"line_number":2107,"context_line":"                                    migration_context\u003dmigration_context)"},{"line_number":2108,"context_line":"        # Create a stale migration object with id of 1"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a629dbe_1f5c6cec","line":2105,"range":{"start_line":2105,"start_character":27,"end_line":2105,"end_character":35},"updated":"2016-11-08 23:33:03.000000000","message":"nit: set uuid\u003duuids.instance?","commit_id":"63267aa57cc50da995917f3b83a11cb02649b0ad"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8cfc533eb34925da7ccb08443bb7691f009ee9ed","unresolved":false,"context_lines":[{"line_number":2106,"context_line":"                                    task_state\u003dNone,"},{"line_number":2107,"context_line":"                                    migration_context\u003dmigration_context)"},{"line_number":2108,"context_line":"        # Create a stale migration object with id of 1"},{"line_number":2109,"context_line":"        mig1 \u003d objects.Migration(source_compute\u003d_HOSTNAME,"},{"line_number":2110,"context_line":"                              source_node\u003d_NODENAME,"},{"line_number":2111,"context_line":"                              dest_compute\u003d_HOSTNAME,"},{"line_number":2112,"context_line":"                              dest_node\u003d_NODENAME,"},{"line_number":2113,"context_line":"                              instance_uuid\u003duuids.instance,"},{"line_number":2114,"context_line":"                              updated_at\u003dtimeutils.utcnow(),"},{"line_number":2115,"context_line":"                              id\u003d1,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a629dbe_1f138c0e","line":2112,"range":{"start_line":2109,"start_character":33,"end_line":2112,"end_character":49},"updated":"2016-11-08 23:33:03.000000000","message":"The source_compute/source_node and dest values here are all the same, so it doesn\u0027t really match the scenario described in the description of this test. It doesn\u0027t matter for the test because the code doesn\u0027t check these in _update_usage_from_migrations, but it\u0027s not really accurate so it might cause some confusion.","commit_id":"63267aa57cc50da995917f3b83a11cb02649b0ad"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8cfc533eb34925da7ccb08443bb7691f009ee9ed","unresolved":false,"context_lines":[{"line_number":2107,"context_line":"                                    migration_context\u003dmigration_context)"},{"line_number":2108,"context_line":"        # Create a stale migration object with id of 1"},{"line_number":2109,"context_line":"        mig1 \u003d objects.Migration(source_compute\u003d_HOSTNAME,"},{"line_number":2110,"context_line":"                              source_node\u003d_NODENAME,"},{"line_number":2111,"context_line":"                              dest_compute\u003d_HOSTNAME,"},{"line_number":2112,"context_line":"                              dest_node\u003d_NODENAME,"},{"line_number":2113,"context_line":"                              instance_uuid\u003duuids.instance,"},{"line_number":2114,"context_line":"                              updated_at\u003dtimeutils.utcnow(),"},{"line_number":2115,"context_line":"                              id\u003d1,"},{"line_number":2116,"context_line":"                              instance\u003dinstance)"},{"line_number":2117,"context_line":"        mig_list \u003d objects.MigrationList(objects\u003d[mig1])"},{"line_number":2118,"context_line":"        self.rt._update_usage_from_migrations(mock.sentinel.ctx, mig_list)"},{"line_number":2119,"context_line":"        self.assertFalse(upd_mock.called)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a629dbe_bf5e20e7","line":2116,"range":{"start_line":2110,"start_character":30,"end_line":2116,"end_character":47},"updated":"2016-11-08 23:33:03.000000000","message":"nit: alignment","commit_id":"63267aa57cc50da995917f3b83a11cb02649b0ad"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"90cee2f32cd694aa96968d117e20d134df5e0edc","unresolved":false,"context_lines":[{"line_number":2116,"context_line":"                              instance\u003dinstance)"},{"line_number":2117,"context_line":"        mig_list \u003d objects.MigrationList(objects\u003d[mig1])"},{"line_number":2118,"context_line":"        self.rt._update_usage_from_migrations(mock.sentinel.ctx, mig_list)"},{"line_number":2119,"context_line":"        self.assertFalse(upd_mock.called)"},{"line_number":2120,"context_line":""},{"line_number":2121,"context_line":""},{"line_number":2122,"context_line":"class TestUpdateUsageFromInstance(BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a629dbe_0118d783","line":2119,"updated":"2016-11-07 18:41:33.000000000","message":"++ good test, Chris.","commit_id":"63267aa57cc50da995917f3b83a11cb02649b0ad"}]}
