[openstack-dev] [Heat] Instance naming in IG/ASG and problems related to UpdatePolicy
Chan, Winson C
winson.c.chan at intel.com
Fri Aug 30 14:23:18 UTC 2013
Regarding the last set of comments on the UpdatePolicy, I want to bring your attention to a few items. I already submitted a new patch set and didn't want to reply on the old patch set so that's why I emailed.
As you are aware, IG/ASG currently create instances by appending group name and #. On resize, it identifies the newest instances to remove by sorting on the name string and removing from the end of the list.
Based on your comments, in the new patch set I have changed the naming of the instances to just a # without prefixing the group name (or self.name). I also remove the name ranges stuff. But we still have the following problems…
1. On a decrease in size where the oldest instances should be removed… Since the naming is still number based, this means we'll have to remove instances starting from 0 (since 0 is the oldest). This leaves a gap in the beginning of the list. So on the next resize to increase, where to increase? Continue the numbering from the end?
2. On replace, I let the UpdateReplace handle the batch replacement. However, for the use case where we need to support MinInstancesInService (min instances in service = 2, batch size = 2, current size = 2), this means we need to create the new instances first before deleting the old ones instead of letting the instance update to handle it. Also, with the naming restriction, this means I will have to create the 2 new replacements as '2' and '3'. After I delete the original '0' and '1', there's a gap in the numbering of the instances… Then this leads to the same question as above. What happen on a resize after?
The ideal I think is to just use some random short id for the name of the instances and then store a creation timestamp somewhere with the resource and use the timestamp to determine the age of the instances for removal. Thoughts?
More information about the OpenStack-dev