deployed-server: resource group resources not in guaranteed order in resource list output

Bug #1665458 reported by James Slagle on 2017-02-16
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
High
James Slagle

Bug Description

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.

Changed in tripleo:
importance: Undecided → High
assignee: nobody → James Slagle (james-slagle)
milestone: none → ocata-rc2

Fix proposed to branch: master
Review: https://review.openstack.org/435121

Changed in tripleo:
status: New → In Progress
tags: added: ocata-backport-potential
Changed in tripleo:
milestone: ocata-rc2 → pike-1

Reviewed: https://review.openstack.org/435121
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=c5e5d21a61808f7c09b85a2750a905bb57b54be1
Submitter: Jenkins
Branch: master

commit c5e5d21a61808f7c09b85a2750a905bb57b54be1
Author: James Slagle <email address hidden>
Date: Thu Feb 16 16:19:23 2017 -0500

    Sort ResourceGroup resource list

    We should sort the results by resource_name when listing resources in
    the ResourceGroup stack in get-occ-config.sh, as the order is not
    guaranteed. We want the order to always be numerical ascending by
    resource_name (which are just integers starting at 0).

    Change-Id: Iccef81e4dfd9586e0030f20bdde131d1a885eb19
    Closes-Bug: #1665458

Changed in tripleo:
status: In Progress → Fix Released

Reviewed: https://review.openstack.org/450444
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=e7e8161c921ab9e6bc194d53b2e390f25749e710
Submitter: Jenkins
Branch: stable/ocata

commit e7e8161c921ab9e6bc194d53b2e390f25749e710
Author: James Slagle <email address hidden>
Date: Thu Feb 16 16:19:23 2017 -0500

    Sort ResourceGroup resource list

    We should sort the results by resource_name when listing resources in
    the ResourceGroup stack in get-occ-config.sh, as the order is not
    guaranteed. We want the order to always be numerical ascending by
    resource_name (which are just integers starting at 0).

    Change-Id: Iccef81e4dfd9586e0030f20bdde131d1a885eb19
    Closes-Bug: #1665458
    (cherry picked from commit c5e5d21a61808f7c09b85a2750a905bb57b54be1)

tags: added: in-stable-ocata

This issue was fixed in the openstack/tripleo-heat-templates 7.0.0.0b1 development milestone.

This issue was fixed in the openstack/tripleo-heat-templates 6.1.0 release.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers