stage call fails with TypeError

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

Bug Description

glance image-stage <image-id> --file <image-file> fails with below error:

TypeError: stage() takes exactly 3 arguments (4 given)
stage() takes exactly 3 arguments (4 given)

The reason is stage() also accepts image_size which is not provided.

Further it raises 'NoneType' object has no attribute 'headers'. The reason is stage() internally calls upload method which returns a response wrapper and in stage call it again tries to add request_id which requires response object instead it has a wrapper which fails to retrieve headers.

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

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

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

commit 0e50837a374958d2863deef890879c960a05d8aa
Author: Abhishek Kekane <email address hidden>
Date: Wed Aug 16 15:49:47 2017 +0530

    stage call fails with TypeError

    image-stage call fails with TypeError saying 'stage() takes exactly
    3 arguments (4 given). The reason is stage() also accepts image_size
    as a argument which is not provided.

    Further it raises 'NoneType' object has no attribute 'headers'. The
    reason is stage() internally calls upload method which
    returns a object of RequestIdWrapper on body (which is None) and
    response. In stage call it again tries to add request id which requires
    response object but instead it has a RequestIdWrapper which fails to
    retrieve headers.

    Change-Id: I4de4be7a55f35c3533b53acd48042c7c95b4bdc0
    Closes-bug: #1711090

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

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

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

commit f7ce62b08901b16c472cc4ec84831f2144a55cc6
Author: Abhishek Kekane <email address hidden>
Date: Wed Aug 16 15:49:47 2017 +0530

    stage call fails with TypeError

    image-stage call fails with TypeError saying 'stage() takes exactly
    3 arguments (4 given). The reason is stage() also accepts image_size
    as a argument which is not provided.

    Further it raises 'NoneType' object has no attribute 'headers'. The
    reason is stage() internally calls upload method which
    returns a object of RequestIdWrapper on body (which is None) and
    response. In stage call it again tries to add request id which requires
    response object but instead it has a RequestIdWrapper which fails to
    retrieve headers.

    Change-Id: I4de4be7a55f35c3533b53acd48042c7c95b4bdc0
    Closes-bug: #1711090
    (cherry picked from commit 0e50837a374958d2863deef890879c960a05d8aa)

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.