Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
almusil committed Dec 3, 2024
1 parent dd39ec2 commit 1d3d2f3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/ovn-fake-multinode-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ jobs:
matrix:
cfg:
- { repo: "${{ github.repository }}", branch: "${{ github.ref_name }}" }
- { repo: ovn-org/ovn, branch: "branch-22.03" }
env:
RUNC_CMD: podman
OS_IMAGE: "fedora:39"
Expand Down Expand Up @@ -78,8 +77,7 @@ jobs:
fail-fast: false
matrix:
cfg:
- { branch: "${{ github.ref_name }}", testsuiteflags: ""}
- { branch: "branch-22.03", testsuiteflags: "-k 'basic test'" }
- { branch: "${{ github.ref_name }}", testsuiteflags: "15"}
name: multinode tests ${{ join(matrix.cfg.*, ' ') }}
env:
RUNC_CMD: podman
Expand Down Expand Up @@ -118,14 +116,10 @@ jobs:
with:
name: test-${{ github.ref_name }}-image

- uses: actions/download-artifact@v4
with:
name: test-branch-22.03-image

- name: Load podman image
run: |
sudo podman load --input ovn_${{ github.ref_name }}_image.tar
sudo podman load --input ovn_branch-22.03_image.tar
- name: Check out ovn-fake-multi-node
uses: actions/checkout@v4
Expand Down
9 changes: 6 additions & 3 deletions tests/multinode-macros.at
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,17 @@ multinode_setup_northd() {
# Sets up controller on specified node.
multinode_setup_controller() {
c=$1
encap_ip=$2
remote_ip=$3
encap_type=${4:-"geneve"}
id=$2
encap_ip=$3
remote_ip=$4
encap_type=${5:-"geneve"}

# Cleanup existing one
m_as $c /usr/share/openvswitch/scripts/ovs-ctl stop
m_as $c /usr/share/ovn/scripts/ovn-ctl stop_controller
m_as $c rm -f /etc/openvswitch/*.db

echo $id
m_as $c /usr/share/openvswitch/scripts/ovs-ctl start --system-id=$id
m_as $c /usr/share/ovn/scripts/ovn-ctl start_controller

Expand Down
14 changes: 12 additions & 2 deletions tests/multinode.at
Original file line number Diff line number Diff line change
Expand Up @@ -2612,12 +2612,12 @@ cleanup_multinode_resources_by_nodes 'ovn-chassis-1 ovn-chassis-2'
# publicp2 (ovn-chassis-4) (30.0.1.3/24)

for i in 1 2; do
ip=$(( 3 + $i ))
chassis="ovn-chassis-$i"
ip=$(m_as $c ip -4 addr show eth1 | grep inet | awk '{print $2}' | cut -d'/' -f1)
echo $chassis

multinode_setup_northd $chassis
multinode_setup_controller $chassis $chassis "170.168.0.$ip" "170.168.0.$ip"
multinode_setup_controller $chassis $chassis $ip $ip

check m_as $chassis ovs-vsctl set open . external_ids:ovn-monitor-all=true
check m_as $chassis ovs-vsctl set open . external_ids:ovn-is-interconn=true
Expand Down Expand Up @@ -2713,6 +2713,16 @@ m_as ovn-chassis-1 /data/create_fake_vm.sh external external 00:00:00:00:20:10 1
m_as ovn-chassis-1 /data/create_fake_vm.sh pod10 pod10 00:00:00:00:10:10 1500 10.100.200.10 24 10.100.200.1 10:200::10/64 10:200::1
m_as ovn-chassis-2 /data/create_fake_vm.sh pod20 pod20 00:00:00:00:10:20 1500 10.100.200.20 24 10.100.200.1 10:200::20/64 10:200::1

echo "Chassis1"
m_as ovn-chassis-1 ovn-sbctl show
m_as ovn-chassis-1 ovn-nbctl show
m_as ovn-chassis-1 ovs-vsctl show

echo "Chassis2"
m_as ovn-chassis-2 ovn-sbctl show
m_as ovn-chassis-2 ovn-nbctl show
m_as ovn-chassis-2 ovs-vsctl show

# We cannot use any of the helpers as they assume that there is only single ovn-northd instance running
check m_as ovn-chassis-1 ovn-nbctl --wait=hv sync
OVS_WAIT_UNTIL([test -n "$(m_as ovn-chassis-1 ovn-sbctl --bare --columns _uuid find Port_Binding logical_port=external up=true)"])
Expand Down

0 comments on commit 1d3d2f3

Please sign in to comment.