Page MenuHomePhabricator

Automatically start the irc bots
Closed, ResolvedPublic

Description

After server restart, the bot should autostart

Reported by Danny_B on irc

Event Timeline

MarcoAurelio subscribed.

This can be done with the bigbrother option for jstart. I've just restarted both bots via jstart (not jsub) so they should be running in continuous mode now. I'll see how I can configure that so in the event of an outage, they are automatically restarted. Thanks.

MarcoAurelio added a subscriber: Danny_B.

Also, they were not using the trusty release. They're doing it now, however IIRC they intended to phase-out non-trusty instances. I can't find the link to that however.

Okay so I've created a .bigbrotherrc file with the following content:

jstart -N stewardbot -mem 2G -l release=trusty -j y python /data/project/stewardbots/StewardBot/StewardBot.py
jstart -N sulwatcher -mem 2G -l release=trusty -j y python /data/project/stewardbots/SULWatcher/SULWatcher.py

The qstat command gives me now:

tools.stewardbots@tools-bastion-03:~$ qstat
job-ID  prior   name       user         state submit/start at     queue                          slots ja-task-ID
-----------------------------------------------------------------------------------------------------------------
 358869 0.30093 lighttpd-s tools.stewar Rr    08/31/2016 19:57:24 webgrid-lighttpd@tools-webgrid     1
 378082 0.30008 sulwatcher tools.stewar r     09/01/2016 09:12:54 continuous@tools-exec-1405.eqi     1
 378305 0.30007 stewardbot tools.stewar r     09/01/2016 09:21:49 continuous@tools-exec-1404.eqi     1

Will this work @valhallasw ?

Mentioned in SAL [2016-09-01T10:36:23Z] <mafk> Created a .bigbrotherrc file to autorestart bots (T144461)

I think this is resolved. If you disagree, please reopen with your reasons.

@valhallasw So, it was something "external" to our tools? I mean, is the bigbrother file of tools.stewardbots correctly written?

A couple of days ago I received an email from bigbrother saying that it restarted a job. Maybe that means that this is now working as expected?

MarcoAurelio moved this task from General to StewardBot on the stewardbots board.

I think this is resolved. If you disagree, please reopen.