chore: fix ovn metadata agent + add debug job
diff --git a/.github/workflows/ceph.yml b/.github/workflows/ceph.yml
index 402b72e..b912b1e 100644
--- a/.github/workflows/ceph.yml
+++ b/.github/workflows/ceph.yml
@@ -28,7 +28,7 @@
default: false
jobs:
- debug:
+ ovs-debug:
runs-on: ubuntu-20.04-16-cores
if: github.event_name == 'workflow_dispatch' && inputs.debug_enabled
steps:
@@ -95,6 +95,46 @@
- name: Run Molecule
run: poetry run molecule test -s ceph
+ ovn-debug:
+ runs-on: ubuntu-20.04-16-cores
+ if: github.event_name == 'workflow_dispatch' && inputs.debug_enabled
+ steps:
+ - name: Checkout project
+ uses: actions/checkout@v3
+
+ - name: Install Poetry
+ run: pipx install poetry
+
+ - name: Setup Python
+ uses: actions/setup-python@v4
+ with:
+ cache: poetry
+
+ - name: Install dependencies
+ run: poetry install --no-interaction --with dev
+
+ # NOTE(mnaser): LVM commands take a long time if there are any existing
+ # loop devices created by "snapd", so we uninstall it.
+ - name: Uninstall "snapd"
+ run: sudo apt-get purge -y snapd
+
+ - name: Turn off swap
+ run: sudo swapoff -a
+
+ - name: Run Molecule Converge
+ run: poetry run molecule converge -s ceph
+ env:
+ OVN_ENABLED: true
+
+ # Enable tmate debugging of manually-triggered workflows if the input option was provided
+ - name: Setup tmate session
+ if: ${{ failure() }}
+ uses: mxschmitt/action-tmate@v3
+ timeout-minutes: 60
+
+ - name: Run Molecule Destroy
+ run: poetry run molecule destroy -s ceph
+
ovn:
runs-on: ubuntu-20.04-16-cores
if: github.event_name != 'workflow_dispatch' || !inputs.debug_enabled
diff --git a/roles/neutron/vars/main.yml b/roles/neutron/vars/main.yml
index 5ce4997..0ee5396 100644
--- a/roles/neutron/vars/main.yml
+++ b/roles/neutron/vars/main.yml
@@ -81,6 +81,16 @@
ovn_metadata_enabled: true
ovn_nb_connection: "{% for n in range(ovn_helm_values.get('pod', {}).get('replicas', {}).get('ovn_ovsdb_nb', 3)) %}tcp:ovn-ovsdb-nb-{{ n }}.{{ neutron_helm_release_namespace }}.svc.cluster.local:6643{% if not loop.last %},{% endif %}{% endfor %}"
ovn_sb_connection: "{% for n in range(ovn_helm_values.get('pod', {}).get('replicas', {}).get('ovn_ovsdb_sb', 3)) %}tcp:ovn-ovsdb-sb-{{ n }}.{{ neutron_helm_release_namespace }}.svc.cluster.local:6642{% if not loop.last %},{% endif %}{% endfor %}"
+ ovn_metadata_agent:
+ DEFAULT:
+ nova_metadata_host: nova-metadata.openstack.svc.cluster.local
+ metadata_proxy_shared_secret: "{{ openstack_helm_endpoints['compute_metadata']['secret'] }}"
+ metadata_workers: 2
+ cache:
+ enabled: true
+ backend: dogpile.cache.memcached
+ ovs:
+ ovsdb_connection: unix:/run/openvswitch/db.sock
plugins:
ml2_conf:
ml2:
@@ -95,26 +105,3 @@
daemonset_metadata_agent: false
daemonset_ovn_metadata_agent: true
daemonset_ovs_agent: false
-
- # conf:
- # plugins:
- # ml2_conf:
- # ml2:
- # extension_drivers: port_security
- # mechanism_drivers: ovn
- # ovn_metadata_agent:
- # DEFAULT:
- # nova_metadata_port: 8775
- # metadata_proxy_shared_secret: "{{ openstack_helm_endpoints['compute_metadata']['secret'] }}"
- # metadata_workers: 8
- # nova_metadata_host: __NOVA_METADATA_SERVICE_HOST__
- # cache:
- # enabled: true
- # backend: dogpile.cache.memcached
- # ovs:
- # ovsdb_connection: tcp:127.0.0.1:6640
- # ovsdb_timeout: 180
- # ovn:
- # ovn_metadata_enabled: true
- # ovn_nb_connection: tcp:__OVN_NB_DB_SERVICE_HOST__:__OVN_NB_DB_SERVICE_PORT__
- # ovn_sb_connection: tcp:__OVN_SB_DB_SERVICE_HOST__:__OVN_SB_DB_SERVICE_PORT__