Different fields shown in v2 list than in v1 list

Bug #1489543 reported by Stuart McLaren
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Invalid
Wishlist
SamP

Bug Description

$ glance --os-image-api-version 1 image-list
+--------------------------------------+---------------------+-------------+------------------+-----------+----------------+
| ID | Name | Disk Format | Container Format | Size | Status |
+--------------------------------------+---------------------+-------------+------------------+-----------+----------------+
| 7d1923d7-68e8-4a8e-b23e-a7c77f8117fd | | raw | bare | 1034 | active |
| 5e9dc64e-7c05-431c-b81f-ae6a212353e8 | | qcow2 | bare | | queued |
| 6802e222-6eac-45c6-8c9f-0d62aed26406 | | qcow2 | bare | 145 | active |
| 7af0d66b-5b48-48a6-a6d9-c2cd3eafa83e | | | | | queued |
| dde89c3c-c8af-46a4-87b0-f39ed6c61c42 | | raw | bare | 2 | active |
| 262ac5aa-e580-4bec-a3b2-580924425fd5 | | raw | bare | 2 | active |

$ glance --os-image-api-version 2 image-list
+--------------------------------------+---------------------+
| ID | Name |
+--------------------------------------+---------------------+
| 7d1923d7-68e8-4a8e-b23e-a7c77f8117fd | |
| 5e9dc64e-7c05-431c-b81f-ae6a212353e8 | |
| 6802e222-6eac-45c6-8c9f-0d62aed26406 | |
| 7af0d66b-5b48-48a6-a6d9-c2cd3eafa83e | |
| dde89c3c-c8af-46a4-87b0-f39ed6c61c42 | |
| 262ac5aa-e580-4bec-a3b2-580924425fd5 | |

$ glance --verbose --os-image-api-version 1 image-list
+--------------------------------------+---------------------+-------------+------------------+-----------+----------------+
| ID | Name | Disk Format | Container Format | Size | Status |
+--------------------------------------+---------------------+-------------+------------------+-----------+----------------+
| 7d1923d7-68e8-4a8e-b23e-a7c77f8117fd | | raw | bare | 1034 | active |
| 5e9dc64e-7c05-431c-b81f-ae6a212353e8 | | qcow2 | bare | | queued |
| 6802e222-6eac-45c6-8c9f-0d62aed26406 | | qcow2 | bare | 145 | active |
| 7af0d66b-5b48-48a6-a6d9-c2cd3eafa83e | | | | | queued |
| dde89c3c-c8af-46a4-87b0-f39ed6c61c42 | | raw | bare | 2 | active |
| 262ac5aa-e580-4bec-a3b2-580924425fd5 | | raw | bare | 2 | active |

$ glance --verbose --os-image-api-version 2 image-list
+--------------------------------------+---------------------+----------------------------------+----------------+
| ID | Name | owner | status |
+--------------------------------------+---------------------+----------------------------------+----------------+
| 7d1923d7-68e8-4a8e-b23e-a7c77f8117fd | | 411423405e10431fb9c47ac5b2446557 | active |
| 5e9dc64e-7c05-431c-b81f-ae6a212353e8 | | 411423405e10431fb9c47ac5b2446557 | queued |
| 6802e222-6eac-45c6-8c9f-0d62aed26406 | | 411423405e10431fb9c47ac5b2446557 | active |
| 7af0d66b-5b48-48a6-a6d9-c2cd3eafa83e | | 411423405e10431fb9c47ac5b2446557 | queued |
| dde89c3c-c8af-46a4-87b0-f39ed6c61c42 | | 411423405e10431fb9c47ac5b2446557 | active |
| 262ac5aa-e580-4bec-a3b2-580924425fd5 | | 411423405e10431fb9c47ac5b2446557 | active |

tags: added: 1.0.0-potential
Changed in python-glanceclient:
assignee: nobody → SamP (sampath-priyankara)
Revision history for this message
SamP (sampath-priyankara) wrote :

Following Fix ought to solve this issue.
https://bugs.launchpad.net/python-glanceclient/+bug/1486329

Revision history for this message
SamP (sampath-priyankara) wrote :

This is Fixed.

openstack@SAMHV05:~/devstack$ glance -v --os-image-api-version 2 image-list
+--------------------------------------+---------------------------------+-------------+------------------+----------+--------+----------------------------------+
| ID | Name | Disk_format | Container_format | Size | Status | Owner |
+--------------------------------------+---------------------------------+-------------+------------------+----------+--------+----------------------------------+
| fd4fa15d-853e-42a0-a172-4c2334149b94 | cirros-0.3.2-x86_64-uec | ami | ami | 25165824 | active | adebd16a12124fa6ba6843c47aba458e |
| fd6797f8-4ae8-4d6d-b93e-3e7039a22a4d | cirros-0.3.2-x86_64-uec-kernel | aki | aki | 4969360 | active | adebd16a12124fa6ba6843c47aba458e |
| d4f54a6b-9ad6-4c16-acd8-d8a13ea6281e | cirros-0.3.2-x86_64-uec-ramdisk | ari | ari | 3723817 | active | adebd16a12124fa6ba6843c47aba458e |
| ff9d7722-6c46-4595-80ca-26773d7666fe | cirros-0.3.4-x86_64-uec | ami | ami | 25165824 | active | adebd16a12124fa6ba6843c47aba458e |
| 6b443a04-6be8-4072-bc54-04620ca5f2cf | cirros-0.3.4-x86_64-uec-kernel | aki | aki | 4979632 | active | adebd16a12124fa6ba6843c47aba458e |
| e4d748c7-c75c-4cd2-bc4a-cb4da9fa1952 | cirros-0.3.4-x86_64-uec-ramdisk | ari | ari | 3740163 | active | adebd16a12124fa6ba6843c47aba458e |
+--------------------------------------+---------------------------------+-------------+------------------+----------+--------+----------------------------------+

Revision history for this message
SamP (sampath-priyankara) wrote :

Sorry, I was too quick,
There is a slight different between v1 and v2 (--verbose) image-list output
In v1,

   columns = ['ID', 'Name', 'Disk Format', 'Container Format',
               'Size', 'Status']

In v2 ( --verbose)

    columns = ['ID', 'Name']
    if args.verbose:
        columns += ['Disk_format', 'Container_format', 'Size', 'Status',
                    'Owner']

v2 (--verbose) has 'Owner' column and v1 dose not.

Revision history for this message
SamP (sampath-priyankara) wrote :

I think we should unify the image-list output of v1 and v2 for verbose and non-verbose.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-glanceclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/218141

Changed in python-glanceclient:
status: New → In Progress
Erno Kuvaja (jokke)
Changed in python-glanceclient:
importance: Undecided → Wishlist
Revision history for this message
Flavio Percoco (flaper87) wrote :

What's the proposed change here?

The description of this bug shows the difference but not the expected behavior. The proposed patch changes the v1 behavior, which is something we can't afford as it'd break backwards incompatibility on the v1 shell.

I'm marking this as Invalid until more information is provided, which I assume is to bring v2 non-verbose mode to something similar to v1's

Changed in python-glanceclient:
status: In Progress → Invalid
Revision history for this message
SamP (sampath-priyankara) wrote :

Thanks for the review and comments.
Also thanks for pointing out the backward compatibility issue.

Now, current diff is,
 v1 verbose/nonverbose
 ['ID', 'Name', 'Disk Format', 'Container Format', 'Size', 'Status']
v2 nonverbose
['ID', 'Name']
v2 verbose
['ID', 'Name', 'Disk_format', 'Container_format', 'Size', 'Status','Owner']

If we make v2 non-verbose mode similar to v1's, then only diff between v2 verbose and non-verbose is 'Owner' filed.
And non-verbose output is not "non-verbose" anymore.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-glanceclient (master)

Change abandoned by Sampath Priyankara (<email address hidden>) on branch: master
Review: https://review.openstack.org/218141
Reason: Thanks for the comments. Abandon the changes till get a clear idea about how to fix this.

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.