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
Boxiang Sun
slapos
Commits
126a4b5e
Commit
126a4b5e
authored
Jun 12, 2017
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
monitor: print error log message when promise fail
parent
2fef05e4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
3 deletions
+16
-3
stack/monitor/buildout.hash.cfg
stack/monitor/buildout.hash.cfg
+1
-1
stack/monitor/instance-monitor.cfg.jinja2.in
stack/monitor/instance-monitor.cfg.jinja2.in
+15
-2
No files found.
stack/monitor/buildout.hash.cfg
View file @
126a4b5e
...
@@ -15,4 +15,4 @@
...
@@ -15,4 +15,4 @@
# not need these here).
# not need these here).
[monitor2-template]
[monitor2-template]
filename = instance-monitor.cfg.jinja2.in
filename = instance-monitor.cfg.jinja2.in
md5sum =
85188d680f709d9317d97357e0a749aa
md5sum =
628cc0b2b6104d9d2df8408028bad694
stack/monitor/instance-monitor.cfg.jinja2.in
View file @
126a4b5e
...
@@ -156,7 +156,8 @@ update-command = ${:command}
...
@@ -156,7 +156,8 @@ update-command = ${:command}
[start-monitor]
[start-monitor]
recipe = slapos.cookbook:wrapper
recipe = slapos.cookbook:wrapper
command-line = {{ python_executable }} {{ monitor_bin }} --config_file ${monitor-conf:rendered}
command-line = {{ python_executable }} {{ monitor_bin }} --config_file ${monitor-conf:rendered}
wrapper-path = ${directory:scripts}/bootstrap-monitor
name = bootstrap-monitor
wrapper-path = ${directory:scripts}/${:name}
environment =
environment =
PATH=${python-symlink:target}:/usr/local/bin:/usr/bin:/bin
PATH=${python-symlink:target}:/usr/local/bin:/usr/bin:/bin
...
@@ -330,6 +331,7 @@ check-secure = 1
...
@@ -330,6 +331,7 @@ check-secure = 1
[monitor-bootstrap-promise]
[monitor-bootstrap-promise]
recipe = collective.recipe.template
recipe = collective.recipe.template
file = ${monitor-conf-parameters:promise-output-file}
file = ${monitor-conf-parameters:promise-output-file}
error-log-file = ${buildout:directory}/.${slap-connection:partition-id}_${start-monitor:name}.log
input = inline:#!{{ dash_executable_location }}
input = inline:#!{{ dash_executable_location }}
pidfile=${monitor-conf-parameters:pid-file}
pidfile=${monitor-conf-parameters:pid-file}
if [ -s $pidfile ]; then
if [ -s $pidfile ]; then
...
@@ -344,7 +346,18 @@ input = inline:#!{{ dash_executable_location }}
...
@@ -344,7 +346,18 @@ input = inline:#!{{ dash_executable_location }}
fi
fi
done
done
fi
fi
if [ ! -f "${:file}" ]; then echo "Monitor bootstrap exited with error." && exit 2; else echo "Bootstrap OK"; fi
if [ ! -f "${:file}" ]; then
echo "Monitor bootstrap exited with error."
log_file="${:error-log-file}"
if [ -s "$log_file" ]; then
echo " ---- Latest monitor-boostrap.log ----"
echo ""
tail -n 3 $log_file
fi
exit 2
else
echo "Bootstrap OK";
fi
output = ${directory:promises}/monitor-bootstrap-status
output = ${directory:promises}/monitor-bootstrap-status
mode = 700
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