update_policy, deletion_policy in nova server resource

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

Jay Mehta gravatar image

Hi,

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
0

answered 2014-09-09 09:22:47 -0600

larsks gravatar image

updated 2014-09-09 09:25:42 -0600

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:

  my_server:
    type: "OS::Nova::Server"
    deletion_policy: Retain
    properties:
      image: fedora
      flavor: m1.small
      key_name: lars
      networks:
        - 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

Stats

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

Seen: 369 times

Last updated: Sep 09 '14