diff --git a/tests/roles/dataplane_adoption/defaults/main.yaml b/tests/roles/dataplane_adoption/defaults/main.yaml index d7f88de33..7881ede4c 100644 --- a/tests/roles/dataplane_adoption/defaults/main.yaml +++ b/tests/roles/dataplane_adoption/defaults/main.yaml @@ -393,9 +393,6 @@ dataplane_cr: | ovn_monitor_all: true edpm_ovn_remote_probe_interval: 60000 edpm_ovn_ofctrl_wait_before_clear: 8000 - {% if edpm_ovn_dbs_nodeset is defined -%} - edpm_ovn_dbs: {{ edpm_ovn_dbs_nodeset }} - {%+ endif +%} nodes: dpa_dir: "../.." diff --git a/tests/roles/dataplane_adoption/tasks/main.yaml b/tests/roles/dataplane_adoption/tasks/main.yaml index 0b383ecf1..806329047 100644 --- a/tests/roles/dataplane_adoption/tasks/main.yaml +++ b/tests/roles/dataplane_adoption/tasks/main.yaml @@ -411,100 +411,11 @@ {% endif %} {% endfor %} -- name: Get OVN SB internalapi IPs for DCN nodesets - when: edpm_nodes_dcn1 is defined or edpm_nodes_dcn2 is defined - no_log: "{{ use_no_log }}" - ansible.builtin.shell: | - {{ shell_header }} - {{ oc_header }} - - # Get internalapi IPs from OVN SB pods - OVN_SB_IPS="" - for pod in ovsdbserver-sb-0 ovsdbserver-sb-1 ovsdbserver-sb-2; do - IP=$(oc get pod -n openstack $pod -o jsonpath='{.metadata.annotations.k8s\.v1\.cni\.cncf\.io/network-status}' | \ - python3 -c "import sys, json; data=json.load(sys.stdin); print([n for n in data if 'internalapi' in n.get('name','')][0]['ips'][0])") - if [ -z "$OVN_SB_IPS" ]; then - OVN_SB_IPS="\"$IP\"" - else - OVN_SB_IPS="$OVN_SB_IPS, \"$IP\"" - fi - done - - echo "[$OVN_SB_IPS]" - register: ovn_sb_ips_result - -- name: Set OVN SB IPs fact for DCN nodesets - when: edpm_nodes_dcn1 is defined or edpm_nodes_dcn2 is defined - ansible.builtin.set_fact: - edpm_ovn_dbs_dcn: "{{ ovn_sb_ips_result.stdout | trim | from_json }}" - -- name: Create DCN OVN controller ConfigMap with direct IPs - when: edpm_nodes_dcn1 is defined or edpm_nodes_dcn2 is defined - no_log: "{{ use_no_log }}" - ansible.builtin.shell: | - {{ shell_header }} - {{ oc_header }} - - # Build ovn-remote connection string from internalapi IPs - OVN_REMOTE="{% for ip in edpm_ovn_dbs_dcn %}tcp:{{ ip }}:6642{% if not loop.last %},{% endif %}{% endfor %}" - - # Create ConfigMap for DCN nodes with direct IPs - oc apply -f - </dev/null; then - # Get current services list and replace 'ovn' with 'ovn-dcn' - SERVICES=$(oc get openstackdataplanenodeset dcn1 -n openstack -o jsonpath='{.spec.services}' | \ - sed 's/"ovn"/"ovn-dcn"/g') - - # Apply the patch - oc patch openstackdataplanenodeset dcn1 -n openstack --type=merge --patch " - spec: - services: $SERVICES - " - echo "Patched dcn1 nodeset to use ovn-dcn service" - fi - {% endif %} - - # Patch dcn2 nodeset if it exists - {% if edpm_nodes_dcn2 is defined %} - if oc get openstackdataplanenodeset dcn2 -n openstack &>/dev/null; then - # Get current services list and replace 'ovn' with 'ovn-dcn' - SERVICES=$(oc get openstackdataplanenodeset dcn2 -n openstack -o jsonpath='{.spec.services}' | \ - sed 's/"ovn"/"ovn-dcn"/g') - - # Apply the patch - oc patch openstackdataplanenodeset dcn2 -n openstack --type=merge --patch " - spec: - services: $SERVICES - " - echo "Patched dcn2 nodeset to use ovn-dcn service" - fi - {% endif %} - # TODO(bogdando): Apply the ceph backend config for Cinder in the original openstack CR, via kustomize perhaps? - name: prepare the adopted data plane workloads to use Ceph backend for Cinder, if configured so no_log: "{{ use_no_log }}"