Comment 7 for bug 1470614

Revision history for this message
Edward Hope-Morley (hopem) wrote :

Hi Joe, are you actively working on a patch for this issue? I see you have been the assignee of this bug for quite a while but can't see any submission. If you are not working on a patch can you please un-assign yourself from this bug so that someone else can pick it up?

#As a side note, it's probably worth having a look at the comments in bug 1500475 where a patch was #submitted for adding, amongst other things, support for %index% to AutoScalingGroup and was #rejected on the grounds that it would cause some backwards incompatibilities.

As you point out the current implementation of %index% within an OS::Heat::ResourceGroup is only supported for property values and therefore not intrinsic_function parameters. If I understand correctly, what you want is to have a way to statically define instance configurations using parameter structures that can then be queried within a resource group loop so as not to have to explicitly define each and every instance outright.

I have had a go at doing this using a nested stack. See the following:

    http://pastebin.ubuntu.com/24053315/
    http://pastebin.ubuntu.com/24053312/

If I run heat stack-create mystack -f ./lp1470614_hot.yaml with the above I get two instances that have their respective configs applied. If I then up the count to 3 (and uncomment the extra configs) and do a stack-update, I get a third instance and by first two remain intact (contrary to your comment about this being a problem). Of course if, for example, modifying the count resulted in a change to what is applied in user_data then that would result in a new set of instances being deployed (with index counter reset) but that is by-design in Heat.