From: Todd Lyons Date: Wed, 13 Nov 2013 14:45:47 +0000 (-0800) Subject: Updated Installation (markdown) X-Git-Url: https://git.exim.org/buildfarm-client-wiki.git/commitdiff_plain/5d1bdd3c50acf4f98b63343453a812a94570841b Updated Installation (markdown) --- diff --git a/Installation.md b/Installation.md index 1c910ce..61c6a0a 100644 --- a/Installation.md +++ b/Installation.md @@ -37,10 +37,17 @@ This will create the repo checkout in the directory *~/code/*. export PATH="/usr/local/bin:/sbin:/usr/sbin:$PATH" $HOME/code/run_cron.sh --run-all $@ -Then I make my cronjob call: `6 * * * * $HOME/bin/build_farm.sh` +Then I make my cronjob call: `6 * * * * $HOME/bin/build_farm.sh` .... but ... 20. My cronjob ran great for a couple weeks. Then another problem popped up running the cron job in that the test portion suddenly started failing with an odd error:
** runtest error: Failed to open /dev/tty: No such device or address
-This is not a sudo issue, this is because the cron daemon does not give a tty to the cronjob that it starts. To fix this, I used an old ssh trick to start my *build_farm.sh* script: +This is not a sudo issue. This is happening because the cron daemon does not give a tty to the cronjob that it starts. (How the heck did it ever work?) The runtest script needs a tty in normal operation. To fix this, I used an old trick of ssh'ing to localhost with the *-tt* option to **force** allocation of a local tty when starting the *build_farm.sh* script. To do this, you need to configure the **farm** user to use key-based authentication with its own key. Assuming you have not generated an ssh key yet: +
# Press Enter to use defaults for all questions in
+# next command, including no password
+ssh-keygen -t dsa
+cat .ssh/id_dsa.pub >> .ssh/authorized_keys
+# Do the following command once to accept the new host key
+ssh farm@localhost
+Once that works properly, then the cron command changes to:
6 * * * * ssh -tt farm@localhost $HOME/bin/build_farm.sh
## Multiple build clients on one machine