Bug 1435202

Summary: split-stack: resource list from ResourceGroup not sorted by default
Product: Red Hat OpenStack Reporter: James Slagle <jslagle>
Component: openstack-tripleo-heat-templatesAssignee: James Slagle <jslagle>
Status: CLOSED ERRATA QA Contact: Gurenko Alex <agurenko>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 11.0 (Ocata)CC: jcoufal, jschluet, mburns, rhel-osp-director-maint
Target Milestone: rcKeywords: Triaged
Target Release: 11.0 (Ocata)   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: openstack-tripleo-heat-templates-6.0.0-0.10.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-17 20:12:06 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:

Description James Slagle 2017-03-23 11:44:26 UTC
When listing the resources in a Heat ResourceGroup, they are not in a guaranteed order. I've only ever seen them in numerical order (based on resource_name) until I scaled down a ResourceGroup, then they were in reverse order.

For example, before scale down:

| 0 | bd1c1681-5d0d-4eb1-91d4-c7f4a5a999a7 | OS::TripleO::ComputeDeployedServer | UPDATE_COMPLETE | 2017-02-15T15:18:10Z |
| 1 | 0ede4a3c-64ac-4337-a6d9-0d9cf01d06c0 | OS::TripleO::ComputeDeployedServer | UPDATE_COMPLETE | 2017-02-15T15:18:09Z |
| 2 | 2abcb41b-ef17-4b3c-ab8d-63d3094cb425 | OS::TripleO::ComputeDeployedServer | UPDATE_COMPLETE | 2017-02-15T15:18:09Z |

after scale down:

| 1 | 0ede4a3c-64ac-4337-a6d9-0d9cf01d06c0 | OS::TripleO::ComputeDeployedServer | UPDATE_COMPLETE | 2017-02-16T19:43:25Z |
| 0 | bd1c1681-5d0d-4eb1-91d4-c7f4a5a999a7 | OS::TripleO::ComputeDeployedServer | UPDATE_COMPLETE | 2017-02-16T19:43:25Z |

This will break the deployed-server get-occ-config.sh configuration script interface, since it assumes the list is ordered based on the order you want to apply the configurations to the various deployed-servers.

We need to sort the output before parsing it with the script.

Comment 1 James Slagle 2017-03-29 14:34:10 UTC
the impact is that after scale down / scale up, you would not be able to do automatic configuration of the heat agents on the deployed servers usign the get-occ-config.sh script if this patch is not in 11

Comment 4 Gurenko Alex 2017-04-30 07:04:11 UTC
Verified on build 2017-04-24.2

Comment 5 errata-xmlrpc 2017-05-17 20:12:06 UTC
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.