Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Passing invalid "Openstack-Api-Version: container-infrastructure-management: " to magnum #3429

Open
@andrewbogott

Description

@andrewbogott

When specifying API version to Openstack Magnum, gophercloud is passing an invalid string which results in a 406.

I don't understand how the aliasing is meant to work, but I believe that the problem was introduced here:

e394733#diff-5643779347824e0ec4258ef187be1f23c3b1eeca504fcfe48e47efe0e051b4bfL480

I don't see the string 'container-infrastructure-management' anywhere in Magnum source code; the version string should be 'container-infra' which was the value before that patch. Here's an example of the magnum client passing that string to switch API version:

https://opendev.org/openstack/python-magnumclient/src/commit/c4b3f4a9cf8e88259c4201f4ee0d7faabaee2c4d/magnumclient/common/httpclient.py#L176

The naive fix is probably just to switch that string back to 'container-infra' which is what the API expects. I'm happy to write that patch but want to make sure there's not a more complicated bug in the aliasing code first.

For reference, our internal tracking of this issue is https://phabricator.wikimedia.org/T397106

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions