Skip to content

Commit d5f3dcd

Browse files
fultonjclaude
andcommitted
Remove custom OVN ConfigMap/DataPlaneService workaround for DCN
Remove the custom ovncontroller-config-dcn ConfigMap, ovn-dcn DataPlaneService, and DCN nodeset patching that was working around OVN SB connectivity for DCN compute nodes. The standard OVN service uses DNS (ovsdbserver-sb.openstack.svc) which resolves to internalapi IPs via DNSData CRs. With proper routes in the internalapi NAD, the standard mechanism should work without hardcoding tcp:<IP> entries, which also broke TLS scenarios. The NAD route patching is retained as it is still required for macvlan pods to reach DCN subnets. Tracker: OSPRH-30146 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: John Fulton <fulton@redhat.com>
1 parent 2f5f862 commit d5f3dcd

2 files changed

Lines changed: 0 additions & 132 deletions

File tree

tests/roles/dataplane_adoption/defaults/main.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -393,9 +393,6 @@ dataplane_cr: |
393393
ovn_monitor_all: true
394394
edpm_ovn_remote_probe_interval: 60000
395395
edpm_ovn_ofctrl_wait_before_clear: 8000
396-
{% if edpm_ovn_dbs_nodeset is defined -%}
397-
edpm_ovn_dbs: {{ edpm_ovn_dbs_nodeset }}
398-
{%+ endif +%}
399396
nodes:
400397
401398
dpa_dir: "../.."

tests/roles/dataplane_adoption/tasks/main.yaml

Lines changed: 0 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -411,100 +411,11 @@
411411
{% endif %}
412412
{% endfor %}
413413
414-
- name: Get OVN SB internalapi IPs for DCN nodesets
415-
when: edpm_nodes_dcn1 is defined or edpm_nodes_dcn2 is defined
416-
no_log: "{{ use_no_log }}"
417-
ansible.builtin.shell: |
418-
{{ shell_header }}
419-
{{ oc_header }}
420-
421-
# Get internalapi IPs from OVN SB pods
422-
OVN_SB_IPS=""
423-
for pod in ovsdbserver-sb-0 ovsdbserver-sb-1 ovsdbserver-sb-2; do
424-
IP=$(oc get pod -n openstack $pod -o jsonpath='{.metadata.annotations.k8s\.v1\.cni\.cncf\.io/network-status}' | \
425-
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])")
426-
if [ -z "$OVN_SB_IPS" ]; then
427-
OVN_SB_IPS="\"$IP\""
428-
else
429-
OVN_SB_IPS="$OVN_SB_IPS, \"$IP\""
430-
fi
431-
done
432-
433-
echo "[$OVN_SB_IPS]"
434-
register: ovn_sb_ips_result
435-
436-
- name: Set OVN SB IPs fact for DCN nodesets
437-
when: edpm_nodes_dcn1 is defined or edpm_nodes_dcn2 is defined
438-
ansible.builtin.set_fact:
439-
edpm_ovn_dbs_dcn: "{{ ovn_sb_ips_result.stdout | trim | from_json }}"
440-
441-
- name: Create DCN OVN controller ConfigMap with direct IPs
442-
when: edpm_nodes_dcn1 is defined or edpm_nodes_dcn2 is defined
443-
no_log: "{{ use_no_log }}"
444-
ansible.builtin.shell: |
445-
{{ shell_header }}
446-
{{ oc_header }}
447-
448-
# Build ovn-remote connection string from internalapi IPs
449-
OVN_REMOTE="{% for ip in edpm_ovn_dbs_dcn %}tcp:{{ ip }}:6642{% if not loop.last %},{% endif %}{% endfor %}"
450-
451-
# Create ConfigMap for DCN nodes with direct IPs
452-
oc apply -f - <<EOF
453-
apiVersion: v1
454-
kind: ConfigMap
455-
metadata:
456-
name: ovncontroller-config-dcn
457-
namespace: openstack
458-
data:
459-
ovsdb-config: |
460-
ovn-remote: $OVN_REMOTE
461-
EOF
462-
463-
- name: Create DCN-specific OVN DataPlaneService
464-
when: edpm_nodes_dcn1 is defined or edpm_nodes_dcn2 is defined
465-
no_log: "{{ use_no_log }}"
466-
ansible.builtin.shell: |
467-
{{ shell_header }}
468-
{{ oc_header }}
469-
470-
# Create OpenStackDataPlaneService for DCN that uses the DCN ConfigMap
471-
oc apply -f - <<EOF
472-
apiVersion: dataplane.openstack.org/v1beta1
473-
kind: OpenStackDataPlaneService
474-
metadata:
475-
name: ovn-dcn
476-
namespace: openstack
477-
spec:
478-
addCertMounts: false
479-
caCerts: combined-ca-bundle
480-
containerImageFields:
481-
- OvnControllerImage
482-
dataSources:
483-
- configMapRef:
484-
name: ovncontroller-config-dcn
485-
edpmServiceType: ovn
486-
playbook: osp.edpm.ovn
487-
tlsCerts:
488-
default:
489-
contents:
490-
- dnsnames
491-
- ips
492-
issuer: osp-rootca-issuer-ovn
493-
keyUsages:
494-
- digital signature
495-
- key encipherment
496-
- server auth
497-
- client auth
498-
networks:
499-
- ctlplane
500-
EOF
501-
502414
- name: Create OpenStackDataPlaneNodeSet_dcn1
503415
when: edpm_nodes_dcn1 is defined
504416
no_log: "{{ use_no_log }}"
505417
vars:
506418
edpm_ovn_bridge_mappings_nodeset: "{{ edpm_ovn_bridge_mappings_dcn1|default(omit) }}"
507-
edpm_ovn_dbs_nodeset: "{{ edpm_ovn_dbs_dcn }}"
508419
ansible.builtin.shell: |
509420
{{ shell_header }}
510421
CELL=cell1
@@ -521,7 +432,6 @@
521432
no_log: "{{ use_no_log }}"
522433
vars:
523434
edpm_ovn_bridge_mappings_nodeset: "{{ edpm_ovn_bridge_mappings_dcn2|default(omit) }}"
524-
edpm_ovn_dbs_nodeset: "{{ edpm_ovn_dbs_dcn }}"
525435
ansible.builtin.shell: |
526436
{{ shell_header }}
527437
CELL=cell1
@@ -579,45 +489,6 @@
579489
cat nodeset-cell1-dcn2.yaml | oc apply -f -
580490
{%+ endif +%}
581491
582-
- name: Patch DCN nodesets to use ovn-dcn service instead of ovn
583-
when: edpm_nodes_dcn1 is defined or edpm_nodes_dcn2 is defined
584-
no_log: "{{ use_no_log }}"
585-
ansible.builtin.shell: |
586-
{{ shell_header }}
587-
{{ oc_header }}
588-
589-
# Patch dcn1 nodeset if it exists
590-
{% if edpm_nodes_dcn1 is defined %}
591-
if oc get openstackdataplanenodeset dcn1 -n openstack &>/dev/null; then
592-
# Get current services list and replace 'ovn' with 'ovn-dcn'
593-
SERVICES=$(oc get openstackdataplanenodeset dcn1 -n openstack -o jsonpath='{.spec.services}' | \
594-
sed 's/"ovn"/"ovn-dcn"/g')
595-
596-
# Apply the patch
597-
oc patch openstackdataplanenodeset dcn1 -n openstack --type=merge --patch "
598-
spec:
599-
services: $SERVICES
600-
"
601-
echo "Patched dcn1 nodeset to use ovn-dcn service"
602-
fi
603-
{% endif %}
604-
605-
# Patch dcn2 nodeset if it exists
606-
{% if edpm_nodes_dcn2 is defined %}
607-
if oc get openstackdataplanenodeset dcn2 -n openstack &>/dev/null; then
608-
# Get current services list and replace 'ovn' with 'ovn-dcn'
609-
SERVICES=$(oc get openstackdataplanenodeset dcn2 -n openstack -o jsonpath='{.spec.services}' | \
610-
sed 's/"ovn"/"ovn-dcn"/g')
611-
612-
# Apply the patch
613-
oc patch openstackdataplanenodeset dcn2 -n openstack --type=merge --patch "
614-
spec:
615-
services: $SERVICES
616-
"
617-
echo "Patched dcn2 nodeset to use ovn-dcn service"
618-
fi
619-
{% endif %}
620-
621492
# TODO(bogdando): Apply the ceph backend config for Cinder in the original openstack CR, via kustomize perhaps?
622493
- name: prepare the adopted data plane workloads to use Ceph backend for Cinder, if configured so
623494
no_log: "{{ use_no_log }}"

0 commit comments

Comments
 (0)