Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Install Telegraf over SSH with pty=False
There were cases where Telegraf failed to start when deployed over SSH even though the installation script completed with exit code 0. Running the script by hand in a terminal, after having SSH'ed to a random VM, returns no errors and Telegraf starts successfully. It turns out this weird behavior has to do with jobs and sessions when daemonizing processes. When we run a command over SSH with pty=True and the session leader (shell) exits, a SIGHUP will be sent to the parent process' process group, which includes the daemonized Telegraf bin. On the other hand, when pty=False, the new shell connects to stdin/stdout/stderr, which are then inherited by its child processes, thus allowing them to run in the background after the parent process has exited. For more details, see: fabric/fabric#395
- Loading branch information