Skip to content

Commit

Permalink
tests/network-ovn: Check we can query ACL logs for an OVN network wit…
Browse files Browse the repository at this point in the history
…h its OVN controller in a MicroOVN snap

Signed-off-by: Gabriel Mougard <[email protected]>
  • Loading branch information
gabrielmougard committed Oct 29, 2024
1 parent cd985c3 commit 41725e2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ jobs:
- interception
- network-bridge-firewall
- network-ovn
- network-ovn "microovn"
- network-routed
- pylxd
- snapd
Expand Down
30 changes: 18 additions & 12 deletions tests/network-ovn
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
#!/bin/bash
set -eux

# Install dependencies
install_deps ovn-host ovn-central bind9-dnsutils jq

# Install LXD
install_lxd

# Configure OVN.
ovs-vsctl set open_vswitch . \
external_ids:ovn-remote=unix:/var/run/ovn/ovnsb_db.sock \
external_ids:ovn-encap-type=geneve \
external_ids:ovn-encap-ip=127.0.0.1

# Empty controller log so ACL log checks are consistent over repeat runs.
echo "" > /var/log/ovn/ovn-controller.log

# Configure LXD.
lxc project switch default
lxc storage create default zfs

if [ $# -eq 0 ]; then
# Install dependencies
install_deps ovn-host ovn-central bind9-dnsutils jq

# Configure OVN.
ovs-vsctl set open_vswitch . \
external_ids:ovn-remote=unix:/var/run/ovn/ovnsb_db.sock \
external_ids:ovn-encap-type=geneve \
external_ids:ovn-encap-ip=127.0.0.1

# Empty controller log so ACL log checks are consistent over repeat runs.
echo "" > /var/log/ovn/ovn-controller.log
elif [ "$1" == "microovn" ]; then
snap install microovn --channel=22.03/stable
microovn cluster bootstrap
lxc config set network.ovn.northbound_connection unix:/var/snap/microovn/common/run/ovn/ovnnb_db.sock
fi

# XXX: known DNS resolution on for .lxd domain with 24.04 instances
IMAGE="${TEST_IMG:-ubuntu-daily:22.04}"

Expand Down

0 comments on commit 41725e2

Please sign in to comment.