TypeError: __init__() got an unexpected keyword argument 'retry_after'

Bug #1365251 reported by Joe Gordon
30
This bug affects 6 people
Affects Status Importance Assigned to Milestone
python-novaclient
Fix Released
High
Michal Dulko
python-novaclient (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Using " nova --debug boot --image=0bdcbe3b-b909-4455-8e66-fbaefef82f4a --flavor=42 bob"

output:

 http://paste.ubuntu.com/8229361/

DEBUG (shell:802) __init__() got an unexpected keyword argument 'retry_after'
Traceback (most recent call last):
  File "/mnt/stack/python-novaclient/novaclient/shell.py", line 799, in main
    OpenStackComputeShell().main(argv)
  File "/mnt/stack/python-novaclient/novaclient/shell.py", line 729, in main
    args.func(self.cs, args)
  File "/mnt/stack/python-novaclient/novaclient/v1_1/shell.py", line 469, in do_boot
    server = cs.servers.create(*boot_args, **boot_kwargs)
  File "/mnt/stack/python-novaclient/novaclient/v1_1/servers.py", line 883, in create
    **boot_kwargs)
  File "/mnt/stack/python-novaclient/novaclient/v1_1/servers.py", line 546, in _boot
    return_raw=return_raw, **kwargs)
  File "/mnt/stack/python-novaclient/novaclient/base.py", line 100, in _create
    _resp, body = self.api.client.post(url, body=body)
  File "/mnt/stack/python-novaclient/novaclient/client.py", line 490, in post
    return self._cs_request(url, 'POST', **kwargs)
  File "/mnt/stack/python-novaclient/novaclient/client.py", line 465, in _cs_request
    resp, body = self._time_request(url, method, **kwargs)
  File "/mnt/stack/python-novaclient/novaclient/client.py", line 439, in _time_request
    resp, body = self.request(url, method, **kwargs)
  File "/mnt/stack/python-novaclient/novaclient/client.py", line 433, in request
    raise exceptions.from_response(resp, body, url, method)
  File "/mnt/stack/python-novaclient/novaclient/exceptions.py", line 249, in from_response
    return cls(**kwargs)
TypeError: __init__() got an unexpected keyword argument 'retry_after'
ERROR (TypeError): __init__() got an unexpected keyword argument 'retry_after'

Joe Gordon (jogo)
Changed in python-novaclient:
status: New → Confirmed
importance: Undecided → High
Changed in python-novaclient:
assignee: nobody → Yamini Sardana (yamini-sardana)
Changed in python-novaclient:
assignee: Yamini Sardana (yamini-sardana) → Kanchan Gupta (kanchan-gupta1)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-novaclient (master)

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

Changed in python-novaclient:
assignee: Kanchan Gupta (kanchan-gupta1) → Michal Dulko (michal-dulko-f)
status: Confirmed → In Progress
Revision history for this message
Kanchan Gupta (kanchan-gupta1) wrote :

@Michal Dulko
This bug was assigned to me and I was already working on this bug to submit a patch today. Is there any specific reason for which you picked this bug and submitted a patch on it?

Revision history for this message
Michal Dulko (michal-dulko-f) wrote :

@Kanchan Gupta
I'm sorry, the bug wasn't set to "In Progress", so I assumed that you aren't working on it (on https://wiki.openstack.org/wiki/Bugs it is said, that assigned bugs should always have status set to "In Progress") and as it is high, I decided to submit my patch.

I didn't meant to interrupt your work. If you want to you can submit your patch. Or you can add a patchset to mine if you think that you can improve something in there.

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

Reviewed: https://review.openstack.org/120115
Committed: https://git.openstack.org/cgit/openstack/python-novaclient/commit/?id=310b87ecbb8cd4c82a460781cf7b4e9e79c604d9
Submitter: Jenkins
Branch: master

commit 310b87ecbb8cd4c82a460781cf7b4e9e79c604d9
Author: Michal Dulko <email address hidden>
Date: Thu Sep 18 13:07:17 2014 +0200

    Add retry_after only to exceptions supporting it

    Having retry_after in HTTP response header for 403 status code caused
    client to fail with TypeError exception about unexpected keyword
    argument. This is related to bug in nova-api. To prevent this kind of
    client problems in the future patch adds check to from_response
    function to pass retry-after header only to classes that inherit
    from RetryAfterException and regression unit tests.

    Change-Id: I6bfc8b33eb591d30b3c647397b11100094718e13
    Closes-Bug: 1365251

Changed in python-novaclient:
status: In Progress → Fix Committed
Michael Still (mikal)
Changed in python-novaclient:
milestone: none → 2.20.0
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in python-novaclient (Ubuntu):
status: New → Confirmed
Chuck Short (zulcss)
Changed in python-novaclient (Ubuntu):
status: Confirmed → 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.