Resilience: add pidfiles in PBS.

parent 92ee0c3d
...@@ -142,6 +142,7 @@ class Recipe(GenericSlapRecipe, Notify, Callback): ...@@ -142,6 +142,7 @@ class Recipe(GenericSlapRecipe, Notify, Callback):
command=self.options['rdiffbackup-binary'], command=self.options['rdiffbackup-binary'],
parameters=rdiffbackup_parameter_list, parameters=rdiffbackup_parameter_list,
comments=comments, comments=comments,
pidfile=os.path.join(self.options['run-directory'], '%s_raw.pid' % slave_id),
) )
elif slave_type == 'pull': elif slave_type == 'pull':
# Wrap rdiff-backup call into a script that checks consistency of backup # Wrap rdiff-backup call into a script that checks consistency of backup
...@@ -193,6 +194,7 @@ class Recipe(GenericSlapRecipe, Notify, Callback): ...@@ -193,6 +194,7 @@ class Recipe(GenericSlapRecipe, Notify, Callback):
title=entry.get('title', slave_id), title=entry.get('title', slave_id),
notification_url=entry['notify'], notification_url=entry['notify'],
feed_url='%s/get/%s' % (self.options['notifier-url'], entry['notification-id']), feed_url='%s/get/%s' % (self.options['notifier-url'], entry['notification-id']),
pidfile=os.path.join(self.options['run-directory'], '%s.pid' % slave_id)
) )
path_list.append(notifier_wrapper) path_list.append(notifier_wrapper)
......
...@@ -55,7 +55,7 @@ mode = 0644 ...@@ -55,7 +55,7 @@ mode = 0644
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-pull-backup.cfg.in url = ${:_profile_base_location_}/instance-pull-backup.cfg.in
output = ${buildout:directory}/instance-pull-backup.cfg output = ${buildout:directory}/instance-pull-backup.cfg
md5sum = b19d8dae67f70bdb455b80a64262d77e md5sum = c49e5911b94078d87b94507fb4efc93b
mode = 0644 mode = 0644
[template-replicated] [template-replicated]
......
...@@ -105,6 +105,7 @@ promises-directory = $${basedirectory:promises} ...@@ -105,6 +105,7 @@ promises-directory = $${basedirectory:promises}
directory = $${directory:pbs-backup} directory = $${directory:pbs-backup}
cron-entries = $${cron:cron-entries} cron-entries = $${cron:cron-entries}
wrappers-directory = $${directory:pbs-wrappers} wrappers-directory = $${directory:pbs-wrappers}
run-directory = $${basedirectory:run}
# XXX: this should be named "notifier-host" # XXX: this should be named "notifier-host"
notifier-url = http://[$${notifier:host}]:$${notifier:port} notifier-url = http://[$${notifier:host}]:$${notifier:port}
slave-instance-list = $${slap-parameter:slave_instance_list} slave-instance-list = $${slap-parameter:slave_instance_list}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment