From 28767d2802362fb0965e0d72a4c2a237df3f1dae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= Date: Mon, 19 Aug 2024 00:12:18 -0400 Subject: [PATCH] test-incus-network-ovn: Tweak LBHC IP check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber --- bin/test-incus-network-ovn | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/test-incus-network-ovn b/bin/test-incus-network-ovn index fa90013b..d94e6f02 100755 --- a/bin/test-incus-network-ovn +++ b/bin/test-incus-network-ovn @@ -1385,11 +1385,11 @@ ovn_dhcp_reservation_tests() { # Check specifying a static IP is added to DHCP reservations. incus config device set u1 eth0 ipv4.address=10.10.11.200 - [ "$(ovn-nbctl list logical_switch | grep -Fc 'exclude_ips="10.10.11.1 10.10.11.200 10.10.11.254"')" = "1" ] || false + [ "$(ovn-nbctl list logical_switch | grep -Fc 'exclude_ips="10.10.11.1 10.10.11.254 10.10.11.200"')" = "1" ] || false # Check changing static IP is reflected in DHCP reservations. incus config device set u1 eth0 ipv4.address=10.10.11.2 - [ "$(ovn-nbctl list logical_switch | grep -Fc 'exclude_ips="10.10.11.1 10.10.11.2 10.10.11.254"')" = "1" ] || false + [ "$(ovn-nbctl list logical_switch | grep -Fc 'exclude_ips="10.10.11.1 10.10.11.254 10.10.11.2"')" = "1" ] || false # Launch new dynamic IP instance and check its not allocated the reserved IP. incus launch "${instanceImage}" u2 -s default -n ovn1 @@ -1408,13 +1408,13 @@ ovn_dhcp_reservation_tests() { # Check there is only 1 DNS record entry and only 1 reserved instance IP. [ "$(ovn-nbctl list dns | grep -Fc 'records')" = "1" ] || false - [ "$(ovn-nbctl list logical_switch | grep -Fc 'exclude_ips="10.10.11.1 10.10.11.2 10.10.11.254"')" = "1" ] || false + [ "$(ovn-nbctl list logical_switch | grep -Fc 'exclude_ips="10.10.11.1 10.10.11.254 10.10.11.2"')" = "1" ] || false # Delete the new copy which caused the conflict and check the DNS record entry and reserved IP for the original # instance is left alone. incus delete -f u2 [ "$(ovn-nbctl list dns | grep -Fc 'records')" = "1" ] || false - [ "$(ovn-nbctl list logical_switch | grep -Fc 'exclude_ips="10.10.11.1 10.10.11.2 10.10.11.254"')" = "1" ] || false + [ "$(ovn-nbctl list logical_switch | grep -Fc 'exclude_ips="10.10.11.1 10.10.11.254 10.10.11.2"')" = "1" ] || false # Create conflict again, but this time delete the original instance, checking that the DNS record entry is # removed along with the original instance's IP reservation. @@ -1426,7 +1426,7 @@ ovn_dhcp_reservation_tests() { # Check that starting the instance copy creates the missing DNS record entry and IP reservation. incus start u2 [ "$(ovn-nbctl list dns | grep -Fc 'records')" = "1" ] || false - [ "$(ovn-nbctl list logical_switch | grep -Fc 'exclude_ips="10.10.11.1 10.10.11.2 10.10.11.254"')" = "1" ] || false + [ "$(ovn-nbctl list logical_switch | grep -Fc 'exclude_ips="10.10.11.1 10.10.11.254 10.10.11.2"')" = "1" ] || false # Check that deleting the instance copy after successful start removes the DNS record entry and IP allocation. incus delete -f u2