Gather all hypervisor names into /etc/hosts.
authorRobert Collins <rbtcollins@hp.com>
Thu, 20 Feb 2014 05:26:22 +0000 (18:26 +1300)
committerRobert Collins <rbtcollins@hp.com>
Thu, 20 Feb 2014 22:13:11 +0000 (11:13 +1300)
Nova compute uses hostnames to do live migration, so we need this, or
DNS, and for now this is simpler, as we don't have Designate available
in the undercloud.

Change-Id: Idf0b106c5fbe60680b23a730eb37619a3d796869

overcloud-source.yaml

index f51afc4..0fc850e 100644 (file)
@@ -194,15 +194,45 @@ Resources:
             Ref: NeutronBridgeMappings
         StaticHosts:
           Fn::Join:
-          - ' '
-          - - Fn::Select:
-              - 0
-              - Fn::Select:
-                - ctlplane
-                - Fn::GetAtt:
-                  - notCompute0
-                  - 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
+                          - 'local'
+            - Fn::Join:
+              - ' '
+              - - Fn::Select:
+                  - 0
+                  - Fn::Select:
+                    - ctlplane
+                    - Fn::GetAtt:
+                      - notCompute0
+                      - networks
+                - {Ref: CloudName}
+                # If CloudName is unset, make the hosts line still valid
+                - unused
   NovaCompute0:
     Type: FileInclude
     Path: nova-compute-instance.yaml