Scale the control plane in hosts files.
authorRobert Collins <rbtcollins@hp.com>
Wed, 23 Apr 2014 01:23:15 +0000 (13:23 +1200)
committerRobert Collins <rbtcollins@hp.com>
Thu, 1 May 2014 00:45:46 +0000 (12:45 +1200)
Being able to figure out the hypervisors from the control nodes seems
useful, and equally all the hypervisors should know about all the
control nodes (at least until we have virtual IPs all in place), and
lastly the control plane need to know each other by hostname.

Change-Id: I92877501c58d8c210e7b2c94935e107355271fb9

overcloud-source.yaml

index 3aafb6d..6949dea 100644 (file)
@@ -277,17 +277,32 @@ Resources:
                               - show
                           - 'novalocal'
             - Fn::Join:
-              - ' '
-              - - Fn::Select:
-                  - 0
-                  - Fn::Select:
-                    - ctlplane
-                    - Fn::GetAtt:
-                      - controller0
-                      - networks
-                - {Ref: CloudName}
-                # If CloudName is unset, make the hosts line still valid
-                - unused
+              - "\n"
+              - Merge::Map:
+                  controller0:
+                    Fn::Join:
+                    - ' '
+                    - - Fn::Select:
+                        - 0
+                        - Fn::Select:
+                          - ctlplane
+                          - Fn::GetAtt:
+                            - controller0
+                            - networks
+                      - Fn::Select:
+                        - name
+                        - Fn::GetAtt:
+                          - controller0
+                          - show
+                      - Fn::Join:
+                        - '.'
+                        - - Fn::Select:
+                            - name
+                            - Fn::GetAtt:
+                              - controller0
+                              - show
+                          - 'novalocal'
+                      - {Ref: CloudName}
   NovaCompute0Passthrough:
     Type: OS::Heat::StructuredDeployment
     Properties:
@@ -456,9 +471,60 @@ Resources:
               - ':8000/v1/waitcondition'
         hosts:
           Fn::Join:
-          - ' '
-          - - {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ controller0, networks ]}]]}
-            - {Ref: CloudName}
+          - "\n"
+          - - Fn::Join:
+              - "\n"
+              - Merge::Map:
+                  NovaCompute0:
+                    Fn::Join:
+                    - ' '
+                    - - Fn::Select:
+                        - 0
+                        - Fn::Select:
+                          - ctlplane
+                          - Fn::GetAtt:
+                            - NovaCompute0
+                            - networks
+                      - Fn::Select:
+                        - name
+                        - Fn::GetAtt:
+                          - NovaCompute0
+                          - show
+                      - Fn::Join:
+                        - '.'
+                        - - Fn::Select:
+                            - name
+                            - Fn::GetAtt:
+                              - NovaCompute0
+                              - show
+                          - 'novalocal'
+            - Fn::Join:
+              - "\n"
+              - Merge::Map:
+                  controller0:
+                    Fn::Join:
+                    - ' '
+                    - - Fn::Select:
+                        - 0
+                        - Fn::Select:
+                          - ctlplane
+                          - Fn::GetAtt:
+                            - controller0
+                            - networks
+                      - Fn::Select:
+                        - name
+                        - Fn::GetAtt:
+                          - controller0
+                          - show
+                      - Fn::Join:
+                        - '.'
+                        - - Fn::Select:
+                            - name
+                            - Fn::GetAtt:
+                              - controller0
+                              - show
+                          - 'novalocal'
+                      - {Ref: CloudName}
   controller0SSLDeployment:
     Type: OS::Heat::StructuredDeployment
     Properties: