Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xiaohe Cao
slapos
Commits
6ae98bfe
Commit
6ae98bfe
authored
Aug 29, 2013
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resiliency: Use new pidfile option.
parent
15642ba1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
2 deletions
+11
-2
slapos/recipe/notifier.py
slapos/recipe/notifier.py
+3
-1
stack/resilient/buildout.cfg
stack/resilient/buildout.cfg
+1
-1
stack/resilient/pbsready-export.cfg.in
stack/resilient/pbsready-export.cfg.in
+7
-0
No files found.
slapos/recipe/notifier.py
View file @
6ae98bfe
...
@@ -64,7 +64,7 @@ class Callback(GenericBaseRecipe):
...
@@ -64,7 +64,7 @@ class Callback(GenericBaseRecipe):
class
Notify
(
GenericBaseRecipe
):
class
Notify
(
GenericBaseRecipe
):
def
createNotifier
(
self
,
notifier_binary
,
wrapper
,
executable
,
def
createNotifier
(
self
,
notifier_binary
,
wrapper
,
executable
,
log
,
title
,
notification_url
,
feed_url
):
log
,
title
,
notification_url
,
feed_url
,
pidfile
=
None
):
if
not
os
.
path
.
exists
(
log
):
if
not
os
.
path
.
exists
(
log
):
# Just a touch
# Just a touch
...
@@ -82,6 +82,7 @@ class Notify(GenericBaseRecipe):
...
@@ -82,6 +82,7 @@ class Notify(GenericBaseRecipe):
return
self
.
createWrapper
(
name
=
wrapper
,
return
self
.
createWrapper
(
name
=
wrapper
,
command
=
notifier_binary
,
command
=
notifier_binary
,
parameters
=
parameters
,
parameters
=
parameters
,
pidfile
=
pidfile
,
comments
=
[
comments
=
[
''
,
''
,
'Call an executable and send notification(s).'
,
'Call an executable and send notification(s).'
,
...
@@ -101,6 +102,7 @@ class Notify(GenericBaseRecipe):
...
@@ -101,6 +102,7 @@ class Notify(GenericBaseRecipe):
executable
=
options
[
'executable'
],
executable
=
options
[
'executable'
],
log
=
log
,
log
=
log
,
title
=
options
[
'title'
],
title
=
options
[
'title'
],
pidfile
=
options
[
'pidfile'
],
notification_url
=
options
[
'notify'
],
notification_url
=
options
[
'notify'
],
feed_url
=
feed_url
)
feed_url
=
feed_url
)
return
[
script
]
return
[
script
]
stack/resilient/buildout.cfg
View file @
6ae98bfe
...
@@ -48,7 +48,7 @@ mode = 0644
...
@@ -48,7 +48,7 @@ mode = 0644
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/pbsready-export.cfg.in
url = ${:_profile_base_location_}/pbsready-export.cfg.in
output = ${buildout:directory}/pbsready-export.cfg
output = ${buildout:directory}/pbsready-export.cfg
md5sum =
ef3861861746d3574f39f1aa3200d74e
md5sum =
5e27c391ceafb6a58032f1f87fba7826
mode = 0644
mode = 0644
[template-pull-backup]
[template-pull-backup]
...
...
stack/resilient/pbsready-export.cfg.in
View file @
6ae98bfe
...
@@ -19,6 +19,12 @@ parts =
...
@@ -19,6 +19,12 @@ parts =
cron-entry-backup
cron-entry-backup
[resilient-directory]
recipe = slapos.cookbook:mkdirectory
home = $${buildout:directory}
var = $${:home}/var
pid = $${:var}/pid
[resilient-publish-connection-parameter]
[resilient-publish-connection-parameter]
notification-id = http://[$${notifier:host}]:$${notifier:port}/get/$${notifier-exporter:name}
notification-id = http://[$${notifier:host}]:$${notifier:port}/get/$${notifier-exporter:name}
...
@@ -32,6 +38,7 @@ title = Dumping $${slap-parameter:namebase}
...
@@ -32,6 +38,7 @@ title = Dumping $${slap-parameter:namebase}
executable = $${exporter:wrapper}
executable = $${exporter:wrapper}
wrapper = $${rootdirectory:bin}/exporter
wrapper = $${rootdirectory:bin}/exporter
notify = $${slap-parameter:notify}
notify = $${slap-parameter:notify}
pidfile = $${resilient-directory:pid}/$${:name}.pid
[cron-entry-backup]
[cron-entry-backup]
# Schedule the periodic database dump.
# Schedule the periodic database dump.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment