Skip to content

Commit

Permalink
cmdlib.sh: add env var to sleep before killing tail
Browse files Browse the repository at this point in the history
I can't reproduce this locally, but I have a suspicion that `tail` can
exit too quickly in some circumstances, causing truncated output:

openshift/os#1498 (comment)
coreos#3785 (comment)

Rather than having an unconditional `sleep`, let's make it easier to
test that theory by having an env var we can use to make it optional.
Then we'll test that in CI.

Mid-term, I'd like to revert 79b15c8 soon so we can go back to
virtio-serial which is just so much cleaner.
  • Loading branch information
jlebon committed May 6, 2024
1 parent 065cd2d commit 4d4e284
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/cmdlib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,10 @@ EOF
fi
rc="$(cat "${rc_file}")"

# XXX: this is for debugging temporarily
if [ -n "${TAIL_SLEEP:-}" ]; then
sleep "${TAIL_SLEEP}"
fi
# cleanup tail before nuking dir containing file it's following
kill "$tail_pid"

Expand Down

0 comments on commit 4d4e284

Please sign in to comment.