Fix controller-no-external.yaml in bonded configs.
authorDan Sneddon <dsneddon@redhat.com>
Thu, 21 Apr 2016 22:45:25 +0000 (15:45 -0700)
committerDan Sneddon <dsneddon@redhat.com>
Thu, 21 Apr 2016 22:45:25 +0000 (15:45 -0700)
For some reason the controller-no-external.yaml template is configured
for DHCP on the control plane interface. We switched to static control
plane IPs before the controller-no-external.yaml was created (IIRC), so
I'm not sure how that happened. This change brings the
controller-no-external.yaml in line with the rest of the bonded NIC
templates.

Change-Id: I2ac929e241707db72a0beabf9d5cd7fc14b90f76

network/config/bond-with-vlans/controller-no-external.yaml

index 375d40b..d953243 100644 (file)
@@ -5,6 +5,10 @@ description: >
   with VLANs attached for the controller role.
 
 parameters:
+  ControlPlaneIp:
+    default: ''
+    description: IP address/subnet on the ctlplane network
+    type: string
   ExternalIpSubnet:
     default: ''
     description: IP address/subnet on the external network
@@ -62,6 +66,18 @@ parameters:
     default: '10.0.0.1'
     description: default route for the external network
     type: string
+  ControlPlaneSubnetCidr: # Override this via parameter_defaults
+    default: '24'
+    description: The subnet CIDR of the control plane network.
+    type: string
+  DnsServers: # Override this via parameter_defaults
+    default: []
+    description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
+    type: comma_delimited_list
+  EC2MetadataIp: # Override this via parameter_defaults
+    description: The IP address of the EC2 metadata server.
+    type: string
+
 
 resources:
   OsNetConfigImpl:
@@ -71,6 +87,21 @@ resources:
       config:
         os_net_config:
           network_config:
+            -
+              type: interface
+              name: nic1
+              use_dhcp: false
+              addresses:
+                -
+                  ip_netmask:
+                    list_join:
+                      - '/'
+                      - - {get_param: ControlPlaneIp}
+                        - {get_param: ControlPlaneSubnetCidr}
+              routes:
+                -
+                  ip_netmask: 169.254.169.254/32
+                  next_hop: {get_param: EC2MetadataIp}
             -
               type: ovs_bridge
               name: {get_input: bridge_name}