Permit setting overcloud image update policies.
authorRobert Collins <rbtcollins@hp.com>
Tue, 17 Dec 2013 02:26:32 +0000 (15:26 +1300)
committerRobert Collins <rbtcollins@hp.com>
Tue, 17 Dec 2013 02:26:32 +0000 (15:26 +1300)
This is the first step towards preserving state on stack updates when the image
id has changed.

I chose REPLACE as the default value because that is the current behaviour and
we can override it from the command line.

Change-Id: I64eab51892922ab51a89a9f389457fd1ed979fb2

nova-compute-instance.yaml
overcloud-source.yaml

index 2aadea8..e10b1dc 100644 (file)
@@ -14,6 +14,10 @@ Parameters:
     Description: Use this flavor
     Type: String
     Default: baremetal
+  ImageUpdatePolicy:
+    Default: 'REPLACE'
+    Description: What policy to use when reconstructing instances. REBUILD for rebuilds, REBUILD_PRESERVE_EPHEMERAL to preserve /mnt.
+    Type: String
   NovaImage:
     Type: String
     Default: overcloud-compute
@@ -81,6 +85,8 @@ Resources:
     Properties:
       image:
         {Ref: NovaImage}
+      image_update_policy:
+        Ref: ImageUpdatePolicy
       flavor: {Ref: Flavor}
       key_name: {Ref: KeyName}
     Metadata:
index 57a5560..754dbbe 100644 (file)
@@ -31,6 +31,10 @@ Parameters:
     Description: The password for the Heat service account, used by the Heat services.
     Type: String
     NoEcho: true
+  ImageUpdatePolicy:
+    Default: 'REPLACE'
+    Description: What policy to use when reconstructing instances. REBUILD for rebuilds, REBUILD_PRESERVE_EPHEMERAL to preserve /mnt.
+    Type: String
   KeyName:
     Default: default
     Description: Name of an existing EC2 KeyPair to enable SSH access to the instances
@@ -317,6 +321,8 @@ Resources:
     Properties:
       image:
         Ref: notcomputeImage
+      image_update_policy:
+        Ref: ImageUpdatePolicy
       flavor:
         Ref: Flavor
       key_name: