Skip to content

Commit e6e554b

Browse files
authored
net, tests, stuntime: Increase ping granularity (#5158)
##### What this PR does / why we need it: At 0.1s ping interval, any stuntime below 100ms reads as "0.0s" — we can't distinguish between truly seamless migration and one that drops packets for up to 99ms. The finer interval reveals these differences: e.g., L2 bridge client migration `between_non_server_nodes` measured 0.02s (1 lost packet) in Jenkins #5600 — invisible at 0.1s resolution. ##### Which issue(s) this PR fixes: ##### Special notes for reviewer: ##### jira-ticket: <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Tests** * Enhanced network connectivity testing with increased monitoring frequency (10x per second) * Improved stuntime logging precision for more granular diagnostic visibility <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Anat Wax <awax@redhat.com>
1 parent 69535a4 commit e6e554b

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

tests/network/l2_bridge/migration_stuntime/test_migration_stuntime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Stuntime is defined as the connectivity gap from last successful reply before loss
77
to first successful reply after recovery.
88
9-
Stuntime is measured using ICMP ping from client to server in 0.1s intervals.
9+
Stuntime is measured using continuous ICMP ping from client to server.
1010
The under-test VMs are configured with a secondary Linux bridge interface,
1111
on which IPv4/IPv6 static addresses will be defined according to the environment the test runs on.
1212

tests/network/libs/stuntime.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
CLIENT_VM_LABEL: Final[tuple[str, str]] = (STUNTIME_LABEL_KEY, "client")
1616
STUNTIME_THRESHOLD_SECONDS: Final[float] = 5.0
1717
STUNTIME_PING_LOG_PATH: Final[str] = "/tmp/stuntime-ping.log"
18-
PING_INTERVAL_SECONDS: Final[float] = 0.1
18+
PING_INTERVAL_SECONDS: Final[float] = 0.01
1919
DEFAULT_COMMAND_TIMEOUT_SECONDS: Final[int] = 10
2020

2121

@@ -139,5 +139,5 @@ def _compute_stuntime(lost_packets: int) -> float:
139139
"""
140140
# Add +1 to account for the gap from last successful reply before loss to first successful reply after recovery
141141
stuntime = 0.0 if lost_packets == 0 else (lost_packets + 1) * PING_INTERVAL_SECONDS
142-
LOGGER.info(f"Stuntime: {stuntime:.1f}s (from {lost_packets} lost packets)")
142+
LOGGER.info(f"Stuntime: {stuntime:.2f}s (from {lost_packets} lost packets)")
143143
return stuntime

tests/network/localnet/migration_stuntime/test_migration_stuntime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Stuntime is defined as the connectivity gap from last successful reply before loss
77
to first successful reply after recovery.
88
9-
Stuntime is measured using ICMP ping from client to server in 0.1s intervals.
9+
Stuntime is measured using continuous ICMP ping from client to server.
1010
The under-test VMs are configured on an OVN localnet secondary network, with a single interface,
1111
on which IPv4/IPv6 static addresses will be defined according to the environment the test runs on.
1212

0 commit comments

Comments
 (0)