Bug 1363625 - Instance was deleted successfully without detaching its volume, if nova-compute was killed during running "nova delete"
Summary: Instance was deleted successfully without detaching its volume, if nova-compu...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-cinderclient
Version: 7.0 (Kilo)
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: async
: 7.0 (Kilo)
Assignee: Eric Harney
QA Contact: lkuchlan
URL:
Whiteboard:
Depends On: 1316791
Blocks: 1362682
TreeView+ depends on / blocked
 
Reported: 2016-08-03 08:59 UTC by Gorka Eguileor
Modified: 2020-03-11 15:11 UTC (History)
25 users (show)

Fixed In Version: python-cinderclient-1.2.1-4.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1316791
Environment:
Last Closed: 2017-01-19 13:25:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0160 0 normal SHIPPED_LIVE python-cinderclient bug fix advisory 2017-01-19 18:18:48 UTC

Comment 4 lkuchlan 2016-12-08 07:05:20 UTC
Tested using:
python-cinderclient-1.2.1-4.el7ost.noarch
openstack-cinder-2015.1.3-11.el7ost.noarch
python-cinder-2015.1.3-11.el7ost.noarch

Verification flow:

[root@dhcp70-45 ~(keystone_admin)]# cinder create 1 --image-id 34453f2c-3845-4963-91b3-e442589a4528
+---------------------+--------------------------------------+
|       Property      |                Value                 |
+---------------------+--------------------------------------+
|     attachments     |                  []                  |
|  availability_zone  |                 nova                 |
|       bootable      |                false                 |
|      created_at     |      2016-12-07T08:57:39.927578      |
| display_description |                 None                 |
|     display_name    |                 None                 |
|      encrypted      |                False                 |
|          id         | 19df71bf-0426-49e6-8a11-2d57edcf24a0 |
|       image_id      | 34453f2c-3845-4963-91b3-e442589a4528 |
|       metadata      |                  {}                  |
|     multiattach     |                false                 |
|         size        |                  1                   |
|     snapshot_id     |                 None                 |
|     source_volid    |                 None                 |                                                                                                                                                     
|        status       |               creating               |                                                                                                                                                     
|     volume_type     |                 None                 |                                                                                                                                                     
+---------------------+--------------------------------------+   
                                                                                                                                                  
[root@dhcp70-45 ~(keystone_admin)]# cinder list                                                                                                                                                                    
+--------------------------------------+-------------+--------------+------+-------------+----------+-------------+                                                                                                
|                  ID                  |    Status   | Display Name | Size | Volume Type | Bootable | Attached to |                                                                                                
+--------------------------------------+-------------+--------------+------+-------------+----------+-------------+                                                                                                
| 19df71bf-0426-49e6-8a11-2d57edcf24a0 | downloading |      -       |  1   |      -      |  false   |             |                                                                                                
+--------------------------------------+-------------+--------------+------+-------------+----------+-------------+ 
                                                                                               
[root@dhcp70-45 ~(keystone_admin)]# cinder list                                                                                                                                                                    
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+                                                                                                  
|                  ID                  |   Status  | Display Name | Size | Volume Type | Bootable | Attached to |                                                                                                  
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+                                                                                                  
| 19df71bf-0426-49e6-8a11-2d57edcf24a0 | available |      -       |  1   |      -      |   true   |             |                                                                                                  
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+     

[root@dhcp70-45 ~(keystone_admin)]# nova boot --flavor 1 --boot-volume 19df71bf-0426-49e6-8a11-2d57edcf24a0 --nic net-id=6c000e50-030b-4e46-ab39-625d2150e063 vm
+--------------------------------------+--------------------------------------------------+
| Property                             | Value                                            |
+--------------------------------------+--------------------------------------------------+
| OS-DCF:diskConfig                    | MANUAL                                           |
| OS-EXT-AZ:availability_zone          |                                                  |
| OS-EXT-SRV-ATTR:host                 | -                                                |
| OS-EXT-SRV-ATTR:hypervisor_hostname  | -                                                |
| OS-EXT-SRV-ATTR:instance_name        | instance-00000001                                |
| OS-EXT-STS:power_state               | 0                                                |
| OS-EXT-STS:task_state                | scheduling                                       |
| OS-EXT-STS:vm_state                  | building                                         |
| OS-SRV-USG:launched_at               | -                                                |
| OS-SRV-USG:terminated_at             | -                                                |
| accessIPv4                           |                                                  |
| accessIPv6                           |                                                  |
| adminPass                            | Z56TqCCyKrfX                                     |
| config_drive                         |                                                  |
| created                              | 2016-12-07T09:06:05Z                             |
| flavor                               | m1.tiny (1)                                      |
| hostId                               |                                                  |
| id                                   | aaa0683d-97af-4b92-abeb-5d05e45dea33             |
| image                                | Attempt to boot from volume - no image supplied  |
| key_name                             | -                                                |
| metadata                             | {}                                               |
| name                                 | vm                                               |
| os-extended-volumes:volumes_attached | [{"id": "19df71bf-0426-49e6-8a11-2d57edcf24a0"}] |
| progress                             | 0                                                |
| security_groups                      | default                                          |
| status                               | BUILD                                            |
| tenant_id                            | e6214874b0b94356a196e505ab0ebaf8                 |
| updated                              | 2016-12-07T09:06:14Z                             |
| user_id                              | 84a2a411b7b842eeb9ecdefc3eeb3e8f                 |
+--------------------------------------+--------------------------------------------------+

[root@dhcp70-45 ~(keystone_admin)]# nova list
+--------------------------------------+------+--------+------------+-------------+------------------+
| ID                                   | Name | Status | Task State | Power State | Networks         |
+--------------------------------------+------+--------+------------+-------------+------------------+
| aaa0683d-97af-4b92-abeb-5d05e45dea33 | vm   | ACTIVE | -          | Running     | private=10.0.0.3 |
+--------------------------------------+------+--------+------------+-------------+------------------+

[root@dhcp70-45 ~(keystone_admin)]# cinder list
+--------------------------------------+--------+--------------+------+-------------+----------+--------------------------------------+
|                  ID                  | Status | Display Name | Size | Volume Type | Bootable |             Attached to              |
+--------------------------------------+--------+--------------+------+-------------+----------+--------------------------------------+
| 19df71bf-0426-49e6-8a11-2d57edcf24a0 | in-use |      -       |  1   |      -      |   true   | aaa0683d-97af-4b92-abeb-5d05e45dea33 |
+--------------------------------------+--------+--------------+------+-------------+----------+--------------------------------------+

[root@dhcp70-45 ~(keystone_admin)]# openstack-service stop nova-compute
[root@dhcp70-45 ~(keystone_admin)]# openstack-service status nova-compute
MainPID=0 Id=openstack-nova-compute.service ActiveState=inactive

[root@dhcp70-45 ~(keystone_admin)]# nova delete aaa0683d-97af-4b92-abeb-5d05e45dea33
Request to delete server aaa0683d-97af-4b92-abeb-5d05e45dea33 has been accepted.
[root@dhcp70-45 ~(keystone_admin)]# nova list
+--------------------------------------+------+--------+------------+-------------+------------------+
| ID                                   | Name | Status | Task State | Power State | Networks         |
+--------------------------------------+------+--------+------------+-------------+------------------+
| aaa0683d-97af-4b92-abeb-5d05e45dea33 | vm   | ACTIVE | deleting   | Running     | private=10.0.0.3 |
+--------------------------------------+------+--------+------------+-------------+------------------+

[root@dhcp70-45 ~(keystone_admin)]# openstack-service start nova-compute
[root@dhcp70-45 ~(keystone_admin)]# openstack-service status nova-compute
MainPID=7027 Id=openstack-nova-compute.service ActiveState=active

[root@dhcp70-45 ~(keystone_admin)]# nova list
+----+------+--------+------------+-------------+----------+
| ID | Name | Status | Task State | Power State | Networks |
+----+------+--------+------------+-------------+----------+
+----+------+--------+------------+-------------+----------+

[root@dhcp70-45 ~(keystone_admin)]# cinder list
+--------------------------------------+--------+--------------+------+-------------+----------+--------------------------------------+
|                  ID                  | Status | Display Name | Size | Volume Type | Bootable |             Attached to              |
+--------------------------------------+--------+--------------+------+-------------+----------+--------------------------------------+
| 19df71bf-0426-49e6-8a11-2d57edcf24a0 | in-use |      -       |  1   |      -      |   true   | aaa0683d-97af-4b92-abeb-5d05e45dea33 |
+--------------------------------------+--------+--------------+------+-------------+----------+--------------------------------------+

[root@dhcp70-45 ~(keystone_admin)]# cinder --os-volume-api-version 2 reset-state --state available --attach-status detached 19df71bf-0426-49e6-8a11-2d57edcf24a0

[root@dhcp70-45 ~(keystone_admin)]# cinder list
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
|                  ID                  |   Status  | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
| 19df71bf-0426-49e6-8a11-2d57edcf24a0 | available |      -       |  1   |      -      |   true   |             |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+

[root@dhcp70-45 ~(keystone_admin)]# nova boot --flavor 1 --boot-volume 19df71bf-0426-49e6-8a11-2d57edcf24a0 --nic net-id=6c000e50-030b-4e46-ab39-625d2150e063 vm
+--------------------------------------+--------------------------------------------------+
| Property                             | Value                                            |
+--------------------------------------+--------------------------------------------------+
| OS-DCF:diskConfig                    | MANUAL                                           |
| OS-EXT-AZ:availability_zone          |                                                  |
| OS-EXT-SRV-ATTR:host                 | -                                                |
| OS-EXT-SRV-ATTR:hypervisor_hostname  | -                                                |
| OS-EXT-SRV-ATTR:instance_name        | instance-00000002                                |
| OS-EXT-STS:power_state               | 0                                                |
| OS-EXT-STS:task_state                | scheduling                                       |
| OS-EXT-STS:vm_state                  | building                                         |
| OS-SRV-USG:launched_at               | -                                                |
| OS-SRV-USG:terminated_at             | -                                                |
| accessIPv4                           |                                                  |
| accessIPv6                           |                                                  |
| adminPass                            | z7RRh5UMQkxe                                     |
| config_drive                         |                                                  |
| created                              | 2016-12-07T09:21:16Z                             |
| flavor                               | m1.tiny (1)                                      |
| hostId                               |                                                  |
| id                                   | 909a9e8a-7453-42d4-81bb-cf9d6c629532             |
| image                                | Attempt to boot from volume - no image supplied  |
| key_name                             | -                                                |
| metadata                             | {}                                               |
| name                                 | vm                                               |
| os-extended-volumes:volumes_attached | [{"id": "19df71bf-0426-49e6-8a11-2d57edcf24a0"}] |
| progress                             | 0                                                |
| security_groups                      | default                                          |
| status                               | BUILD                                            |
| tenant_id                            | e6214874b0b94356a196e505ab0ebaf8                 |
| updated                              | 2016-12-07T09:21:25Z                             |
| user_id                              | 84a2a411b7b842eeb9ecdefc3eeb3e8f                 |
+--------------------------------------+--------------------------------------------------+

[root@dhcp70-45 ~(keystone_admin)]# nova list
+--------------------------------------+------+--------+------------+-------------+------------------+
| ID                                   | Name | Status | Task State | Power State | Networks         |
+--------------------------------------+------+--------+------------+-------------+------------------+
| 909a9e8a-7453-42d4-81bb-cf9d6c629532 | vm   | ACTIVE | -          | Running     | private=10.0.0.4 |
+--------------------------------------+------+--------+------------+-------------+------------------+

[root@dhcp70-45 ~(keystone_admin)]# cinder list
+--------------------------------------+--------+--------------+------+-------------+----------+--------------------------------------+
|                  ID                  | Status | Display Name | Size | Volume Type | Bootable |             Attached to              |
+--------------------------------------+--------+--------------+------+-------------+----------+--------------------------------------+
| 19df71bf-0426-49e6-8a11-2d57edcf24a0 | in-use |      -       |  1   |      -      |   true   | 909a9e8a-7453-42d4-81bb-cf9d6c629532 |
+--------------------------------------+--------+--------------+------+-------------+----------+--------------------------------------+

Comment 6 errata-xmlrpc 2017-01-19 13:25:08 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2017-0160.html


Note You need to log in before you can comment on or make changes to this bug.