resource_tracker keeps complaining instance not found for deleted instances
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Confirmed
|
Low
|
Eli Qiao |
Bug Description
Some instances met error during resize or live-migration, then resource_tracker keeps complaining instance not found even after they got deleted.
===== n-cpu.log =====
647686:2015-09-01 07:26:27.172 DEBUG nova.compute.
647712:2015-09-01 07:26:27.224 DEBUG nova.compute.
647738:2015-09-01 07:26:27.277 DEBUG nova.compute.
====== db ========
ubuntu@
+----+-
| ID | Name | Status | Task State | Power State | Networks |
+----+-
+----+-
mysql> select created_
+------
| created_at | deleted_at | uuid |
+------
| 2015-08-28 06:03:36 | 2015-08-31 06:51:18 | 57ec3d85-
| 2015-08-28 06:04:30 | 2015-08-31 06:51:12 | 0a130eb8-
| 2015-08-28 06:10:56 | 2015-08-28 06:11:14 | 8217c85d-
| 2015-08-28 06:12:26 | 2015-08-28 06:12:36 | 347218bb-
| 2015-08-28 06:12:54 | 2015-08-28 06:13:09 | 8815d09a-
| 2015-08-28 06:13:27 | 2015-08-28 06:13:39 | 50c40182-
| 2015-08-31 06:54:58 | 2015-09-01 07:10:50 | 7a54fd3b-
| 2015-08-31 07:45:16 | 2015-09-01 07:10:40 | 0b141529-
| 2015-09-01 07:12:40 | 2015-09-01 07:14:33 | 99363eb8-
+------
9 rows in set (0.00 sec)
mysql> select created_
+------
| created_at | deleted_at | status | migration_type | instance_uuid |
+------
| 2015-08-28 08:31:10 | NULL | error | live-migration | 0a130eb8-
| 2015-08-31 05:58:49 | NULL | confirmed | resize | 0a130eb8-
| 2015-08-31 06:36:06 | NULL | error | resize | 0a130eb8-
| 2015-08-31 06:40:56 | NULL | migrating | resize | 0a130eb8-
| 2015-08-31 06:49:08 | NULL | migrating | resize | 57ec3d85-
| 2015-08-31 06:56:56 | NULL | migrating | resize | 7a54fd3b-
| 2015-08-31 07:07:07 | NULL | confirmed | resize | 7a54fd3b-
| 2015-08-31 07:47:30 | NULL | confirmed | resize | 0b141529-
| 2015-08-31 07:50:14 | NULL | error | live-migration | 0b141529-
| 2015-08-31 07:52:36 | NULL | completed | live-migration | 0b141529-
| 2015-09-01 07:14:21 | NULL | error | resize | 99363eb8-
+------
11 rows in set (0.00 sec)
tags: |
added: live-migration removed: live-migrate |
hi zhenzhan,
I looked at the code of resource_tracker, actually this is a periodic task.
it will query all migration object (status not in [confirmed', 'reverted', 'error']) from nova database and update their status.
in this case, I think that you started the migration (nova-compute update the migration object status to migrating), but you delete
that instance when it's state is 'migrating', so nova-compute don't have change to update migration object to error status.
my idea is that when doing deleting, we should also consider the migration status, update it to a proper status.
Eli.