Unable to create server group with soft-anti-affinity policy using microversion 2.15

Bug #1732938 reported by Matt Riedemann
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-openstackclient
Fix Released
Undecided
Matt Riedemann

Bug Description

The compute API microversion 2.15 adds the soft-affinity and soft-anti-affinity policies to the server groups API, however, even when requesting to create a server group via OSC using microversion 2.15 it fails because OSC hard-codes the policy choices:

https://github.com/openstack/python-openstackclient/blob/3.12.0/openstackclient/compute/v2/server_group.py#L58

http://paste.openstack.org/show/626622/

OSC should arguably either (1) check that a microversion is requested and update the choices on the fly or (2) remove the hard-coded list of choices and just let the server handle a bad request for an unsupported policy.

Revision history for this message
Dean Troyer (dtroyer) wrote :

OSC does most of its value checking for help purposes, and to fail a tiny bit faster. I'd be OK with just removing the value checks for the current version and doing the Right Thing in OSC4

tags: added: osc4
Changed in python-openstackclient:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-openstackclient (master)

Reviewed: https://review.openstack.org/521397
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=d0917cd14b94ce13fd92237490efb5722761eda4
Submitter: Zuul
Branch: master

commit d0917cd14b94ce13fd92237490efb5722761eda4
Author: Matt Riedemann <email address hidden>
Date: Sun Nov 19 18:34:24 2017 -0500

    Remove hard-coded policy choices for creating a server group

    The hard-coded choices for the server group policy make it impossible
    to create a server group with the soft-affinity or
    soft-anti-affinity policy rules which were added in compute API
    microversion 2.15. This removes the hard-coded choices so that the
    policy is restricted on the server side rather than the client side.

    Change-Id: Ib3dc39422ac1015872d56ae2fdeddf0f29613494
    Closes-Bug: #1732938

Changed in python-openstackclient:
status: Confirmed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstackclient (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/523858

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

Reviewed: https://review.openstack.org/523858
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=f7701cd6bc36aae5adb6ece553cbc4dc914790e3
Submitter: Zuul
Branch: stable/pike

commit f7701cd6bc36aae5adb6ece553cbc4dc914790e3
Author: Matt Riedemann <email address hidden>
Date: Sun Nov 19 18:34:24 2017 -0500

    Remove hard-coded policy choices for creating a server group

    The hard-coded choices for the server group policy make it impossible
    to create a server group with the soft-affinity or
    soft-anti-affinity policy rules which were added in compute API
    microversion 2.15. This removes the hard-coded choices so that the
    policy is restricted on the server side rather than the client side.

    Change-Id: Ib3dc39422ac1015872d56ae2fdeddf0f29613494
    Closes-Bug: #1732938
    (cherry picked from commit d0917cd14b94ce13fd92237490efb5722761eda4)

tags: added: in-stable-pike
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-openstackclient 3.13.0

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-openstackclient 3.12.1

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

Matt Riedemann (mriedem)
Changed in python-openstackclient:
assignee: nobody → Matt Riedemann (mriedem)
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.