Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1447798

Summary: soft-anti-affinity is not accepted by python-openstackclient but is with python-novaclient
Product: Red Hat OpenStack Reporter: David Hill <dhill>
Component: openstack-heatAssignee: Zane Bitter <zbitter>
Status: CLOSED DUPLICATE QA Contact: Ronnie Rasouli <rrasouli>
Severity: high Docs Contact:
Priority: high    
Version: 10.0 (Newton)CC: aludwar, apevec, beth.white, dhill, jpichon, lhh, mburns, ramishra, rhel-osp-director-maint, rpolli, sbaker, shardy, srevivo
Target Milestone: ---Keywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-21 09:14:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Hill 2017-05-03 20:57:53 UTC
What problem/issue/behavior are you having trouble with?  What do you expect to see?

The soft-anti-affinity can be created sucessfully with:
        nova server-group-create testgroup soft-anti-affinity
but failed with:
    [stack@ur109_director ~(platform-test)]$ openstack server group create --policy soft-anti-affinity testgroup
    Invalid input for field/attribute 0. Value: soft-anti-affinity. u'soft-anti-affinity' is not one of ['anti-affinity', 'affinity'] (HTTP 400) (Request-ID: req-8bae7e10-b8ad-427f-9934-1e54d87cf1d7)
The same thing happened when trying to create the servergroup from HEAT template

Where are you experiencing the behavior?  What environment?

RedHat 7.2

When does the behavior occur? Frequently?  Repeatedly?   At certain times?

Every time

What information can you provide around timeframes and the business impact?

We will need this feature in about 1 month or less

Comment 4 Roberto Polli 2017-08-10 15:56:31 UTC
I'm able to use soft-anti-affinity specifying the --compute-api-version 

as for https://docs.openstack.org/nova/latest/reference/api-microversion-history#id13


openstack server group create deleteme-sg-3 \
    --policy soft-anti-affinity \
    --os-compute-api-version 2.15

(thx to mriedem)

Comment 7 David Hill 2017-09-05 15:36:14 UTC
This looks like a bug at this point.   Shouldn't nova-api always use the latest API levels if no API microversion is requested?

Comment 8 Julie Pichon 2017-09-05 16:11:41 UTC
From what I can tell, Heat support for Nova microversions was only added in 8.0.0, aka Ocata/OSP11 [1].

It also sounds like defaulting to 2.1 (the minimum version) is the expected behaviour, based on the link in comment 4 ("If no version is specified then the API will behave as if a version request of v2.1 was requested.") and the docs on microversions at [2], [3] ("If the OpenStack-API-Version header is not provided, act as if the minimum supported version was specified"). It seems like the idea is to avoid having cloud updates break older clients/scripts as they may not be compatible with the newest microversion API.

[1] https://github.com/openstack/heat/commit/ce64d23e49143743bb9189ff53a9128916527ca1
[2] https://developer.openstack.org/api-guide/compute/microversions.html
[3] http://specs.openstack.org/openstack/api-wg/guidelines/microversion_specification.html

Comment 9 David Hill 2017-09-08 13:22:30 UTC
Can we backport this to RHOSP 10?

Comment 12 Julie Pichon 2017-11-20 10:58:33 UTC
This has become a backport request for Heat support for Nova microversions (added in Ocata) to Newton, adjusting component/DFG/flags accordingly.

Comment 13 Rabi Mishra 2017-11-21 09:14:16 UTC

*** This bug has been marked as a duplicate of bug 1480338 ***