glance image-create-via-import fails with value error

Bug #1711511 reported by Abhishek Kekane
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Fix Released
Undecided
Abhishek Kekane

Bug Description

glance image-create-via-import fails with value error

Steps to reproduce:

1. Run image-create-via-import command
   $ glance --debug image-create-via-import --name sample --file <image-file> --disk-format iso --container-format bare

Output:

Traceback (most recent call last):
  File "/opt/stack/python-glanceclient/glanceclient/shell.py", line 699, in main
    OpenStackImagesShell().main(argv)
  File "/opt/stack/python-glanceclient/glanceclient/shell.py", line 603, in main
    args.func(client, args)
  File "/opt/stack/python-glanceclient/glanceclient/common/utils.py", line 98, in func_wrapper
    return func(gc, args)
  File "/opt/stack/python-glanceclient/glanceclient/v2/shell.py", line 129, in do_image_create_via_import
    image, resp = gc.images.create(**fields)
ValueError: too many values to unpack
too many values to unpack

Further it fails with AttributeError: 'Namespace' object has no attribute 'import_method'
'Namespace' object has no attribute 'import_method'

Logs:
Traceback (most recent call last):
  File "/opt/stack/python-glanceclient/glanceclient/shell.py", line 699, in main
    OpenStackImagesShell().main(argv)
  File "/opt/stack/python-glanceclient/glanceclient/shell.py", line 603, in main
    args.func(client, args)
  File "/opt/stack/python-glanceclient/glanceclient/common/utils.py", line 98, in func_wrapper
    return func(gc, args)
  File "/opt/stack/python-glanceclient/glanceclient/v2/shell.py", line 136, in do_image_create_via_import
    do_image_import(gc, args)
  File "/opt/stack/python-glanceclient/glanceclient/v2/shell.py", line 423, in do_image_import
    gc.images.image_import(args.id, args.import_method)

Changed in python-glanceclient:
assignee: nobody → Abhishek Kekane (abhishek-kekane)
description: updated
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/494982

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

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

commit 335f1e944719023a887730a223353a4bdb209815
Author: Abhishek Kekane <email address hidden>
Date: Fri Aug 18 12:52:53 2017 +0530

    image-create-via-import fails with ValueError

    CLI image-create-via-import fails with ValueError. The reason
    is create command returns RequestIdWrapper object and not image
    and response.

    Further it fails with AttributeError: 'Namespace' object has
    no attribute 'import_method'. The reason is do_import_image() call
    requires 'import_method' as input which is not provided at the
    moment.

    Change-Id: Ic4c4d1f3c5d290b584840e8f9047fb53611a5748
    Closes-bug: #1711511

Changed in python-glanceclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-glanceclient (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/497597

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-glanceclient (stable/pike)

Reviewed: https://review.openstack.org/497597
Committed: https://git.openstack.org/cgit/openstack/python-glanceclient/commit/?id=13b25ff1fed908cfe7b4e719a97efd7121e3be96
Submitter: Jenkins
Branch: stable/pike

commit 13b25ff1fed908cfe7b4e719a97efd7121e3be96
Author: Abhishek Kekane <email address hidden>
Date: Fri Aug 18 12:52:53 2017 +0530

    image-create-via-import fails with ValueError

    CLI image-create-via-import fails with ValueError. The reason
    is create command returns RequestIdWrapper object and not image
    and response.

    Further it fails with AttributeError: 'Namespace' object has
    no attribute 'import_method'. The reason is do_import_image() call
    requires 'import_method' as input which is not provided at the
    moment.

    Change-Id: Ic4c4d1f3c5d290b584840e8f9047fb53611a5748
    Closes-bug: #1711511
    (cherry picked from commit 335f1e944719023a887730a223353a4bdb209815)

tags: added: in-stable-pike
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-glanceclient 2.9.0

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-glanceclient 2.8.1

This issue was fixed in the openstack/python-glanceclient 2.8.1 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.