Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Slurm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tud-zih-energy
Slurm
Commits
48776d34
Commit
48776d34
authored
21 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
Backup slurmctld to generate core file on SIGABRT.
parent
d35b8729
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
NEWS
+1
-0
1 addition, 0 deletions
NEWS
src/slurmctld/backup.c
+16
-3
16 additions, 3 deletions
src/slurmctld/backup.c
with
17 additions
and
3 deletions
NEWS
+
1
−
0
View file @
48776d34
...
@@ -24,6 +24,7 @@ documents those changes that are of interest to users and admins.
...
@@ -24,6 +24,7 @@ documents those changes that are of interest to users and admins.
-- Documentation for writing scheduler, switch, and job completion
-- Documentation for writing scheduler, switch, and job completion
logging plugins added
logging plugins added
-- Added job and node state descriptions to the squeue and sinfo man pages
-- Added job and node state descriptions to the squeue and sinfo man pages
-- Backup slurmctld to generate core file on SIGABRT
* Changes in SLURM 0.3.0.0-pre6
* Changes in SLURM 0.3.0.0-pre6
===============================
===============================
...
...
This diff is collapsed.
Click to expand it.
src/slurmctld/backup.c
+
16
−
3
View file @
48776d34
...
@@ -57,6 +57,9 @@ static void * _background_rpc_mgr(void *no_data);
...
@@ -57,6 +57,9 @@ static void * _background_rpc_mgr(void *no_data);
static
void
*
_background_signal_hand
(
void
*
no_data
);
static
void
*
_background_signal_hand
(
void
*
no_data
);
static
int
_ping_controller
(
void
);
static
int
_ping_controller
(
void
);
/* Local variables */
static
bool
dump_core
=
false
;
/*
/*
* Static list of signals to block in this process
* Static list of signals to block in this process
* *Must be zero-terminated*
* *Must be zero-terminated*
...
@@ -133,7 +136,10 @@ void run_backup(void)
...
@@ -133,7 +136,10 @@ void run_backup(void)
verbose
(
"Unable to remove pidfile '%s': %m"
,
verbose
(
"Unable to remove pidfile '%s': %m"
,
slurmctld_conf
.
slurmctld_pidfile
);
slurmctld_conf
.
slurmctld_pidfile
);
log_fini
();
log_fini
();
exit
(
0
);
if
(
dump_core
)
abort
();
else
exit
(
0
);
}
}
error
(
"ControlMachine %s not responding, "
error
(
"ControlMachine %s not responding, "
...
@@ -172,13 +178,20 @@ static void *_background_signal_hand(void *no_data)
...
@@ -172,13 +178,20 @@ static void *_background_signal_hand(void *no_data)
switch
(
sig
)
{
switch
(
sig
)
{
case
SIGINT
:
/* kill -2 or <CTRL-C> */
case
SIGINT
:
/* kill -2 or <CTRL-C> */
case
SIGTERM
:
/* kill -15 */
case
SIGTERM
:
/* kill -15 */
case
SIGABRT
:
/* abort */
info
(
"Terminate signal (SIGINT or SIGTERM) received"
);
info
(
"Terminate signal (SIGABRT, SIGINT or SIGTERM) received"
);
slurmctld_config
.
shutdown_time
=
time
(
NULL
);
slurmctld_config
.
shutdown_time
=
time
(
NULL
);
/* send REQUEST_SHUTDOWN_IMMEDIATE RPC */
/* send REQUEST_SHUTDOWN_IMMEDIATE RPC */
slurmctld_shutdown
();
slurmctld_shutdown
();
return
NULL
;
/* Normal termination */
return
NULL
;
/* Normal termination */
break
;
break
;
case
SIGABRT
:
/* abort */
info
(
"SIGABRT received"
);
slurmctld_config
.
shutdown_time
=
time
(
NULL
);
/* send REQUEST_SHUTDOWN_IMMEDIATE RPC */
slurmctld_shutdown
();
dump_core
=
true
;
return
NULL
;
/* Normal termination */
break
;
default:
default:
error
(
"Invalid signal (%d) received"
,
sig
);
error
(
"Invalid signal (%d) received"
,
sig
);
}
}
...
...
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