HomeClusterLabs Projects

azure-lb: Redirect stdout and stderr to /dev/null

Description

azure-lb: Redirect stdout and stderr to /dev/null

This fixes a regression introduced in commit d22700fc.

When the nc listener process created by an azure-lb resource attempts to
write to stdout, it dies with an EPIPE error.

This can happen when random/garbage input is sent to the nc listener, as
may happen during a port scan. For example, if the listener is on port
62000, and a client sends some text (e.g., `echo test | nc node1
62000`), then the listener attempts to echo "test" to its stdout. This
fails with an EPIPE.

Prior to commit d22700fc, all output was redirected to the pid file.
This caused its own problems, but it prevented this particular behavior.

The fix is to redirect the listener's stdout and stderr to /dev/null.

Resolves: RHBZ#1937142
Resolves: RHBZ#1937151

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>

Details

Provenance
nrwahl2Authored on Mar 9 2021, 9:32 PM
Parents
rR760680df771b: azure-lb: Be quiet during stop operation
Branches
Unknown
Tags
Unknown

Event Timeline