openstack team mailing list archive
-
openstack team
-
Mailing list archive
-
Message #11491
'nova flavor-list' fails with "ERROR: string indices must be integers, not str", but 'nova-manage flavor list' succeeds.
-
To:
"openstack@xxxxxxxxxxxxxxxxxxx" <openstack@xxxxxxxxxxxxxxxxxxx>
-
From:
James R Penick <penick@xxxxxxxxxxxxx>
-
Date:
Wed, 9 May 2012 16:08:11 -0700
-
Accept-language:
en-US
-
Acceptlanguage:
en-US
-
Thread-index:
Ac0uOJzgswiL385qSFO1P+tvQRJ2TQ==
-
Thread-topic:
'nova flavor-list' fails with "ERROR: string indices must be integers, not str", but 'nova-manage flavor list' succeeds.
-
User-agent:
Microsoft-MacOutlook/14.2.1.120420
Hey Folks,
Any idea why 'nova flavor-list' (among other things) would fail with a 503 but 'nova-manage flavor list' succeeds?
bash-4.1$ sudo nova-manage flavor list
Password:
m1.medium: Memory: 4096MB, VCPUS: 2, Root: 10GB, Ephemeral: 40Gb, FlavorID: 3, Swap: 0MB, RXTX Factor: 1.0
m1.large: Memory: 8192MB, VCPUS: 4, Root: 10GB, Ephemeral: 80Gb, FlavorID: 4, Swap: 0MB, RXTX Factor: 1.0
m1.tiny: Memory: 512MB, VCPUS: 1, Root: 0GB, Ephemeral: 0Gb, FlavorID: 1, Swap: 0MB, RXTX Factor: 1.0
m1.xlarge: Memory: 16384MB, VCPUS: 8, Root: 10GB, Ephemeral: 160Gb, FlavorID: 5, Swap: 0MB, RXTX Factor: 1.0
m1.small: Memory: 2048MB, VCPUS: 1, Root: 10GB, Ephemeral: 20Gb, FlavorID: 2, Swap: 0MB, RXTX Factor: 1.0
bash-4.1$ nova flavor-list
ERROR: string indices must be integers, not str
bash-4.1$
As an aside:
That error is a result of a 503 being passed back in the body of the get, which is then blindly passed to the json parser, and missed by the resp.status check in client.py:
"
if resp.status in (400, 401, 403, 404, 408, 409, 413, 500, 501):
raise exceptions.from_response(resp, body)
"
Adding a 503 to that status list above will at least cause it to fail correctly:
"
bash-4.1$ nova flavor-list
ERROR: n/a (HTTP 503)
bash-4.1$
"
That said, help?
Thanks!
-James
Follow ups