Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
presto-admin: Remove pty=False from running of init.d scripts
Summary: It doesn't work to run init.d scripts with pty, both via Fabric and via native ssh. However, CentOS and some other OSes have requiretty in their /etc/sudoers file, meaning that you get the error "sudo: sorry, you must have a tty to run sudo". The only way to fix this is to remove the requiretty default in a user's /etc/sudoers file, but we don't want to force them to do that. The work-around is to run the init script in job control mode (e.g. set -m), because it avoids the race condition that is the cause of the daemons not starting when executing commands with TTY. See fabric/fabric#395 (comment) for an in-depth treatment of the issue. We also add || true when running tar, because tar can sometimes have a non-zero exit code even when the files correctly un-tarred. Task: SWARM-363 Review Url: @@review_url@@ Test Plan: make clean lint test-all; manual Reviewers: anu, rschlussel Reviewed By: rschlussel Subscribers: an186016, mf186042 Differential Revision: https://phabricator.td.teradata.com/D395
- Loading branch information
Showing
4 changed files
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters