[openstack-dev] [heat] as-update-policy implementation questions

Angus Salkeld asalkeld at redhat.com
Fri Jun 7 00:23:28 UTC 2013


On 06/06/13 17:50 +0000, Chan, Winson C wrote:
>Heat team,
>
>Regarding blueprint https://blueprints.launchpad.net/heat/+spec/as-update-policy, can you answer the following so to help me speed up where to look?
>
>1) I'm currently thinking that the UpdatePolicy would be enforced (if defined in the stack template) at either AutoScalingGroup.adjust or InstanceGroup.resize in ./heat/engine/resources/autoscaling.py.  I'm trying to understand the flow.  It's not obvious to me where in the cloud watch code that invoke the adjust or resize method when alarm condition is met.  Can you point me in the right direction?

Hi Winson,

This is where the new alarm state gets evaluated:
https://github.com/openstack/heat/blob/master/heat/engine/watchrule.py#L218

This is where the actions are added:
https://github.com/openstack/heat/blob/master/heat/engine/watchrule.py#L242

This is where the actions are run:
https://github.com/openstack/heat/blob/master/heat/engine/service.py#L546

>
>2) Since this relates to rolling update, I need to keep the adjust/resize task in the scheduler until it completed the rolling update.  Do I use the TaskRunner and set up steps in the task with sleep in between steps according to the UpdatePolicy?
>

Zane might be able to help here, I haven't dived into the new
TaskRunner yet.

-Angus

>Any other guidance?

That bp seems thin on details :(

>Thanks.
>Winson
>

>_______________________________________________
>OpenStack-dev mailing list
>OpenStack-dev at lists.openstack.org
>http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev




More information about the OpenStack-dev mailing list