If the system doesn't have an interface in the same subnet as
192.168.1.1, unit tests fail on the logs check, due to the following
warnings from OVS:

 |collectors|WARN|couldn't open connection to collector
                  192.168.1.1 (Network is unreachable)
 |ipfix|WARN|no collectors could be initialized, IPFIX exporter disabled

Use localhost address instead, it's more likely to be reachable.

Fixes: 5b1476709d7c ("controller: only sample flow if Collector Set exists")
Signed-off-by: Ilya Maximets <[email protected]>
---
 tests/ovn-performance.at | 6 +++---
 tests/ovn.at             | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/ovn-performance.at b/tests/ovn-performance.at
index 4ddb1bd81..2bccbb06d 100644
--- a/tests/ovn-performance.at
+++ b/tests/ovn-performance.at
@@ -585,20 +585,20 @@ OVN_CONTROLLER_EXPECT_NO_HIT(
 OVN_CONTROLLER_EXPECT_HIT(
     [hv1], [lflow_run],
     [as hv1 ovs-vsctl --id=@br get Bridge br-int --  \
-        --id=@i create IPFIX targets=\"192.168.1.1\"  -- \
+        --id=@i create IPFIX targets=\"127.0.0.1\"  -- \
         create Flow_Sample_Collector_Set bridge=@br id=1 ipfix=@i]
 )
 
 OVN_CONTROLLER_EXPECT_NO_HIT(
     [hv3], [lflow_run],
     [as hv2 ovs-vsctl --id=@br get Bridge br-int --  \
-        --id=@i create IPFIX targets=\"192.168.1.1\"  -- \
+        --id=@i create IPFIX targets=\"127.0.0.1\"  -- \
         create Flow_Sample_Collector_Set bridge=@br id=1 ipfix=@i]
 )
 
 OVN_CONTROLLER_EXPECT_NO_HIT(
     [hv1], [lflow_run],
-    [as hv1 ovs-vsctl set IPFIX . targets=\"192.168.1.2\"]
+    [as hv1 ovs-vsctl set IPFIX . targets=\"127.0.0.1\"]
 )
 
 OVN_CONTROLLER_EXPECT_HIT(
diff --git a/tests/ovn.at b/tests/ovn.at
index d7f173c90..80e9e003f 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -37686,7 +37686,7 @@ check_sample_drops() {
     fi
 
     ovs-vsctl --id=@br get Bridge br-int --  \
-        --id=@i create IPFIX targets=\"192.168.1.1\"  -- \
+        --id=@i create IPFIX targets=\"127.0.0.1\"  -- \
         create Flow_Sample_Collector_Set bridge=@br id=123 ipfix=@i
 
     check ovn-nbctl -- set NB_Global . options:debug_drop_collector_set="123" \
-- 
2.52.0

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to