Skip to content

Commit

Permalink
Enable ovn-octavia in CI (#2307)
Browse files Browse the repository at this point in the history
This commit enables ovn-octavia in the CI by:
* Updating DevStack to stable/2023.1 (Antelope)
* Switches CI to use OVN as a Neutron backend. It's the default, we
  should use it.
* Enables ovn-octavia installation.
* Adds some debugging info to LB tests, so that debugging issues with
  this code will be easier in the future.
  • Loading branch information
dulek authored Sep 6, 2023
1 parent 91695ae commit b155baf
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 10 deletions.
32 changes: 32 additions & 0 deletions tests/playbooks/roles/install-cpo-occm/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@

- name: Run functional tests for openstack-cloud-controller-manager
when: run_e2e
register: run_tests
shell:
executable: /bin/bash
cmd: |
Expand All @@ -125,3 +126,34 @@
GATEWAY_IP=172.24.5.1 \
DEVSTACK_OS_RC={{ devstack_workdir }}/openrc \
bash tests/e2e/cloudprovider/test-lb-service.sh
timeout: 3600
ignore_errors: true

- name: Print logs for debugging
when:
- run_e2e
- run_tests.failed
block:
- name: Show openstack-cloud-controller-manager pod logs
shell:
executable: /bin/bash
cmd: |
kubectl -n kube-system logs daemonset/openstack-cloud-controller-manager
- name: Show Octavia logs
become: true
shell:
executable: /bin/bash
cmd: |
sudo journalctl -u [email protected] --no-pager
- name: Show Neutron logs
become: true
shell:
executable: /bin/bash
cmd: |
sudo journalctl -u [email protected] --no-pager
- name: &failmsg2 Stop due to prior failure of tests
fail:
msg: *failmsg2
3 changes: 2 additions & 1 deletion tests/playbooks/roles/install-devstack/defaults/main.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
---
user: "stack"
workdir: "/home/{{ user }}/devstack"
branch: "stable/zed"
branch: "stable/2023.1"
enable_services:
- nova
- glance
- cinder
- neutron
- octavia
- ovn-octavia
- barbican
octavia_amphora_url: "https://tarballs.opendev.org/openstack/octavia/test-images/test-only-amphora-x64-haproxy-ubuntu-focal.qcow2"
octavia_amphora_dir: /opt/octavia-amphora
Expand Down
29 changes: 20 additions & 9 deletions tests/playbooks/roles/install-devstack/templates/local.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,24 @@ enable_service c-sch
# Neutron
enable_plugin neutron ${GIT_BASE}/openstack/neutron.git {{ branch }}
enable_service q-svc
enable_service q-agt
enable_service q-dhcp
enable_service q-l3
enable_service q-meta
enable_service q-ovn-metadata-agent
enable_service q-trunk
enable_service q-qos
enable_service ovn-controller
enable_service ovn-northd
enable_service ovs-vswitchd
enable_service ovsdb-server

ML2_L3_PLUGIN="ovn-router,trunk,qos"
OVN_L3_CREATE_PUBLIC_NETWORK="True"
PUBLIC_BRIDGE_MTU="1430"

IP_VERSION=4
IPV4_ADDRS_SAFE_TO_USE=10.1.0.0/26
FIXED_RANGE=10.1.0.0/26
NETWORK_GATEWAY=10.1.0.1
FLOATING_RANGE=172.24.5.0/24
PUBLIC_NETWORK_GATEWAY=172.24.5.1
Q_PLUGIN=ml2
Q_ML2_TENANT_NETWORK_TYPE=vxlan
Q_DVR_MODE=legacy
Q_AGENT=openvswitch
Q_ML2_PLUGIN_MECHANISM_DRIVERS=openvswitch
{% endif %}

{% if "octavia" in enable_services %}
Expand All @@ -75,6 +78,7 @@ enable_service octavia
enable_service o-cw
enable_service o-hm
enable_service o-hk
enable_service o-da
enable_service o-api

LIBS_FROM_GIT+=,python-octaviaclient
Expand All @@ -89,6 +93,10 @@ OCTAVIA_AMP_IMAGE_FILE={{ octavia_amphora_dir }}/{{ octavia_amphora_filename }}
{% endif %}
{% endif %}

{% if "ovn-octavia" in enable_services %}
enable_plugin ovn-octavia-provider https://opendev.org/openstack/ovn-octavia-provider {{ branch }}
{% endif %}

{% if "barbican" in enable_services %}
# Barbican
enable_plugin barbican ${GIT_BASE}/openstack/barbican.git {{ branch }}
Expand Down Expand Up @@ -130,6 +138,9 @@ global_physnet_mtu = 1430
[[post-config|$OCTAVIA_CONF]]
[api_settings]
allow_tls_terminated_listeners = True
{% if "ovn-octavia" in enable_services %}
enabled_provider_drivers = amphora:'Octavia Amphora driver',ovn:'Octavia OVN driver'
{% endif %}
[controller_worker]
loadbalancer_topology = SINGLE
amp_active_retries = 60
Expand Down
1 change: 1 addition & 0 deletions tests/playbooks/test-occm-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- cinder
- neutron
- octavia
- ovn-octavia
- barbican
- role: install-k3s
worker_node_count: 0
Expand Down

0 comments on commit b155baf

Please sign in to comment.