Bug 1363623

Summary: Cinder volumes attached to none
Product: Red Hat OpenStack Reporter: Gorka Eguileor <geguileo>
Component: python-cinderclientAssignee: Gorka Eguileor <geguileo>
Status: CLOSED ERRATA QA Contact: lkuchlan <lkuchlan>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0 (Juno)CC: aathomas, dmaley, ebarrera, egafford, eharney, geguileo, hgeaydem, jbuchta, jruzicka, nlevinki, rzaleski, scohen, sgotliv, srevivo, vaggarwa, yeylon
Target Milestone: asyncKeywords: Reopened, Triaged, ZStream
Target Release: 6.0 (Juno)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-cinderclient-1.1.1-4.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1198169 Environment:
Last Closed: 2017-01-19 13:28:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1198169    
Bug Blocks:    

Comment 2 lkuchlan 2016-12-12 08:48:06 UTC
Tested using:
openstack-cinder-2014.2.4-11.el7ost.noarch
python-cinderclient-1.1.1-4.el7ost.noarch
python-cinder-2014.2.4-11.el7ost.noarch

Verification flow:

[root@panther13 ~(keystone_admin)]# glance image-create --disk-format iso --container-format bare --name cirros --file dsl-4.4.10.iso
+------------------+--------------------------------------+
| Property         | Value                                |
+------------------+--------------------------------------+
| checksum         | 5cb7e0d4506c249b78bbe0cd4695b865     |
| container_format | bare                                 |
| created_at       | 2016-12-12T08:05:49                  |
| deleted          | False                                |
| deleted_at       | None                                 |
| disk_format      | iso                                  |
| id               | ca0e6d96-9dd3-48e7-9b89-7596fb4abefc |
| is_public        | False                                |
| min_disk         | 0                                    |
| min_ram          | 0                                    |
| name             | cirros                               |
| owner            | a9c6433306c24883a2f89e43fca9c448     |
| protected        | False                                |
| size             | 52328448                             |
| status           | active                               |
| updated_at       | 2016-12-12T08:05:49                  |
| virtual_size     | None                                 |
+------------------+--------------------------------------+

[root@panther13 ~(keystone_admin)]# glance image-list
+--------------------------------------+---------+-------------+------------------+------------+--------+
| ID                                   | Name    | Disk Format | Container Format | Size       | Status |
+--------------------------------------+---------+-------------+------------------+------------+--------+
| ca0e6d96-9dd3-48e7-9b89-7596fb4abefc | cirros  | iso         | bare             | 52328448   | active |
+--------------------------------------+---------+-------------+------------------+------------+--------+

[root@panther13 ~(keystone_admin)]# nova boot --image ca0e6d96-9dd3-48e7-9b89-7596fb4abefc --flavor 1 --nic net-id=3325c72f-a537-4a3f-8952-60bd38ef00e6 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-00000004                             |
| 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                            | QBmK3UfPNAMZ                                  |
| config_drive                         |                                               |
| created                              | 2016-12-12T08:07:33Z                          |
| flavor                               | m1.tiny (1)                                   |
| hostId                               |                                               |
| id                                   | ff64ad78-217c-4b9a-ba90-6f2bf6fea400          |
| image                                | cirros (ca0e6d96-9dd3-48e7-9b89-7596fb4abefc) |
| key_name                             | -                                             |
| metadata                             | {}                                            |
| name                                 | vm                                            |
| os-extended-volumes:volumes_attached | []                                            |
| progress                             | 0                                             |
| security_groups                      | default                                       |
| status                               | BUILD                                         |
| tenant_id                            | a9c6433306c24883a2f89e43fca9c448              |
| updated                              | 2016-12-12T08:07:33Z                          |
| user_id                              | 7db381d6683340b996aec64672330458              |
+--------------------------------------+-----------------------------------------------+

[root@panther13 ~(keystone_admin)]# nova list
+--------------------------------------+-------+---------+------------+-------------+---------------------+
| ID                                   | Name  | Status  | Task State | Power State | Networks            |
+--------------------------------------+-------+---------+------------+-------------+---------------------+
| ff64ad78-217c-4b9a-ba90-6f2bf6fea400 | vm    | ACTIVE  | -          | Running     | private=10.0.0.3    |
+--------------------------------------+-------+---------+------------+-------------+---------------------+

[root@panther13 ~(keystone_admin)]# cinder create 1
+---------------------+--------------------------------------+
|       Property      |                Value                 |
+---------------------+--------------------------------------+
|     attachments     |                  []                  |
|  availability_zone  |                 nova                 |
|       bootable      |                false                 |
|      created_at     |      2016-12-12T08:07:58.267074      |
| display_description |                 None                 |
|     display_name    |                 None                 |
|      encrypted      |                False                 |
|          id         | 02ff9e50-e32c-4f63-9dcc-e440d8a0b87e |
|       metadata      |                  {}                  |
|         size        |                  1                   |
|     snapshot_id     |                 None                 |
|     source_volid    |                 None                 |
|        status       |               creating               |
|     volume_type     |                 None                 |
+---------------------+--------------------------------------+

[root@panther13 ~(keystone_admin)]# cinder list
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
|                  ID                  |   Status  | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
| 02ff9e50-e32c-4f63-9dcc-e440d8a0b87e | available |     None     |  1   |     None    |  false   |             |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+

[root@panther13 ~(keystone_admin)]# nova list
+--------------------------------------+-------+---------+------------+-------------+---------------------+
| ID                                   | Name  | Status  | Task State | Power State | Networks            |
+--------------------------------------+-------+---------+------------+-------------+---------------------+
| ff64ad78-217c-4b9a-ba90-6f2bf6fea400 | vm    | SHUTOFF | -          | Shutdown    | private=10.0.0.3    |
+--------------------------------------+-------+---------+------------+-------------+---------------------+

[root@panther13 ~(keystone_admin)]# nova volume-attach ff64ad78-217c-4b9a-ba90-6f2bf6fea400 02ff9e50-e32c-4f63-9dcc-e440d8a0b87e /dev/vdb
+----------+--------------------------------------+
| Property | Value                                |
+----------+--------------------------------------+
| device   | /dev/hdb                             |
| id       | 02ff9e50-e32c-4f63-9dcc-e440d8a0b87e |
| serverId | ff64ad78-217c-4b9a-ba90-6f2bf6fea400 |
| volumeId | 02ff9e50-e32c-4f63-9dcc-e440d8a0b87e |
+----------+--------------------------------------+

[root@panther13 ~(keystone_admin)]# cinder list
+--------------------------------------+--------+--------------+------+-------------+----------+--------------------------------------+
|                  ID                  | Status | Display Name | Size | Volume Type | Bootable |             Attached to              |
+--------------------------------------+--------+--------------+------+-------------+----------+--------------------------------------+
| 02ff9e50-e32c-4f63-9dcc-e440d8a0b87e | in-use |     None     |  1   |     None    |  false   | ff64ad78-217c-4b9a-ba90-6f2bf6fea400 |
+--------------------------------------+--------+--------------+------+-------------+----------+--------------------------------------+

[root@panther13 ~(keystone_admin)]# nova list
+--------------------------------------+-------+---------+------------+-------------+---------------------+
| ID                                   | Name  | Status  | Task State | Power State | Networks            |
+--------------------------------------+-------+---------+------------+-------------+---------------------+
| ff64ad78-217c-4b9a-ba90-6f2bf6fea400 | vm    | ACTIVE  | -          | Running     | private=10.0.0.3    |
+--------------------------------------+-------+---------+------------+-------------+---------------------+

[root@panther13 ~(keystone_admin)]# nova volume-detach ff64ad78-217c-4b9a-ba90-6f2bf6fea400 02ff9e50-e32c-4f63-9dcc-e440d8a0b87e

[root@panther13 ~(keystone_admin)]# nova delete ff64ad78-217c-4b9a-ba90-6f2bf6fea400
Request to delete server ff64ad78-217c-4b9a-ba90-6f2bf6fea400 has been accepted.

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

[root@panther13 ~(keystone_admin)]# cinder list
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
|                  ID                  |   Status  | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
| 02ff9e50-e32c-4f63-9dcc-e440d8a0b87e | available |     None     |  1   |     None    |  false   |             |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+

Comment 4 errata-xmlrpc 2017-01-19 13:28:58 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-0155.html