Skip to content

Commit

Permalink
Make edpm_nodes input multi-cell aware.
Browse files Browse the repository at this point in the history
Assume a single cell1 yet.

Remove edpm_computes and computes env var
from tests as it is not multi-cell aware, and should be no longer
needed. The docs still use that env var, it will be removed in
multi-cell adoption follow up, where we also cover EDPM multi-cell
adoption.

This is required as rhe rdo-jobs dependency introduces that
change for edpm_nodes and provides a common base for this and future
multi-cell follow ups.

Signed-off-by: Bohdan Dobrelia <[email protected]>
  • Loading branch information
bogdando committed Dec 17, 2024
1 parent 658849b commit b29825b
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 65 deletions.
39 changes: 19 additions & 20 deletions tests/roles/dataplane_adoption/defaults/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,25 +69,24 @@ default_timesync_ntp_servers:
edpm_node_hostname: standalone.localdomain
edpm_user: root
edpm_nodes:
standalone:
hostName: "{{ edpm_node_hostname }}"
ansible:
ansibleHost: "{{ edpm_node_ip }}"
networks:
- defaultRoute: true
fixedIP: "{{ edpm_node_ip }}"
name: ctlplane
subnetName: subnet1
- name: internalapi
subnetName: subnet1
- name: storage
subnetName: subnet1
- name: tenant
subnetName: subnet1
- name: storagemgmt
subnetName: subnet1
edpm_computes: |-
["{{ edpm_node_hostname }}"]="{{ edpm_node_ip }}"
cell1:
standalone:
hostName: "{{ edpm_node_hostname }}"
ansible:
ansibleHost: "{{ edpm_node_ip }}"
networks:
- defaultRoute: true
fixedIP: "{{ edpm_node_ip }}"
name: ctlplane
subnetName: subnet1
- name: internalapi
subnetName: subnet1
- name: storage
subnetName: subnet1
- name: tenant
subnetName: subnet1
- name: storagemgmt
subnetName: subnet1
# The variables inside edpm_network_config_template are evaluated based
# on the OpenstackDataplaneNodeSet inventory. For adding a variable to the invetory,
# please add it to OpenstackDataplaneNodeSet.nodeTemplate.ansibleVars
Expand Down Expand Up @@ -200,7 +199,7 @@ dataplane_cr: |
value: "-C -o ControlMaster=auto -o ControlPersist=80s"
- name: ANSIBLE_VERBOSITY
value: "{{ dataplane_verbosity | default ('1') }}"
nodes: {{ edpm_nodes }}
nodes: {{ edpm_nodes["cell1"] }}
nodeTemplate:
ansibleSSHPrivateKeySecret: {{ ansible_ssh_private_key_secret }}
ansible:
Expand Down
1 change: 1 addition & 0 deletions tests/roles/dataplane_adoption/vars/ospdo.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Specific OSPdO Adoption vars
# ospdo nodes deployment configuration template
edpm_nodes:
cell1:
compute-0:
# Use a FQDN here to avoid issues with value specified in netconfig.yaml
hostName: compute-0.osptest.test.metalkube.org

Check failure on line 7 in tests/roles/dataplane_adoption/vars/ospdo.yaml

View workflow job for this annotation

GitHub Actions / pre-commit

yaml[indentation]

Wrong indentation: expected 6 but found 8
Expand Down
76 changes: 37 additions & 39 deletions tests/roles/dataplane_adoption/vars/rhev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,45 +40,43 @@ edpm_node_hostname: compute-0.redhat.local
edpm_node2_hostname: compute-1.redhat.local
edpm_user: stack
edpm_nodes:
compute-0:
hostName: "{{ edpm_node_hostname }}"
ansible:
ansibleHost: "{{ edpm_node_ip }}"
networks:
- defaultRoute: true
fixedIP: "{{ edpm_node_ip }}"
name: ctlplane
subnetName: subnet1
- name: internalapi
fixedIP: 172.15.2.10
subnetName: subnet1
- name: tenant
fixedIP: 172.15.0.10
subnetName: subnet1
- name: External
fixedIP: 10.4.0.10
subnetName: subnet1
compute-1:
hostName: "{{ edpm_node2_hostname }}"
ansible:
ansibleHost: "{{ edpm_node2_ip }}"
networks:
- defaultRoute: true
fixedIP: "{{ edpm_node2_ip }}"
name: ctlplane
subnetName: subnet1
- name: internalapi
fixedIP: 172.15.2.11
subnetName: subnet1
- name: tenant
fixedIP: 172.15.0.11
subnetName: subnet1
- name: External
fixedIP: 10.4.0.11
subnetName: subnet1
edpm_computes: |-
["{{ edpm_node_hostname }}"]="{{ edpm_node_ip }}"
["{{ edpm_node2_hostname }}"]="{{ edpm_node2_ip }}"
cell1:
compute-0:
hostName: "{{ edpm_node_hostname }}"
ansible:
ansibleHost: "{{ edpm_node_ip }}"
networks:
- defaultRoute: true
fixedIP: "{{ edpm_node_ip }}"
name: ctlplane
subnetName: subnet1
- name: internalapi
fixedIP: 172.15.2.10
subnetName: subnet1
- name: tenant
fixedIP: 172.15.0.10
subnetName: subnet1
- name: External
fixedIP: 10.4.0.10
subnetName: subnet1
compute-1:
hostName: "{{ edpm_node2_hostname }}"
ansible:
ansibleHost: "{{ edpm_node2_ip }}"
networks:
- defaultRoute: true
fixedIP: "{{ edpm_node2_ip }}"
name: ctlplane
subnetName: subnet1
- name: internalapi
fixedIP: 172.15.2.11
subnetName: subnet1
- name: tenant
fixedIP: 172.15.0.11
subnetName: subnet1
- name: External
fixedIP: 10.4.0.11
subnetName: subnet1
# The variables inside edpm_network_config_template are evaluated based
# on the OpenstackDataplaneNodeSet inventory. For adding a variable to the invetory,
# please add it to OpenstackDataplaneNodeSet.nodeTemplate.ansibleVars
Expand Down
2 changes: 0 additions & 2 deletions tests/roles/stop_remaining_services/defaults/main.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
edpm_node_hostname: standalone.localdomain
install_yamls_path: /home/zuul/src/github.com/openstack-k8s-operators/install_yamls/
edpm_privatekey_path: "{{ install_yamls_path }}/out/edpm/ansibleee-ssh-key-id_rsa"
edpm_computes: |-
["{{ edpm_node_hostname }}"]="{{ edpm_node_ip }}"
4 changes: 0 additions & 4 deletions tests/roles/stop_remaining_services/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
CONTROLLER2_SSH="{{ controller2_ssh }}"
CONTROLLER3_SSH="{{ controller3_ssh }}"
EDPM_PRIVATEKEY_PATH="{{ edpm_privatekey_path }}"
declare -A computes
computes=(
{{ edpm_computes }}
)
- name: stop pacemaker services
no_log: "{{ use_no_log }}"
Expand Down

0 comments on commit b29825b

Please sign in to comment.