Skip to content

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

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

Activity

  1. github-actions commented on Jun 17, 2025

    @github-actions

    Thank you for reporting your first issue! Be sure that we will be looking at it, but keep in mind
    this sometimes takes a while.
    Please let the maintainers know if your issue has not got enough attention after a few days.
    If any doubt, please consult our issue tutorial.

  2. added a commit that references this issue on Jun 17, 2025
  3. stephenfin commented on Jun 18, 2025

    @stephenfin
    Contributor

    This is a bug in Magnum, which is should be respecting the official service type. I have pushed a fix here. However, we're going to need to support older deployments without this fix so yes, we'll need to insist on using container-infra for the OpenStack-API-Version header. I'll work on the fix.

  4. self-assigned this
    on Jun 18, 2025
  5. added a commit that references this issue on Jun 18, 2025
    22f85ac
  6. added a commit that references this issue on Jun 19, 2025
    aebe26f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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