yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #30496
[Bug 1436693] [NEW] Unable to delete incomplete instance
Public bug reported:
When instance creation is finished incompletely by any reason, nova can't delete its instance.
When an instance has no related record in instance_info_caches, "nova delete" bring error state.
The case we found:
1) Create instance.
$ nova boot --flavor 2 --image 17f667e4-b932-4a6c-a01c-478b69c0f8bd test1
2) Some error occurred (maybe caused by network problem).
$ nova list
+--------------------------------------+-------+--------+------------+-------------+----------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+-------+--------+------------+-------------+----------+
| 2f677075-9d9c-4e1b-b483-74d79b31af26 | test1 | ERROR | | NOSTATE | |
+--------------------------------------+-------+--------+------------+-------------+----------+
3) Try deleting the instance, but it is failed.
$ nova delete 2f677075-9d9c-4e1b-b483-74d79b31af26
Request to delete server 2f677075-9d9c-4e1b-b483-74d79b31af26 has been accepted.
$ nova list
+--------------------------------------+-------+--------+------------+-------------+----------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+-------+--------+------------+-------------+----------+
| 2f677075-9d9c-4e1b-b483-74d79b31af26 | test1 | ERROR | - | NOSTATE | |
+--------------------------------------+-------+--------+------------+-------------+----------+
$ nova show 2f677075-9d9c-4e1b-b483-74d79b31af26
+--------------------------------------+------------------------------------------------------------------------------------------------------------+
| Property | Value |
+--------------------------------------+------------------------------------------------------------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | nova |
| OS-EXT-STS:power_state | 0 |
| OS-EXT-STS:task_state | - |
| OS-EXT-STS:vm_state | error |
| OS-SRV-USG:launched_at | 2015-03-23T08:51:44.000000 |
| OS-SRV-USG:terminated_at | - |
| accessIPv4 | |
| accessIPv6 | |
| config_drive | True |
| created | 2015-03-23T08:51:14Z |
| fault | {"message": "'NoneType' object has no attribute 'delete'", "code": 500, "created": "2015-03-23T08:58:23Z"} |
| flavor | m1.small (2) |
| hostId | 1c3addc04df95d1f561280fe73da48c9f6c26526cc7d5cffc5cb6df0 |
| id | 2f677075-9d9c-4e1b-b483-74d79b31af26 |
| image | cirros-0.3.2-x86_64-uec (17f667e4-b932-4a6c-a01c-478b69c0f8bd) |
| key_name | - |
| metadata | {} |
| name | test1 |
| os-extended-volumes:volumes_attached | [] |
| status | ERROR |
| tenant_id | 81ca9fe36f6443a1b329e1603189b975 |
| updated | 2015-03-23T08:58:23Z |
| user_id | 4aba7708df89454b8d4828260507f9ac |
+--------------------------------------+------------------------------------------------------------------------------------------------------------+
4) Try force-deleting the instance, also it is failed.
$ nova force-delete 2f677075-9d9c-4e1b-b483-74d79b31af26
$ nova list
+--------------------------------------+-------+--------+------------+-------------+----------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+-------+--------+------------+-------------+----------+
| 2f677075-9d9c-4e1b-b483-74d79b31af26 | test1 | ERROR | - | NOSTATE | |
+--------------------------------------+-------+--------+------------+-------------+----------+
$ nova show 2f677075-9d9c-4e1b-b483-74d79b31af26
+--------------------------------------+------------------------------------------------------------------------------------------------------------+
| Property | Value |
+--------------------------------------+------------------------------------------------------------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | nova |
| OS-EXT-STS:power_state | 0 |
| OS-EXT-STS:task_state | - |
| OS-EXT-STS:vm_state | error |
| OS-SRV-USG:launched_at | 2015-03-23T08:51:44.000000 |
| OS-SRV-USG:terminated_at | - |
| accessIPv4 | |
| accessIPv6 | |
| config_drive | True |
| created | 2015-03-23T08:51:14Z |
| fault | {"message": "'NoneType' object has no attribute 'delete'", "code": 500, "created": "2015-03-23T08:59:02Z"} |
| flavor | m1.small (2) |
| hostId | 1c3addc04df95d1f561280fe73da48c9f6c26526cc7d5cffc5cb6df0 |
| id | 2f677075-9d9c-4e1b-b483-74d79b31af26 |
| image | cirros-0.3.2-x86_64-uec (17f667e4-b932-4a6c-a01c-478b69c0f8bd) |
| key_name | - |
| metadata | {} |
| name | test1 |
| os-extended-volumes:volumes_attached | [] |
| status | ERROR |
| tenant_id | 81ca9fe36f6443a1b329e1603189b975 |
| updated | 2015-03-23T08:59:02Z |
| user_id | 4aba7708df89454b8d4828260507f9ac |
+--------------------------------------+------------------------------------------------------------------------------------------------------------+
5) Checking databases, then info cache for the instance could not be found.
mysql> select * from nova.instance_info_caches
where instance_uuid = '2f677075-9d9c-4e1b-b483-74d79b31af26';
Empty set (0.00 sec)
When the instance has no related record in instance_info_caches, an error has occurred ('NoneType' object has no attribute).
As a result, nova can't delete the instance.
The root cause should be addressed radically (caused by the environment?), but any incomplete instance should be deletable by Nova.
** Affects: nova
Importance: Undecided
Assignee: Takenori Yoshimatsu (yoshimatsu)
Status: In Progress
** Changed in: nova
Assignee: (unassigned) => Takenori Yoshimatsu (yoshimatsu)
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1436693
Title:
Unable to delete incomplete instance
Status in OpenStack Compute (Nova):
In Progress
Bug description:
When instance creation is finished incompletely by any reason, nova can't delete its instance.
When an instance has no related record in instance_info_caches, "nova delete" bring error state.
The case we found:
1) Create instance.
$ nova boot --flavor 2 --image 17f667e4-b932-4a6c-a01c-478b69c0f8bd test1
2) Some error occurred (maybe caused by network problem).
$ nova list
+--------------------------------------+-------+--------+------------+-------------+----------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+-------+--------+------------+-------------+----------+
| 2f677075-9d9c-4e1b-b483-74d79b31af26 | test1 | ERROR | | NOSTATE | |
+--------------------------------------+-------+--------+------------+-------------+----------+
3) Try deleting the instance, but it is failed.
$ nova delete 2f677075-9d9c-4e1b-b483-74d79b31af26
Request to delete server 2f677075-9d9c-4e1b-b483-74d79b31af26 has been accepted.
$ nova list
+--------------------------------------+-------+--------+------------+-------------+----------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+-------+--------+------------+-------------+----------+
| 2f677075-9d9c-4e1b-b483-74d79b31af26 | test1 | ERROR | - | NOSTATE | |
+--------------------------------------+-------+--------+------------+-------------+----------+
$ nova show 2f677075-9d9c-4e1b-b483-74d79b31af26
+--------------------------------------+------------------------------------------------------------------------------------------------------------+
| Property | Value |
+--------------------------------------+------------------------------------------------------------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | nova |
| OS-EXT-STS:power_state | 0 |
| OS-EXT-STS:task_state | - |
| OS-EXT-STS:vm_state | error |
| OS-SRV-USG:launched_at | 2015-03-23T08:51:44.000000 |
| OS-SRV-USG:terminated_at | - |
| accessIPv4 | |
| accessIPv6 | |
| config_drive | True |
| created | 2015-03-23T08:51:14Z |
| fault | {"message": "'NoneType' object has no attribute 'delete'", "code": 500, "created": "2015-03-23T08:58:23Z"} |
| flavor | m1.small (2) |
| hostId | 1c3addc04df95d1f561280fe73da48c9f6c26526cc7d5cffc5cb6df0 |
| id | 2f677075-9d9c-4e1b-b483-74d79b31af26 |
| image | cirros-0.3.2-x86_64-uec (17f667e4-b932-4a6c-a01c-478b69c0f8bd) |
| key_name | - |
| metadata | {} |
| name | test1 |
| os-extended-volumes:volumes_attached | [] |
| status | ERROR |
| tenant_id | 81ca9fe36f6443a1b329e1603189b975 |
| updated | 2015-03-23T08:58:23Z |
| user_id | 4aba7708df89454b8d4828260507f9ac |
+--------------------------------------+------------------------------------------------------------------------------------------------------------+
4) Try force-deleting the instance, also it is failed.
$ nova force-delete 2f677075-9d9c-4e1b-b483-74d79b31af26
$ nova list
+--------------------------------------+-------+--------+------------+-------------+----------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+-------+--------+------------+-------------+----------+
| 2f677075-9d9c-4e1b-b483-74d79b31af26 | test1 | ERROR | - | NOSTATE | |
+--------------------------------------+-------+--------+------------+-------------+----------+
$ nova show 2f677075-9d9c-4e1b-b483-74d79b31af26
+--------------------------------------+------------------------------------------------------------------------------------------------------------+
| Property | Value |
+--------------------------------------+------------------------------------------------------------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | nova |
| OS-EXT-STS:power_state | 0 |
| OS-EXT-STS:task_state | - |
| OS-EXT-STS:vm_state | error |
| OS-SRV-USG:launched_at | 2015-03-23T08:51:44.000000 |
| OS-SRV-USG:terminated_at | - |
| accessIPv4 | |
| accessIPv6 | |
| config_drive | True |
| created | 2015-03-23T08:51:14Z |
| fault | {"message": "'NoneType' object has no attribute 'delete'", "code": 500, "created": "2015-03-23T08:59:02Z"} |
| flavor | m1.small (2) |
| hostId | 1c3addc04df95d1f561280fe73da48c9f6c26526cc7d5cffc5cb6df0 |
| id | 2f677075-9d9c-4e1b-b483-74d79b31af26 |
| image | cirros-0.3.2-x86_64-uec (17f667e4-b932-4a6c-a01c-478b69c0f8bd) |
| key_name | - |
| metadata | {} |
| name | test1 |
| os-extended-volumes:volumes_attached | [] |
| status | ERROR |
| tenant_id | 81ca9fe36f6443a1b329e1603189b975 |
| updated | 2015-03-23T08:59:02Z |
| user_id | 4aba7708df89454b8d4828260507f9ac |
+--------------------------------------+------------------------------------------------------------------------------------------------------------+
5) Checking databases, then info cache for the instance could not be found.
mysql> select * from nova.instance_info_caches
where instance_uuid = '2f677075-9d9c-4e1b-b483-74d79b31af26';
Empty set (0.00 sec)
When the instance has no related record in instance_info_caches, an error has occurred ('NoneType' object has no attribute).
As a result, nova can't delete the instance.
The root cause should be addressed radically (caused by the environment?), but any incomplete instance should be deletable by Nova.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1436693/+subscriptions
Follow ups
References