Description of problem: Add soft-anti-affinity and soft-affinity policy for nova server group resource. ###Upstream commit https://github.com/openstack/heat/commit/219bb0c8e958c0cce16ad2ac3e224fbdedf56678 ###nova side bugzilla: (soft-affinity-for-server-group) https://bugzilla.redhat.com/show_bug.cgi?id=1093244
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 Then: - 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 Then: - 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) But: - 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 )
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'] | [] | {} | +--------------------------------------+---------+----------------------------------+----------------------------------+--------------------+---------+----------+
Using heat template for server group works as well heat_template_version: 2016-04-08 description: Template to test rbac-policy Neutron resource resources: nova: type: OS::Nova::ServerGroup properties: 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'] | [] | {} | +--------------------------------------+---------+----------------------------------+----------------------------------+-------------------------+---------+----------+
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. https://access.redhat.com/errata/RHBA-2017:3232
*** Bug 1447798 has been marked as a duplicate of this bug. ***