-
Robert Schmidt authored
In some pipelines, it happens that iperf3 is hanging on 100% CPU load. In these cases, a simple TERM signal does not seem to be enough to kill it; KILL is necessary. While e.g., RemoteCmd's driver paramiko has a timeout command, the documentation [1] is not really clear how it is trying to stop commands. Since it effectively does not stop, we have to assume it is only sending TERM. To remedy this, use the timeout command to start iperf3. We use option -v for diagnose timeouts on stderr, and send KILL after an additional 3 seconds (-k3) if TERM does not succeed. The timeout is sent to the same duration as the overall iperf timeout. [1] https://docs.paramiko.org/en/3.4/api/channel.html#paramiko.channel.Channel.settimeout
8d16ff84