Skip to content
Snippets Groups Projects
Commit 9c233417 authored by Iustin Pop's avatar Iustin Pop
Browse files

Make utils.RunCmd() deal with interleaved stdout/stderr

Currently, RunCmd is written with the assumption that programs will have
a small stderr output, therefore we read the child's stdout (which can
be big, so we don't want to block the child) and then the stderr (which
is small, so it shouldn't block).

However, with the ‘gnt-cluster verify-disks’ command, we ourselves
generate heavy stderr, therefore we break the ganeti-watcher which runs
the verify-disks via utils.RunCmd.

This patch turns the RunCmd command into an poll-based one, which means
any kind of interleaved output by a child on stdout/stderr will be
handled correctly. Of course, since the output is buffered in memory,
there are other ways to break RunCmd(). But at least this should fix the
common case.

Reviewed-by: hansmi
parent 30989e69
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment