Openstack 17 network gateway not defined as expected

Solution Verified - Updated -

Environment

  • Red Hat Openstack Plataform 17

Issue

When adding a compute node with specific network/VLAN/DCN to environment, no default gateway is set or is set to ctlplane network gateway.

Resolution

  1. Edit template to enable network config update.

    - name: ComputeRole
    defaults:
      network_config:
        network_config_update: true                                   <<== set true here
    
  2. Correct the route of compute role on nic-config template to use the desired network as default.

    ...
    network_config:
    ...
    - type: vlan
      use_dhcp: false
      dns_servers: {{ ctlplane_dns_nameservers }}
      domain: {{ dns_search_domains }}
      mtu: {{ subnet5_mtu }}
      vlan_id: {{ subnet5_vlan_id }}
      addresses:
      - ip_netmask: {{ subnet5_ip }}/{{ subnet5_cidr }}
      routes: {{ [subnet5_host_routes] | flatten | unique }}
    
  3. Run new provision.

  4. If needed, reboot the new node.

  5. Disable network config update only in the template to not cause network outage on a future deploy.

Root Cause

  • The network templates of RHOSP17 are different from RHOSP16, which can cause some confusion. Also, when upgrading this conversion needs to be reviewed.
  • If no route is set, the default is to set with ctlplane_host_routes.

Diagnostic Steps

  1. Check on the new compute node the routes created.

    [root@compute0 ~]# ip route
    
  2. Check on compute if the os-net-config template generated, if it contains the correct gateway configuration a reboot can be enough. If not, check templates.

    [root@compute0 ~]# cat /etc/os-net-config/config.yaml
    
  3. Check nic-config template for this compute role, the parameter routes normally not contains IP numbers or multiple variables as *_host_routes or a variable as *_host_routes plus 'default': True or is empty.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments