Configuring ControlPlaneSubnetCidr in RHEL OSP 7.2

how-apple-cider-vinegar-is-helpful-for-weight-loss-21822999

Background

In previous versions of RHEL OSP 7 the Control Plane/Provisioning network interface was assigned via DHCP and not managed via Heat. Starting in 7.2, this interface is now managed via Heat.

Sample Heat Template

Below is an example from /home/stack/templates/nic-configs/compute.yaml or /home/stack/templates/nic-configs/controller.yaml. In this example we are hard coding the interface name, however this is not required (although I recommend it).

resources:
  OsNetConfigImpl:
    type: OS::Heat::StructuredConfig
    properties:
      group: os-apply-config
      config:
        os_net_config:
          network_config:
            -
              type: interface
              name: em3
              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}

Note that this new configuration requires an additional parameter to be added to your top-level template, usually named network-environment.yaml.

ControlPlaneSubnetCidr: "23"

Stick this next to the “ControlPlaneIP” under “parameter_defaults”

  ControlPlaneSubnetCidr: "23"
  ControlPlaneDefaultRoute: 172.99.99.1

Note that if you forget to add this param, the network CIDR for this network will default to “24” which may or may not be correct for your environment. So watch out.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s