volume list does not show attached servers

Bug #1404931 reported by Tim Bell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
Fix Released
Undecided
Steve Martinelli

Bug Description

We are gradually moving all of CERN users to the openstack unified cli.

One item was the volume list not showing the servers the volume was attached to. We're running icehouse. the volumes are shown as in-use but no server attached. I could not find a previously reported bug but feel free to close if it is a known problem.

$ openstack volume list
+--------------------------------------+--------------+-----------+------+----------+
| ID | Display Name | Status | Size | Attached |
+--------------------------------------+--------------+-----------+------+----------+
| 4e2b46e4-1f39-41f7-b1ff-fe4e789e4210 | tvol143 | in-use | 10 | |
| d8d8be88-f1a4-4120-b1c2-50621a981c74 | timvol143 | in-use | 10 | |
| 8e9fa4ec-14ab-49ad-bcbd-bd8d2733dd57 | newv | available | 10 | |
| 80b725ee-7543-4708-8171-bac2cfb75fd9 | None | available | 10 | |
+--------------------------------------+--------------+-----------+------+----------+

The server show however has the volume.

$ openstack server show timhwag144
+--------------------------------------+----------------------------------------------------------+
| Field | Value |
+--------------------------------------+----------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | cern-geneva-a |
| OS-EXT-STS:power_state | 1 |
| OS-EXT-STS:task_state | None |
| OS-EXT-STS:vm_state | active |
| OS-SRV-USG:launched_at | 2014-12-21T16:33:08.000000 |
| OS-SRV-USG:terminated_at | None |
| accessIPv4 | |
| accessIPv6 | |
| addresses | CERN_NETWORK=128.142.145.213, 2001:1458:301:1e::100:c7 |
| config_drive | |
| created | 2014-12-21T16:21:20Z |
| flavor | m1.small (2) |
| hostId | 6c54833ea492db03037e65afb50b53c9a8fa11be1fb9511fc2fc8f41 |
| id | 4a9eb25f-168d-454b-a55e-48e0a2771a3e |
| image | TimCC7 (b7463c70-3879-485a-addd-3c650e260050) |
| key_name | lxplus |
| name | timhwag144 |
| os-extended-volumes:volumes_attached | [{u'id': u'4e2b46e4-1f39-41f7-b1ff-fe4e789e4210'}] |
| progress | 0 |
| properties | |
| security_groups | [{u'name': u'default'}] |
| status | ACTIVE |
| tenant_id | 841615a3-ece9-4622-9fa0-fdc178ed34f8 |
| updated | 2014-12-22T09:33:55Z |
| user_id | timbell |
+--------------------------------------+----------------------------------------------------------+

Revision history for this message
Steve Martinelli (stevemar) wrote :

Got something going on over here: https://review.openstack.org/#/c/143513/

It'll produce output similar to that of horizon:

steve:python-openstackclient$ openstack volume list
+--------------------------------------+--------------+-----------+------+------------------------------+
| ID | Display Name | Status | Size | Attached to |
+--------------------------------------+--------------+-----------+------+------------------------------+
| 5554d8d6-242a-47d7-893e-8c5a8553f31e | v2 | available | 1 | |
| 43d1a560-4f6c-48a4-a80c-6ec63f182b0d | vol1 | in-use | 1 | Attached to in2 on /dev/vdb |
+--------------------------------------+--------------+-----------+------+------------------------------+

Changed in python-openstackclient:
status: New → In Progress
assignee: nobody → Steve Martinelli (stevemar)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-openstackclient (master)

Reviewed: https://review.openstack.org/143513
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=71d9c8b5b343011bb0c9d90dab9cb75510d4c618
Submitter: Jenkins
Branch: master

commit 71d9c8b5b343011bb0c9d90dab9cb75510d4c618
Author: Steve Martinelli <email address hidden>
Date: Mon Dec 22 13:20:41 2014 -0500

    Properly format 'attached to' column list when listing volumes

    Previously, no data was being returned for the 'attached to' field
    when listing volumes. Dig into the the returned array to format
    the column.

    Change-Id: Iebd79e5ddcb4a335703d9b2675aa7128995de918
    Closes-Bug: #1404931

Changed in python-openstackclient:
status: In Progress → Fix Committed
Dean Troyer (dtroyer)
Changed in python-openstackclient:
milestone: none → m7
Dean Troyer (dtroyer)
Changed in python-openstackclient:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.