Enable Cross-AZ high availability for DHCP

Enable Cross-AZ high availability for DHCP

Note

This feature is available starting from the MCP 2019.2.9 maintenance update. Before using the feature, follow the steps described in Apply maintenance updates.

This section describes how to enable Cross-AZ high availability for DHCP. As a result, DHCP services will be created in availability zones selected during the network creation.

To enable Cross-AZ high availability for DHCP:

  1. Log in to the Salt Master node.

  2. In /srv/salt/reclass/classes/cluster/<cluster_name>/openstack/control.yml, set the following parameters:

    parameters:
      neutron:
        server:
          dhcp_agents_per_network: '2'
          dhcp_load_type: 'networks'
          network_scheduler_driver: neutron.scheduler.dhcp_agent_scheduler.AZAwareWeightScheduler
    
  3. In /srv/salt/reclass/classes/cluster/<cluster_name>/infra/config/nodes.yml, set the availability_zone parameter for each network or gateway node as required:

    parameters:
      reclass:
        storage:
          node:
            ...
            openstack_gateway_node<id>:
              parameters:
                neutron:
                  gateway:
                    availability_zone: <az-name>
            openstack_gateway_node<id+1>:
              parameters:
                neutron:
                  gateway:
                    availability_zone: <az-name>
           ...
    
  4. Apply the changes:

    salt -C 'I@salt:master' state.sls reclass.storage
    salt -C 'I@neutron:server or I@neutron:gateway' saltutil.refresh_pillar
    salt -C 'I@neutron:server or I@neutron:gateway' state.sls neutron