Ask Your Question

update_policy, deletion_policy in nova server resource

asked 2014-09-09 05:46:37 -0500

Jay Mehta gravatar image


Can somebody please provide me an example on how to use update_policy and deletion_policy for the nova server resource? I want to try using them for the basic stack updates.

Thanks & Regards, Jay

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-09-09 09:22:47 -0500

larsks gravatar image

updated 2014-09-09 09:25:42 -0500

The HOT documentation says:

deletion_policy: This optional attribute allows for specifying a deletion policy for the resource (one of the values Delete, Retain or Snapshot). Which type of deletion policy is supported depends on the type of the current resource.

So, you can specify a deletion policy like this:

    type: "OS::Nova::Server"
    deletion_policy: Retain
      image: fedora
      flavor: m1.small
      key_name: lars
        - network: {get_param: network_id}

And this host will be preserved when the stack is deleted.

The documentation on update_policy is less clear, and I'm not certain how that is meant to be used. According to the docs, update_policy is only supported by certain resource types, and looking at the source I only see evidence for support in the OS::Heat::InstanceGroup and OS::Heat::AutoScalingGroup resources.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-09-09 05:46:37 -0500

Seen: 382 times

Last updated: Sep 09 '14