mirror of https://github.com/zulip/zulip.git
zephyr_mirror: Renew kerberos tickets when starting up class mirror.
(imported from commit 34b0a78558c6f20043efe986a16064387f36f1c0)
This commit is contained in:
parent
a8e28bb99a
commit
605171d1da
|
@ -47,6 +47,8 @@ if options.sync_subscriptions:
|
|||
|
||||
if options.forward_class_messages and not options.noshard:
|
||||
sys.path.append("/home/humbug/humbug")
|
||||
if options.on_startup_command is not None:
|
||||
subprocess.call([options.on_startup_command])
|
||||
from zerver.lib.parallel import run_parallel
|
||||
print "Starting parallel zephyr class mirroring bot"
|
||||
jobs = list("0123456789abcdef")
|
||||
|
|
|
@ -890,6 +890,9 @@ def parse_args():
|
|||
parser.add_option('--site',
|
||||
default=DEFAULT_SITE,
|
||||
help=optparse.SUPPRESS_HELP)
|
||||
parser.add_option('--on-startup-command',
|
||||
default=None,
|
||||
help=optparse.SUPPRESS_HELP)
|
||||
parser.add_option('--user',
|
||||
default=os.environ["USER"],
|
||||
help=optparse.SUPPRESS_HELP)
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
env KRB5CCNAME=/tmp/krb5cc_1000.tmp kinit -k -t /home/humbug/tabbott.extra.keytab tabbott/extra@ATHENA.MIT.EDU; mv /tmp/krb5cc_1000.tmp /tmp/krb5cc_1000
|
|
@ -22,5 +22,5 @@ SHELL=/bin/bash
|
|||
# For more information see the manual pages of crontab(5) and cron(8)
|
||||
#
|
||||
# m h dom mon dow command
|
||||
35 * * * * humbug env KRB5CCNAME=/tmp/krb5cc_1000.tmp kinit -k -t /home/humbug/tabbott.extra.keytab tabbott/extra@ATHENA.MIT.EDU; mv /tmp/krb5cc_1000.tmp /tmp/krb5cc_1000
|
||||
35 * * * * humbug /home/humbug/humbug/bots/zmirror-renew-kerberos
|
||||
*/2 * * * * humbug /home/humbug/humbug/bots/check-mirroring --sharded &> /var/run/nagios/check-mirroring-results-tmp; mv /var/run/nagios/check-mirroring-results-tmp /var/run/nagios/check-mirroring-results
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[program:zmirror]
|
||||
command=python /home/humbug/humbug/bots/zephyr_mirror.py --root-path=/home/humbug/ --user=tabbott/extra --enable-log=/home/humbug/all_zephyrs_log --forward-class-messages --enable-log=/home/humbug/logs/mirror-log
|
||||
command=python /home/humbug/humbug/bots/zephyr_mirror.py --root-path=/home/humbug/ --user=tabbott/extra --enable-log=/home/humbug/all_zephyrs_log --forward-class-messages --enable-log=/home/humbug/logs/mirror-log --on-startup-command="/home/humbug/humbug/bots/zmirror-renew-kerberos"
|
||||
priority=200 ; the relative start priority (default 999)
|
||||
autostart=true ; start at supervisord start (default: true)
|
||||
autorestart=true ; whether/when to restart (default: unexpected)
|
||||
|
|
Loading…
Reference in New Issue