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
Klaus Wölfel
slapos
Commits
d6d873c4
Commit
d6d873c4
authored
Sep 30, 2016
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
monitor: bootstrap promise don't fail if pid file doesn't exists
parent
89b6630e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
12 deletions
+14
-12
stack/monitor/buildout.cfg
stack/monitor/buildout.cfg
+1
-1
stack/monitor/instance-monitor.cfg.jinja2.in
stack/monitor/instance-monitor.cfg.jinja2.in
+13
-11
No files found.
stack/monitor/buildout.cfg
View file @
d6d873c4
...
...
@@ -93,7 +93,7 @@ recipe = slapos.recipe.template:jinja2
filename = template-monitor.cfg
template = ${:_profile_base_location_}/instance-monitor.cfg.jinja2.in
rendered = ${buildout:directory}/template-monitor.cfg
md5sum =
c25e1c8206fb7c08924ae3d5c16521f
c
md5sum =
61734742e3a01a8a1d512f491b2190c
c
context =
key apache_location apache:location
key gzip_location gzip:location
...
...
stack/monitor/instance-monitor.cfg.jinja2.in
View file @
d6d873c4
...
...
@@ -372,17 +372,19 @@ check-secure = 1
recipe = collective.recipe.template
file = ${monitor-conf-parameters:promise-output-file}
input = inline:#!{{ dash_executable_location }}
PID=`cat ${monitor-conf-parameters:pid-file}`
for i in {1..20}; do
# wait for monitor bootstrap script to finish (max 10 seconds)
kill -0 "$PID" > /dev/null 2>&1
RETURN_CODE=$?
if [ $RETURN_CODE -eq 0 ] ; then
break
else
sleep 0.5
fi
done
if [ -f "${monitor-conf-parameters:pid-file}" ]; then
PID=`cat ${monitor-conf-parameters:pid-file}`
for i in {1..20}; do
# wait for monitor bootstrap script to finish (max 10 seconds)
kill -0 "$PID" > /dev/null 2>&1
RETURN_CODE=$?
if [ $RETURN_CODE -eq 0 ] ; then
break
else
sleep 0.5
fi
done
fi
if [ ! -f "${:file}" ]; then echo "Monitor bootstrap exited with error." && exit 2; else echo "Bootstrap OK"; fi
output = ${directory:promises}/monitor-bootstrap-status
mode = 700
...
...
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