Combine create_unix_user commands to single command
Add multiline cmd helper to sshable
We consolidate multiple cmd commands into a single multiline command
to reduce network overhead during time-sensitive tasks. Since the script
has multiple commands, we wrote some comments to explain what each
command does. But we don't need to send comments and empty lines to the
server. We can remove them before sending the commands to the server.
GithubRunner has an example of it. I moved this helper to more common
place to use it in other places.
Combine create_unix_user commands to single command
We cache SSH connections to our host to run commands more quickly. Even for short commands, the network adds ~0.4s of overhead. Previously, we achieved a few seconds of gain by merging multiple commands into a single one in GithubRunner, which makes a significant difference in time-sensitive operations.
We can also consolidate the create_unix_user commands into a single
command. Additionally, I have relocated sudo usermod -a -G kvm #{q_vm}
from the prep label to this command, as it is more logical to execute
it here. I will remove it from the prep label in the next commit. If
there are any strands that have already passed create_unix_user but
haven't run prep yet. Since this operation is idempotent, it's safe to
run it multiple times.
Remove duplicate command from prep label
I relocated it from prep to create_unix_user in the previous commit.
I removed it in this commit for a smoother deployment.
Reduce sleep time in vm provisioning from 12 to 10 seconds
In the wait_sshable label, we initially set a long sleep time because
we expected the first run to take some time. The sleep time was
initially set at 12 seconds. However, we noticed that some duration
times were approaching this 12-second mark. As a result, we decided to
decrease the sleep time to 10 seconds.