v2 reports instance-uuid as an option to image create

Bug #1496822 reported by Stuart McLaren
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Medium
Kairat Kushaev
Glance Client
Fix Released
Medium
Kairat Kushaev

Bug Description

Users are confused why this command isn't working:

 $ glance image-create --instance-uuid d098a027-5e40-4750-aab9-0dcc7a763196 --name "via glance image-create 1"
 +------------------+--------------------------------------+
 | Property | Value |
 +------------------+--------------------------------------+
 | checksum | None |
 | container_format | None |
 | created_at | 2015-09-16T18:14:23Z |
 | disk_format | None |
 | id | xxx |
 | instance_uuid | d098a027-5e40-4750-aab9-0dcc7a763196 |
 | min_disk | 0 |
 | min_ram | 0 |
 | name | via glance image-create 1 |
 | owner | xxx |
 | protected | False |
 | size | None |
 | status | queued |
 | tags | [] |
 | updated_at | 2015-09-16T18:14:23Z |
 | virtual_size | None |
 | visibility | private |
 +------------------+--------------------------------------+

Note 'instance_uuid d098a027-5e40-4750-aab9-0dcc7a763196' in the output.

It is reported/explained in the help:

 $ glance help image-create
 usage: glance image-create [--architecture <ARCHITECTURE>]
                           [--protected [True|False]] [--name <NAME>]
                           [--instance-uuid <INSTANCE_UUID>]
                           [--min-disk <MIN_DISK>] [--visibility <VISIBILITY>]
                           [--kernel-id <KERNEL_ID>]
                           [--tags <TAGS> [<TAGS> ...]]
                           [--os-version <OS_VERSION>]
                           [--disk-format <DISK_FORMAT>] [--self <SELF>]
                           [--os-distro <OS_DISTRO>] [--id <ID>]
                           [--owner <OWNER>] [--ramdisk-id <RAMDISK_ID>]
                           [--min-ram <MIN_RAM>]
                           [--container-format <CONTAINER_FORMAT>]
                           [--property <key=value>] [--file <FILE>]
                           [--progress]

 Optional arguments:
  --architecture <ARCHITECTURE>
                        Operating system architecture as specified in
                        http://docs.openstack.org/trunk/openstack-
                        compute/admin/content/adding-images.html
  --protected [True|False]
                        If true, image will not be deletable.
  --name <NAME> Descriptive name for the image
  --instance-uuid <INSTANCE_UUID>
                        ID of instance used to create this image.

Obviously it's not supported and should be removed from the help.

'v1' behaves as expected

 $ glance --os-image-api-version 1 image-create --instance-uuid d098a027-5e40-4750-aab9-0dcc7a763196 --name "via glance image-create 1"
 usage: glance [--version] [-d] [-v] [--get-schema] [--timeout TIMEOUT]
              [--no-ssl-compression] [-f] [--os-image-url OS_IMAGE_URL]
              [--os-image-api-version OS_IMAGE_API_VERSION] [-k]
              [--os-cert OS_CERT] [--cert-file OS_CERT] [--os-key OS_KEY]
              [--key-file OS_KEY] [--os-cacert <ca-certificate-file>]
              [--ca-file OS_CACERT] [--os-username OS_USERNAME]
              [--os-user-id OS_USER_ID]
              [--os-user-domain-id OS_USER_DOMAIN_ID]
              [--os-user-domain-name OS_USER_DOMAIN_NAME]
              [--os-project-id OS_PROJECT_ID]
              [--os-project-name OS_PROJECT_NAME]
              [--os-project-domain-id OS_PROJECT_DOMAIN_ID]
              [--os-project-domain-name OS_PROJECT_DOMAIN_NAME]
              [--os-password OS_PASSWORD] [--os-tenant-id OS_TENANT_ID]
              [--os-tenant-name OS_TENANT_NAME] [--os-auth-url OS_AUTH_URL]
              [--os-region-name OS_REGION_NAME]
              [--os-auth-token OS_AUTH_TOKEN]
              [--os-service-type OS_SERVICE_TYPE]
              [--os-endpoint-type OS_ENDPOINT_TYPE]
              <subcommand> ...
 glance: error: unrecognized arguments: --instance-uuid d098a027-5e40-4750-aab9-0dcc7a763196

Changed in python-glanceclient:
assignee: nobody → Kairat Kushaev (kkushaev)
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Kairat Kushaev (kkushaev) wrote :

I think we can enhance the description of the parameter to explain users that this option just stores instance_uuid but it doesn't use the instance as the basis for the image. AFAIU, that's the goal of the field.
So I think it is more reasonable because instance_uuid is part of image schema and can be used by some users. I would like to avoid partial fix when we will delete the description from the help but instance_uuid will be part of the schema. I will propose the fix soon, so we can also discuss this in gerrit.

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/268013

Changed in python-glanceclient:
status: Confirmed → In Progress
Changed in glance:
status: New → Confirmed
assignee: nobody → Kairat Kushaev (kkushaev)
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

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

Changed in glance:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-glanceclient (master)

Reviewed: https://review.openstack.org/268013
Committed: https://git.openstack.org/cgit/openstack/python-glanceclient/commit/?id=a8d7ded8fb4f5cf1e84c185d13c6fac1b607696c
Submitter: Jenkins
Branch: master

commit a8d7ded8fb4f5cf1e84c185d13c6fac1b607696c
Author: kairat_kushaev <email address hidden>
Date: Fri Jan 15 11:50:43 2016 +0300

    Enhance description of instance-uuid option for image-create

    Current description of instance-uuid may confuse users because
    they may think that instance-uuid can serve as basis for image
    but it just stores instance-uuid as image-metadata.
    So we need to enhance the description in glanceclient.

    Change-Id: I55829d106c9d25374df6538b3071104ee5f215f2
    Closes-Bug: #1496822

Changed in python-glanceclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/269016
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=5814440bb900a13c8ceea7e2c1f3d3e1e98b31f6
Submitter: Jenkins
Branch: master

commit 5814440bb900a13c8ceea7e2c1f3d3e1e98b31f6
Author: kairat_kushaev <email address hidden>
Date: Mon Jan 18 15:12:54 2016 +0300

    Enhance description of instance-uuid option for image-create

    Current description of instance-uuid may confuse users because
    they may think that instance-uuid can serve as basis for image
    but it just stores instance-uuid as image-metadata. So we need
    to enhance the description in glanceclient.

    Change-Id: I534709bdce588806178912fdd57fdf25bcca0449
    Closes-Bug: #1496822

Changed in glance:
status: In Progress → Fix Released
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/glance 12.0.0.0b2

This issue was fixed in the openstack/glance 12.0.0.0b2 development milestone.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/python-glanceclient 2.0.0

This issue was fixed in the openstack/python-glanceclient 2.0.0 release.

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.