[nova] Train: how to use newer API microversion

Eugen Block eblock at nde.ag
Thu Mar 18 14:48:44 UTC 2021


Hi and thank you,

> You can specify the microversion per API request via the below arg
>
> CLI: --os-comoute-api-version 2.37

I already tried that, please find the failing command at the end of my  
previous email.

> And here is the detail of each microversion what they have changed:
>
> -  
> https://docs.openstack.org/nova/latest/reference/api-microversion-history.html

I also found that already, but it doesn't describe how I can move from  
v2 to v2.1 in order to use only the newer API. Do you have any  
information about that?


Zitat von Ghanshyam Mann <gmann at ghanshyammann.com>:

> ---- On Thu, 18 Mar 2021 09:10:49 -0500 Eugen Block <eblock at nde.ag>  
> wrote ----
>  > Hi *,
>  >
>  > I'm a little confused and could use some guidance regarding endpoints
>  > and microversions.
>  > Just recently I did a lot of maintenance in our old cloud, I believe
>  > it was created with Kilo and is now Train.
>  >
>  > Anyway, I wanted to use the "server create" option "--nic none" but
>  > couldn't because of the v2 endpoint for the nova service, right?
>  > According to the cli help this option is available from microversion
>  > 2.37+.
>  >
>  > This was the first attempt before adding new endpoints:
>  >
>  > controller:~ # openstack server create --image <UUID> --nic none
>  > --flavor 3 test-nic-none
>  > nics must be a list or a tuple, not <class 'str'>
>
>
> You can specify the microversion per API request via the below arg
>
> CLI: --os-comoute-api-version 2.37
> API: in the header :
>
>     OpenStack-API-Version: compute 2.37 OR
>     X-OpenStack-Nova-API-Version: 2.37
>
> And here is the detail of each microversion what they have changed:
>
> -  
> https://docs.openstack.org/nova/latest/reference/api-microversion-history.html
>
> -gmann
>
>  >
>  >
>  > These were the endpoints before I added new ones:
>  >
>  > controller:~ # openstack endpoint list | grep nova
>  > | <UUID> | RegionOne | nova         | compute        | True    |
>  > public    | http://controller:<PORT>/v2/%(tenant_id)s  |
>  > | <UUID> | RegionOne | nova         | compute        | True    |
>  > internal  | http://controller:<PORT>/v2/%(tenant_id)s  |
>  > | <UUID> | RegionOne | nova         | compute        | True    | admin
>  >      | http://controller:<PORT>/v2/%(tenant_id)s  |
>  >
>  >
>  > I checked with the Train install guide and created new endpoints for nova:
>  >
>  > controller:~ # openstack endpoint create --region RegionOne compute
>  > public http://controller:<PORT>/v2.1
>  > controller:~ # openstack endpoint create --region RegionOne compute
>  > internal http://controller:<PORT>/v2.1
>  > controller:~ # openstack endpoint create --region RegionOne compute
>  > admin http://controller:<PORT>/v2.1
>  >
>  >
>  > I should mention that I haven't restarted any services yet, I wanted
>  > to check each step carefully since people are working in that cloud.
>  >
>  > In the debug output from creating a new instance I saw that it's still
>  > trying to use v2 api, so I disabled it, resulting in error messages
>  > that there's no compute service available. So I reenabled the old
>  > endpoints and now have both versions active. Then I tried this:
>  >
>  > controller:~ #  openstack --os-compute-api-version 2.37 server create
>  > --image <UUID> --nic none --flavor 3 test-nic-none
>  > Invalid input for field/attribute networks. Value: none. 'none' is not
>  > of type 'array' (HTTP 400) (Request-ID:
>  > req-b3c53ab2-8040-42cf-bf07-d03e8f46cfd5)
>  >
>  > Now I'm running out of ideas how to upgrade our api endpoints so the
>  > services will actually be able to use them properly. I read Train
>  > release notes (we're planning to upgrade to Ussuri soon) and multiple
>  > docs about microversions but nothing seems to cover my issue.
>  >
>  > Could anyone shed some light? I must admit, during the upgrade cycles
>  > in the past years I just hoped everything would keep working and it
>  > did, I didn't put too much attention in the api versions yet. Any help
>  > is appreciated!
>  >
>  > Thanks and best regards,
>  > Eugen
>  >
>  >
>  >






More information about the openstack-discuss mailing list