Skip to content

Commit

Permalink
Fix adoption_vars, only one defaultRoute, no ocbpm net
Browse files Browse the repository at this point in the history
With PR# 2548 support was added for multiple edpm nodesets, these may
not have the same networks attached - i.e Compute and Networkere nodes
have different network needs. When introducing this support the
`networks` was made dynamic, and the `defaultRoute` was set for every
network.

Only one network can have the `defaultRoute`, this caused an error when
deploying the openstackdataplanenodeset.

Restore the behaviour prior to PR# 2548 - which would only set
`defaultRoute` for the `ctlplane` network.

Also, filter the cifmw_libvirt_manager_pub_net when generating networks
for edpm_nodes. cifmw_libvirt_manager_pub_net (typically names ocpbm) is
a ci-framework "management" network and should not be included in the
nodeset configs.

Jira: OSPRH-1301
  • Loading branch information
hjensas committed Jan 29, 2025
1 parent 475d689 commit 9831c8c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
3 changes: 3 additions & 0 deletions roles/adoption_osp_deploy/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ cifmw_adoption_osp_deploy_repos:
- openstack-17.1-for-rhel-9-x86_64-rpms
- fast-datapath-for-rhel-9-x86_64-rpms
- rhceph-7-tools-for-rhel-9-x86_64-rpms

cifmw_adoption_osp_deploy_adoption_vars_exclude_nets:
- "{{ cifmw_libvirt_manager_pub_net | default("ocpbm") }}
16 changes: 10 additions & 6 deletions roles/adoption_osp_deploy/templates/adoption_vars.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,13 @@ edpm_nodes:
ansible:
ansibleHost: {{ node_nets.networks.ctlplane.ip_v4 }}
networks:
{% for net in node_nets.networks.keys() %}
- defaultRoute: true
fixedIP: {{ node_nets.networks[net].ip_v4 }}
{% for net in node_nets.networks.keys() if net not in cifmw_adoption_osp_deploy_adoption_vars_exclude_nets %}
- fixedIP: {{ node_nets.networks[net].ip_v4 }}
name: {{ net }}
subnetName: subnet1
{% if net == 'ctlplane' %}
defaultRoute: true
{% endif %}
{% endfor %}
{% endfor %}
{% for networker in _vm_groups['osp-networkers'] | default([]) %}
Expand All @@ -43,11 +45,13 @@ edpm_nodes:
ansible:
ansibleHost: {{ node_nets.networks.ctlplane.ip_v4 }}
networks:
{% for net in node_nets.networks.keys() %}
- defaultRoute: true
fixedIP: {{ node_nets.networks[net].ip_v4 }}
{% for net in node_nets.networks.keys() if net not in cifmw_adoption_osp_deploy_adoption_vars_exclude_nets %}
- fixedIP: {{ node_nets.networks[net].ip_v4 }}
name: {{ net }}
subnetName: subnet1
{% if net == 'ctlplane' %}
defaultRoute: true
{% endif %}
{% endfor %}
{% endfor %}

Expand Down

0 comments on commit 9831c8c

Please sign in to comment.