nova image-list is deprecated, but it should work even now

Bug #1630161 reported by Attila Fazekas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Unassigned
python-novaclient
Invalid
Undecided
Unassigned
python-openstackclient
Fix Released
Undecided
Artom Lifshitz

Bug Description

On newton it looks like:
$ nova image-list
WARNING: Command image-list is deprecated and will be removed after Nova 15.0.0 is released. Use python-glanceclient or openstackclient instead.
ERROR (VersionNotFoundForAPIMethod): API version 'API Version Major: 2, Minor: 37' is not supported on 'list' method.

It is supposed to be still supported, since newton is just 14.

nova (14.0.0.0rc2.dev21)
python-novaclient (6.0.0)

Revision history for this message
Matt Riedemann (mriedem) wrote :

This is because the image proxy API bindings are deprecated as of the 2.36 microversion so anything >=2.36 is going to fail.

Changed in nova:
status: New → Invalid
Changed in python-novaclient:
status: New → Invalid
Revision history for this message
Matt Riedemann (mriedem) wrote :

So to be clear, if you pass "--os-compute-api-version 2.35" on the CLI it will still work.

Revision history for this message
Augustina Ragwitz (auggy) wrote :

Should we at least update the error message to clearly state it is deprecated?

Revision history for this message
Artom Lifshitz (notartom) wrote :

I think this is actually a valid bug in openstackclient. Specifically, the following use case *should* work:

$ export OS_COMPUTE_API_VERSION=2.latest

$ openstack server create --flavor m1.tiny --image cirros-0.3.4-x86_64 --key-name stack --security-group default --nic net-id=059a48f5-fc8e-4721-b694-f2441cf5226f,tag=bla test2

API version 'API Version Major: 2, Minor: 37' is not supported on 'list' method.

It's expected that setting OS_COMPUTE_API_VERSION to latest allows you to boot a server. However, it looks like if the latest on the server side is 2.37 (or later?) booting a VM doesn't work.

Revision history for this message
Artom Lifshitz (notartom) wrote :

Fix proposed to python-openstackclient: https://review.openstack.org/#/c/424688/

Changed in python-openstackclient:
assignee: nobody → Artom Lifshitz (notartom)
Changed in python-openstackclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-openstackclient (master)

Reviewed: https://review.openstack.org/424688
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=98f803e0f0e622e7770cfab52e99168f6a68f427
Submitter: Jenkins
Branch: master

commit 98f803e0f0e622e7770cfab52e99168f6a68f427
Author: Artom Lifshitz <email address hidden>
Date: Tue Jan 24 15:02:38 2017 +0000

    Use image client for images instead of compute

    With the deprecation of the Nova proxy APIs in microversion 2.36 [1],
    any operation that uses a microversion higher than 2.36 and works with
    images will fail because the /images endpoint will return 404. This
    patch updates openstackclient to query images using the image client
    in places where previously the compute client was used.

    [1] http://docs.openstack.org/developer/nova/api_microversion_history.html#id33

    Change-Id: Ia66e44e530799ce6531922dcf6a84e38528c8725
    Closes-bug: 1630161

Changed in python-openstackclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-openstackclient 3.8.0

This issue was fixed in the openstack/python-openstackclient 3.8.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstackclient (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/429772

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

Reviewed: https://review.openstack.org/429772
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=a31c8117b0819df90edaa4347b1c23b0d5a95e01
Submitter: Jenkins
Branch: stable/newton

commit a31c8117b0819df90edaa4347b1c23b0d5a95e01
Author: Artom Lifshitz <email address hidden>
Date: Tue Jan 24 15:02:38 2017 +0000

    Use image client for images instead of compute

    With the deprecation of the Nova proxy APIs in microversion 2.36 [1],
    any operation that uses a microversion higher than 2.36 and works with
    images will fail because the /images endpoint will return 404. This
    patch updates openstackclient to query images using the image client
    in places where previously the compute client was used.

    [1] http://docs.openstack.org/developer/nova/api_microversion_history.html#id33

    Change-Id: Ia66e44e530799ce6531922dcf6a84e38528c8725
    Closes-bug: 1630161
    (cherry picked from commit 98f803e0f0e622e7770cfab52e99168f6a68f427)

tags: added: in-stable-newton
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.