Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HPCasCode
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hpc-team
HPCasCode
Commits
c966ff56
Commit
c966ff56
authored
9 years ago
by
Chris Hines
Browse files
Options
Downloads
Plain Diff
Merge pull request #99 from CVL-GitHub/slurmbrach8
Slurmbrach8
parents
0fd5d73f
c4d85c6b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
roles/slurm-from-source/templates/nhc.sysconfig.j2
+3
-2
3 additions, 2 deletions
roles/slurm-from-source/templates/nhc.sysconfig.j2
roles/slurm-from-source/templates/nhc_cron.j2
+4
-1
4 additions, 1 deletion
roles/slurm-from-source/templates/nhc_cron.j2
with
7 additions
and
3 deletions
roles/slurm-from-source/templates/nhc.sysconfig.j2
+
3
−
2
View file @
c966ff56
...
@@ -3,9 +3,10 @@ NHC_RM=slurm
...
@@ -3,9 +3,10 @@ NHC_RM=slurm
HELPERDIR={{ nhc_dir }}/libexec/nhc
HELPERDIR={{ nhc_dir }}/libexec/nhc
PATH={{ slurm_dir }}/bin:{{ nhc_dir }}/sbin:$PATH
PATH={{ slurm_dir }}/bin:{{ nhc_dir }}/sbin:$PATH
LOGFILE=/var/log/nhc.log
LOGFILE=/var/log/nhc.log
LOG_LEVEL={{ nhc_log_level }}
CONFFILE="{{ nhc_dir }}/etc/nhc/{{ nhc_config_file }}"
CONFFILE="{{ nhc_dir }}/etc/nhc/{{ nhc_config_file }}"
NHC_EMAIL_TO=
{{ nhc_emails }}
NHC_EMAIL_TO={{ nhc_emails }}
NHC_EMAIL_SUBJECT=
"Node failure"
NHC_EMAIL_SUBJECT=
{{ nhc_email_subject }}
NHC_LOOP_TIME="300"
NHC_LOOP_TIME="300"
This diff is collapsed.
Click to expand it.
roles/slurm-from-source/templates/nhc_cron.j2
+
4
−
1
View file @
c966ff56
...
@@ -10,6 +10,7 @@ config_file=${CONFFILE-/etc/nhc/nhc.conf}
...
@@ -10,6 +10,7 @@ config_file=${CONFFILE-/etc/nhc/nhc.conf}
loop
=
${
NHC_LOOP_TIME
-300
}
loop
=
${
NHC_LOOP_TIME
-300
}
email_subject
=
${
NHC_EMAIL_SUBJECT
-notification
}
email_subject
=
${
NHC_EMAIL_SUBJECT
-notification
}
logfile
=
${
LOGFILE
-/var/log/nhc.log
}
logfile
=
${
LOGFILE
-/var/log/nhc.log
}
loglevel
=
${
LOG_LEVEL
-0
}
email_to
=
${
NHC_EMAIL_TO
-root
}
email_to
=
${
NHC_EMAIL_TO
-root
}
function
log
()
{
function
log
()
{
...
@@ -27,7 +28,9 @@ function email() {
...
@@ -27,7 +28,9 @@ function email() {
fi
fi
}
}
log
"Start health check
${
config_file
}
"
if
[
${
loglevel
}
-gt
"0"
]
;
then
log
"Start health check
${
config_file
}
"
fi
nhc
-c
"
${
config_file
}
"
>
/root/nhc.log 2>&1
||
{
log
"
$(
cat
/root/nhc.log
)
"
&&
email
&&
exit
1
;
}
nhc
-c
"
${
config_file
}
"
>
/root/nhc.log 2>&1
||
{
log
"
$(
cat
/root/nhc.log
)
"
&&
email
&&
exit
1
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment