Openstack 17 network gateway not defined as expected
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
-
Edit template to enable network config update.
- name: ComputeRole defaults: network_config: network_config_update: true <<== set true here -
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 }} -
Run new provision.
-
If needed, reboot the new node.
-
Disable network config update only in the template to not cause network outage on a future deploy.
Root Cause
Diagnostic Steps
-
Check on the new compute node the routes created.
[root@compute0 ~]# ip route -
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 -
Check nic-config template for this compute role, the parameter routes normally not contains IP numbers or multiple variables as
*_host_routesor a variable as*_host_routesplus'default': Trueor 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