0a39ba2c54
Normally the named pipe would buffer up to 64k, but in some cases when a soft limit is reached, they will start only buffering up to 4k. In either case, we should not deadlock. This commit changes the pipe-bootstrap command to first buffer all of stdin into the process, before trying to write it to the named pipe. This allows the process memory to act as the buffer, instead of the named pipe. Also changed the order of operations in `makeBootstrapPipe`. The new test added in this PR showed that simply buffering in the process memory was not enough to fix the issue. We also need to ensure that the `pipe-bootstrap` process is started before we try to write to its stdin. Otherwise the write will still block. Also set stdout/stderr on the subprocess, so that any errors are visible to the user. |
||
---|---|---|
.. | ||
pipe-bootstrap | ||
testdata | ||
bootstrap_config.go | ||
bootstrap_config_test.go | ||
bootstrap_tpl.go | ||
envoy.go | ||
envoy_oss_test.go | ||
envoy_test.go | ||
exec_test.go | ||
exec_unix.go | ||
exec_unsupported.go | ||
flags.go | ||
flags_test.go |