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 named ocpbm) is
a ci-framework "management" network and should not be included in the
EDPM nodeset configs.

Jira: OSPRH-1301
  • Loading branch information
hjensas committed Feb 3, 2025
1 parent e008438 commit dd7614c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
4 changes: 4 additions & 0 deletions roles/adoption_osp_deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ deployment. Defaults to `pool.ntp.org`
* `cifmw_adoption_osp_deploy_stopper`: (String) Step at which to stop the run. See `Break point` section below for possible values.
* `cifmw_adoption_osp_deploy_scenario`: (Dict) Define the parameter to
configure the OSP17.1 deployment.
* `cifmw_adoption_osp_deploy_adoption_vars_exclude_nets`: (List) Name of
networks in the ci-framework Network Mapper data to exclude when generating
the adoption variables. By default it excludes the ci-framework "public"
network (ospbm).

### Break point

Expand Down
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 dd7614c

Please sign in to comment.