Add strict dependencies to the undercloud template
authorNicholas Randon <nicholas.randon@hp.com>
Thu, 14 Aug 2014 10:40:29 +0000 (11:40 +0100)
committerNicholas Randon <nicholas.randon@hp.com>
Thu, 14 Aug 2014 13:27:41 +0000 (14:27 +0100)
Currently there is very weak ordering of StructuredDeployments during
heat stack creation on the undercloud. This can cause the deployment which
sends the completion signal back to Heat to happen before all others have
completed, which in turn leads Heat to state the stack is ready while ORC
is still configuring services

The only workaround to this is to wait an unknown amount of time after the
heat stack completes before the system is usable.

This patch prevents the completion signal from being returned early, by
ensuring these are strictly ordered:
   undercloudIronicDeployment (if used)
   undercloudNovaDeployment
   undercloudPassthroughDeployment
   undercloudDeployment

Note: The reference numbering for the undercloud has been removed.
Change-Id: I98499dd54bb907d29cf355fe83b5c285a7375e97

undercloud-bm-nova-deploy.yaml
undercloud-source.yaml
undercloud-vm-ironic-deploy.yaml
undercloud-vm-nova-deploy.yaml

index 3df8597..d328449 100644 (file)
@@ -12,7 +12,7 @@ parameters:
     description: Timeout for PXE deployment of baremetal nodes
     type: number
 resources:
-  01_undercloudNovaDeployment:
+  undercloudNovaDeployment:
     type: OS::Heat::StructuredDeployment
     properties:
       config: {get_resource: undercloudNovaConfig}
index 741d3ae..e09b3db 100644 (file)
@@ -319,7 +319,8 @@ resources:
       networks:
         - network: ctlplane
       user_data_format: SOFTWARE_CONFIG
-  99_undercloudDeployment:
+  undercloudDeployment:
+    depends_on: [undercloudPassthroughDeployment]
     type: OS::Heat::StructuredDeployment
     properties:
       config: {get_resource: undercloudConfig}
@@ -354,7 +355,8 @@ resources:
             - - 'http://'
               - {get_attr: [undercloud, networks, ctlplane, 0]}
               - ':8000/v1/waitcondition'
-  00_undercloudPassthroughDeployment:
+  undercloudPassthroughDeployment:
+    depends_on: [undercloudNovaDeployment]
     type: OS::Heat::StructuredDeployment
     properties:
       config: {get_resource: undercloudPassthroughConfig}
index 8fff9d5..6e778e5 100644 (file)
@@ -12,7 +12,8 @@ parameters:
     type: string
     hidden: true
 resources:
-  01_undercloudNovaDeployment:
+  undercloudNovaDeployment:
+    depends_on: [undercloudIronicDeployment]
     type: OS::Heat::StructuredDeployment
     properties:
       config: {get_resource: undercloudNovaConfig}
@@ -20,7 +21,7 @@ resources:
       signal_transport: NO_SIGNAL
       input_values:
         nova_service_password: {get_param: NovaPassword}
-  02_undercloudIronicDeployment:
+  undercloudIronicDeployment:
     type: OS::Heat::StructuredDeployment
     properties:
       config: {get_resource: undercloudIronicConfig}
index 1480938..ebd14ef 100644 (file)
@@ -24,7 +24,7 @@ parameters:
     description: What username to ssh to the virtual power host with.
     type: string
 resources:
-  01_undercloudNovaDeployment:
+  undercloudNovaDeployment:
     type: OS::Heat::StructuredDeployment
     properties:
       config: {get_resource: undercloudNovaConfig}