Skip to content

Conversation

@nirs
Copy link
Member

@nirs nirs commented Oct 15, 2025

Turns out that iperf3 is using the simple service type:

$ sudo systemctl show iperf3 | grep ^Type=
Type=simple

In this case systemctl start iperf3 does not wait for the service to signal that it is ready to handle requests or has finished initializing, so we may return before the service is ready to serve requests.

We wait now until iperf3 port is in listening state.

Turns out that iperf3 is using the `simple` service type:

    $ sudo systemctl show iperf3 | grep ^Type=
    Type=simple

In this case `systemctl start iperf3` does not wait for the service to
signal that it is ready to handle requests or has finished initializing,
so we may return before the service is ready to serve requests.

We wait now until iperf3 port is in listening state.

Signed-off-by: Nir Soffer <[email protected]>
@nirs nirs requested review from AkihiroSuda and jandubois October 15, 2025 18:00
Copy link
Member

@jandubois jandubois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM

limactl shell vm1 sudo systemctl start iperf3.service
echo "Waiting for iperf3 server ..."
limactl shell vm1 bash -s << EOF
if ! timeout 10s bash -c "until ss -tln | grep -q :5201; do sleep 1; done"; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have picked a longer timeout, like 30s just because the GitHub runners are sometimes so sluggish, but maybe this is enough. At least we get a clear error when it fails.

@jandubois jandubois added this to the v1.2.2 milestone Oct 15, 2025
@jandubois jandubois merged commit 1bf33dc into lima-vm:master Oct 15, 2025
12 checks passed
@nirs nirs deleted the wait-for-iperf3 branch October 15, 2025 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants