ec2 instance IDs are broken after folsom upgrade
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Critical
|
Adam Gandelman | ||
Folsom |
Fix Released
|
Critical
|
Adam Gandelman | ||
nova (Ubuntu) |
Fix Released
|
High
|
Unassigned |
Bug Description
After upgrading a running cluster from Essex to Folsom (2012.2-
ubuntu@
RESERVATION r-90qer9xs 7b58c0e219a948e
INSTANCE i-00000006 ami-00000001 192.168.25.4 192.168.25.4 running adam (7b58c0e219a948
RESERVATION r-k190bhzm 7b58c0e219a948e
INSTANCE i-00000004 ami-00000001 192.168.25.5 192.168.25.5 running adam (7b58c0e219a948
ubuntu@
InstanceNotFound: Instance i-00000004 could not be found.
A quick test of other calls shows that this affects many actions:
euca-get-
euca-terminate-
euca-attach-volumes
euca-associate-
Should note that describing individual instances still works (ie, euca-describe-
This seems to not affect clusters that have been initially installed with Folsom. I suspect something is wrong in the data migration from Essex to Folsom that causes the ec2_id_to_id() mapping to be bogus.
tags: | added: openstack-ubuntu-upgrade |
Changed in nova (Ubuntu): | |
importance: | Undecided → High |
tags: | added: ec2 |
Changed in nova: | |
importance: | Undecided → Critical |
Changed in nova (Ubuntu): | |
assignee: | nobody → sushanta mishra (sushanta099) |
assignee: | sushanta mishra (sushanta099) → nobody |
Changed in nova: | |
milestone: | none → grizzly-1 |
status: | Fix Committed → Fix Released |
tags: | removed: in-stable-folsom |
Changed in nova: | |
milestone: | grizzly-1 → 2013.1 |
After taking another look at this, EC2 instance IDs appear to change during an upgrade.
Did an upgrade with two running instances, i-00000003 and i-00000004. After upgrade, they show change to i-00000003 and i-00000004, respecively. Any EC2 action (terminate, get-console-output, etc) on these new IDs fail with InstanceNotFound.
AFAICS:
In essex, these IDs appear mapped to IDs and UUIDs in the instances table:
mysql> select id, uuid from instances where id=3 or id=4; ------- ------- ------- ------- ------- --+ ------- ------- ------- ------- ------- --+ 46f3-4a2d- a0fb-f7657d60e8 a8 | 0814-4b5e- b5f1-4a7cecd8a4 3f | ------- ------- ------- ------- ------- --+
+----+-
| id | uuid |
+----+-
| 3 | 7ca30bdc-
| 4 | bf7ecf97-
+----+-
2 rows in set (0.00 sec)
In Folsom, much has been converted to use UUIDs instead. the EC2 describe instances call gets a list of instances, and queries the instance_ id_mappings for the corresponding instance ID (which will later get converted to an ec2 ID). However, after upgrade this table has duplicate entries for these instances, causing later queries on these instances to yield a new, incorrect ID.
mysql> select * from instance_ id_mappings where uuid='bf7ecf97- 0814-4b5e- b5f1-4a7cecd8a4 3f' or uuid='7ca30bdc- 46f3-4a2d- a0fb-f7657d60e8 a8'; ------- ------- -+----- ------- +------ ------+ ------- --+---- +------ ------- ------- ------- ------- ----+ ------- ------- -+----- ------- +------ ------+ ------- --+---- +------ ------- ------- ------- ------- ----+ 46f3-4a2d- a0fb-f7657d60e8 a8 | 0814-4b5e- b5f1-4a7cecd8a4 3f | 46f3-4a2d- a0fb-f7657d60e8 a8 | 0814-4b5e- b5f1-4a7cecd8a4 3f | ------- ------- -+----- ------- +------ ------+ ------- --+---- +------ ------- ------- ------- ------- ----+
+------
| created_at | updated_at | deleted_at | deleted | id | uuid |
+------
| NULL | NULL | NULL | NULL | 3 | 7ca30bdc-
| NULL | NULL | NULL | NULL | 4 | bf7ecf97-
| 2012-10-04 01:50:23 | NULL | NULL | 0 | 5 | 7ca30bdc-
| 2012-10-04 01:50:23 | NULL | NULL | 0 | 6 | bf7ecf97-
+------
This can be worked around by change the EC2 layer to convert all incoming IDs to UUIDs, but the issue of instance IDs changing during a migration to Folsom is critical and needs to be resolved as an upgrade issue.