Bug 1480338 - [RFE] Add soft policy for nova server group
[RFE] Add soft policy for nova server group
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-heat (Show other bugs)
10.0 (Newton)
Unspecified Unspecified
medium Severity high
: z6
: 10.0 (Newton)
Assigned To: Zane Bitter
Ronnie Rasouli
: FutureFeature, RFE, Triaged, ZStream
: 1447798 (view as bug list)
Depends On:
Blocks: 1498108 1525936
  Show dependency treegraph
Reported: 2017-08-10 15:08 EDT by Jeremy
Modified: 2017-12-14 08:15 EST (History)
17 users (show)

See Also:
Fixed In Version: openstack-heat-7.0.5-3.el7ost
Doc Type: Enhancement
Doc Text:
With this update, the OS::Nova::ServerGroup resource now allows the 'soft-affinity' and 'soft-anti-affinity' policies to be used in addition to the 'affinity' and 'anti-affinity' policies.
Story Points: ---
Clone Of:
: 1498108 (view as bug list)
Last Closed: 2017-11-15 08:44:01 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jeremy 2017-08-10 15:08:27 EDT
Description of problem:

Add soft-anti-affinity and soft-affinity policy for nova server
group resource.

###Upstream commit


###nova side bugzilla:

Comment 3 Roberto Polli 2017-09-06 06:03:11 EDT
Without this bug closed:

- it is impossible to scale a ServerGroup with anti-affinity to more than the number of compute node
- in case of large compute nodes it could be really annoying

## Example 1

I have:

- 6 compute nodes
- an AutoScalingGroup
- a ServerGroup with anti-affinity policy 


- I cannot create a stack with more than 6 vms

## Example 2 

I have Example 1 and

- one node is in maintenance 
- other nodes have enough capacity
- a stack with 4vm


- autoscaling will fail 

## Example 3

Using Availability Zones and further placement restrictions limits even more the virtual infrastructure size.

## Example 4

I have Example 1 and:

- I want to change the anti-affinity policy to soft-anti-affinity (eg with stack update, in future, or via cli)


- ServerGroup.anti-affinity policy is unmodifiable, I should create a new ServerGroup
- Creating a new ServerGroup and causes  OS::Nova::Server replacement.

This keeps from using the anti-affinity policy at all in many cases where it's actually needed (see the OpenShift on OpenStack discussion
- https://github.com/redhat-openstack/openshift-on-openstack/issues/82#issuecomment-209807848 )
Comment 13 Ronnie Rasouli 2017-11-06 03:43:06 EST
 nova server-group-create gr-anti anti-affinity
| Id                                   | Name    | Project Id                       | User Id                          | Policies           | Members | Metadata |
| 72ec2dd1-9248-49c5-9c09-e6d9b06894fe | gr-anti | 912e382417194f7b90b32d01fb1d2131 | b5f1ed63d315454ab086b21c5cb97afc | [u'anti-affinity'] | []      | {}       |
Comment 14 Ronnie Rasouli 2017-11-06 07:43:33 EST
Using heat template for server group works as well
heat_template_version: 2016-04-08
description: Template to test rbac-policy Neutron resource
    type: OS::Nova::ServerGroup 
      name: qr-name
      policies: [soft-anti-affinity]

nova server-group-list
| Id                                   | Name    | Project Id                       | User Id                          | Policies                | Members | Metadata |
| fadbcdd9-3da8-466d-8843-b362f6761486 | qr-name | 115502acdc5f49f3a32a2f49edbadc2a | 567d3d2820eb41738c56968e10a43c7b | [u'soft-anti-affinity'] | []      | {}       |
Comment 16 errata-xmlrpc 2017-11-15 08:44:01 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

Comment 17 Rabi Mishra 2017-11-21 04:14:16 EST
*** Bug 1447798 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.