SHA256
1
0
forked from pool/slurm
slurm/slurmdbd-uses-xdaemon_-for-systemd.patch

73 lines
2.1 KiB
Diff
Raw Normal View History

Accepting request 650545 from home:eeich:branches:network:cluster - Added missing perl-base dependency. - Moved HTML docs to doc package. - Moved config man pages to a separate package: This way, they won't get installed on compute nodes. - Update to 18.08.3 * Add new burst buffer state of "teardown-fail" to indicate the burst buffer teardown operation is failing on specific buffers. * Multiple backup slurmctld daemons can be configured * Enable jobs with zero node count for creation and/or deletion of persistent burst buffers. * Add "scontrol show dwstat" command to display Cray burst buffer status. * Add "GetSysStatus" option to burst_buffer.conf file. * Add node and partition configuration options of "CpuBind" to control default task binding. * Add "NumaCpuBind" option to knl.conf * Add sbatch "--batch" option to identify features required on batch node. * Add "BatchFeatures" field to output of "scontrol show job". * Add support for "--bb" option to sbatch command. * Add new SystemComment field to job data structure and database. * Expand reservation "flags" field from 32 to 64 bits. * Add job state flag of "SIGNALING" to avoid race condition. * Properly handle srun --will-run option when there are jobs in COMPLETING state. * Properly report who is signaling a step. * Don't combine updated reservation records in sreport's reservation report. * node_features plugin - Add suport for XOR & XAND of job constraints (node feature specifications). OBS-URL: https://build.opensuse.org/request/show/650545 OBS-URL: https://build.opensuse.org/package/show/network:cluster/slurm?expand=0&rev=75
2018-11-20 18:07:44 +01:00
From: Egbert Eich <eich@suse.com>
Date: Tue Nov 20 09:58:47 2018 +0100
Subject: slurmdbd uses xdaemon_* for systemd
Patch-mainline: Not yet
Git-commit: 8a286cbaf3fe7ebe009106675a4624a2272d616f
References: bsc#1084125
Accepting request 650545 from home:eeich:branches:network:cluster - Added missing perl-base dependency. - Moved HTML docs to doc package. - Moved config man pages to a separate package: This way, they won't get installed on compute nodes. - Update to 18.08.3 * Add new burst buffer state of "teardown-fail" to indicate the burst buffer teardown operation is failing on specific buffers. * Multiple backup slurmctld daemons can be configured * Enable jobs with zero node count for creation and/or deletion of persistent burst buffers. * Add "scontrol show dwstat" command to display Cray burst buffer status. * Add "GetSysStatus" option to burst_buffer.conf file. * Add node and partition configuration options of "CpuBind" to control default task binding. * Add "NumaCpuBind" option to knl.conf * Add sbatch "--batch" option to identify features required on batch node. * Add "BatchFeatures" field to output of "scontrol show job". * Add support for "--bb" option to sbatch command. * Add new SystemComment field to job data structure and database. * Expand reservation "flags" field from 32 to 64 bits. * Add job state flag of "SIGNALING" to avoid race condition. * Properly handle srun --will-run option when there are jobs in COMPLETING state. * Properly report who is signaling a step. * Don't combine updated reservation records in sreport's reservation report. * node_features plugin - Add suport for XOR & XAND of job constraints (node feature specifications). OBS-URL: https://build.opensuse.org/request/show/650545 OBS-URL: https://build.opensuse.org/package/show/network:cluster/slurm?expand=0&rev=75
2018-11-20 18:07:44 +01:00
Signed-off-by: Egbert Eich <eich@suse.com>
---
Accepting request 650545 from home:eeich:branches:network:cluster - Added missing perl-base dependency. - Moved HTML docs to doc package. - Moved config man pages to a separate package: This way, they won't get installed on compute nodes. - Update to 18.08.3 * Add new burst buffer state of "teardown-fail" to indicate the burst buffer teardown operation is failing on specific buffers. * Multiple backup slurmctld daemons can be configured * Enable jobs with zero node count for creation and/or deletion of persistent burst buffers. * Add "scontrol show dwstat" command to display Cray burst buffer status. * Add "GetSysStatus" option to burst_buffer.conf file. * Add node and partition configuration options of "CpuBind" to control default task binding. * Add "NumaCpuBind" option to knl.conf * Add sbatch "--batch" option to identify features required on batch node. * Add "BatchFeatures" field to output of "scontrol show job". * Add support for "--bb" option to sbatch command. * Add new SystemComment field to job data structure and database. * Expand reservation "flags" field from 32 to 64 bits. * Add job state flag of "SIGNALING" to avoid race condition. * Properly handle srun --will-run option when there are jobs in COMPLETING state. * Properly report who is signaling a step. * Don't combine updated reservation records in sreport's reservation report. * node_features plugin - Add suport for XOR & XAND of job constraints (node feature specifications). OBS-URL: https://build.opensuse.org/request/show/650545 OBS-URL: https://build.opensuse.org/package/show/network:cluster/slurm?expand=0&rev=75
2018-11-20 18:07:44 +01:00
slurm-18.08.3/src/slurmdbd/slurmdbd.c | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/slurm-18.08.3/src/slurmdbd/slurmdbd.c b/slurm-18.08.3/src/slurmdbd/slurmdbd.c
index 471c724..8c7ea94 100644
--- a/src/slurmdbd/slurmdbd.c
+++ b/src/slurmdbd/slurmdbd.c
@@ -103,7 +103,7 @@ static List lft_rgt_list = NULL;
static void _become_slurm_user(void);
static void _commit_handler_cancel(void);
static void *_commit_handler(void *no_data);
-static void _daemonize(void);
+static int _daemonize_start(void);
static void _default_sigaction(int sig);
static void _free_dbd_stats(void);
static void _init_config(void);
@@ -127,6 +127,7 @@ int main(int argc, char **argv)
{
char node_name_short[128];
char node_name_long[128];
+ int pipefd;
void *db_conn = NULL;
assoc_init_args_t assoc_init_arg;
Accepting request 650545 from home:eeich:branches:network:cluster - Added missing perl-base dependency. - Moved HTML docs to doc package. - Moved config man pages to a separate package: This way, they won't get installed on compute nodes. - Update to 18.08.3 * Add new burst buffer state of "teardown-fail" to indicate the burst buffer teardown operation is failing on specific buffers. * Multiple backup slurmctld daemons can be configured * Enable jobs with zero node count for creation and/or deletion of persistent burst buffers. * Add "scontrol show dwstat" command to display Cray burst buffer status. * Add "GetSysStatus" option to burst_buffer.conf file. * Add node and partition configuration options of "CpuBind" to control default task binding. * Add "NumaCpuBind" option to knl.conf * Add sbatch "--batch" option to identify features required on batch node. * Add "BatchFeatures" field to output of "scontrol show job". * Add support for "--bb" option to sbatch command. * Add new SystemComment field to job data structure and database. * Expand reservation "flags" field from 32 to 64 bits. * Add job state flag of "SIGNALING" to avoid race condition. * Properly handle srun --will-run option when there are jobs in COMPLETING state. * Properly report who is signaling a step. * Don't combine updated reservation records in sreport's reservation report. * node_features plugin - Add suport for XOR & XAND of job constraints (node feature specifications). OBS-URL: https://build.opensuse.org/request/show/650545 OBS-URL: https://build.opensuse.org/package/show/network:cluster/slurm?expand=0&rev=75
2018-11-20 18:07:44 +01:00
@@ -139,8 +140,9 @@ int main(int argc, char **argv)
_update_nice();
_kill_old_slurmdbd();
- if (foreground == 0)
- _daemonize();
+ if (foreground == 0) {
+ pipefd = _daemonize_start();
+ }
/*
* Need to create pidfile here in case we setuid() below
Accepting request 650545 from home:eeich:branches:network:cluster - Added missing perl-base dependency. - Moved HTML docs to doc package. - Moved config man pages to a separate package: This way, they won't get installed on compute nodes. - Update to 18.08.3 * Add new burst buffer state of "teardown-fail" to indicate the burst buffer teardown operation is failing on specific buffers. * Multiple backup slurmctld daemons can be configured * Enable jobs with zero node count for creation and/or deletion of persistent burst buffers. * Add "scontrol show dwstat" command to display Cray burst buffer status. * Add "GetSysStatus" option to burst_buffer.conf file. * Add node and partition configuration options of "CpuBind" to control default task binding. * Add "NumaCpuBind" option to knl.conf * Add sbatch "--batch" option to identify features required on batch node. * Add "BatchFeatures" field to output of "scontrol show job". * Add support for "--bb" option to sbatch command. * Add new SystemComment field to job data structure and database. * Expand reservation "flags" field from 32 to 64 bits. * Add job state flag of "SIGNALING" to avoid race condition. * Properly handle srun --will-run option when there are jobs in COMPLETING state. * Properly report who is signaling a step. * Don't combine updated reservation records in sreport's reservation report. * node_features plugin - Add suport for XOR & XAND of job constraints (node feature specifications). OBS-URL: https://build.opensuse.org/request/show/650545 OBS-URL: https://build.opensuse.org/package/show/network:cluster/slurm?expand=0&rev=75
2018-11-20 18:07:44 +01:00
@@ -149,7 +151,9 @@ int main(int argc, char **argv)
* able to write a core dump.
*/
_init_pidfile();
Accepting request 650545 from home:eeich:branches:network:cluster - Added missing perl-base dependency. - Moved HTML docs to doc package. - Moved config man pages to a separate package: This way, they won't get installed on compute nodes. - Update to 18.08.3 * Add new burst buffer state of "teardown-fail" to indicate the burst buffer teardown operation is failing on specific buffers. * Multiple backup slurmctld daemons can be configured * Enable jobs with zero node count for creation and/or deletion of persistent burst buffers. * Add "scontrol show dwstat" command to display Cray burst buffer status. * Add "GetSysStatus" option to burst_buffer.conf file. * Add node and partition configuration options of "CpuBind" to control default task binding. * Add "NumaCpuBind" option to knl.conf * Add sbatch "--batch" option to identify features required on batch node. * Add "BatchFeatures" field to output of "scontrol show job". * Add support for "--bb" option to sbatch command. * Add new SystemComment field to job data structure and database. * Expand reservation "flags" field from 32 to 64 bits. * Add job state flag of "SIGNALING" to avoid race condition. * Properly handle srun --will-run option when there are jobs in COMPLETING state. * Properly report who is signaling a step. * Don't combine updated reservation records in sreport's reservation report. * node_features plugin - Add suport for XOR & XAND of job constraints (node feature specifications). OBS-URL: https://build.opensuse.org/request/show/650545 OBS-URL: https://build.opensuse.org/package/show/network:cluster/slurm?expand=0&rev=75
2018-11-20 18:07:44 +01:00
-
+ if (foreground == 0) {
+ xdaemon_finish(pipefd);
+ }
Accepting request 650545 from home:eeich:branches:network:cluster - Added missing perl-base dependency. - Moved HTML docs to doc package. - Moved config man pages to a separate package: This way, they won't get installed on compute nodes. - Update to 18.08.3 * Add new burst buffer state of "teardown-fail" to indicate the burst buffer teardown operation is failing on specific buffers. * Multiple backup slurmctld daemons can be configured * Enable jobs with zero node count for creation and/or deletion of persistent burst buffers. * Add "scontrol show dwstat" command to display Cray burst buffer status. * Add "GetSysStatus" option to burst_buffer.conf file. * Add node and partition configuration options of "CpuBind" to control default task binding. * Add "NumaCpuBind" option to knl.conf * Add sbatch "--batch" option to identify features required on batch node. * Add "BatchFeatures" field to output of "scontrol show job". * Add support for "--bb" option to sbatch command. * Add new SystemComment field to job data structure and database. * Expand reservation "flags" field from 32 to 64 bits. * Add job state flag of "SIGNALING" to avoid race condition. * Properly handle srun --will-run option when there are jobs in COMPLETING state. * Properly report who is signaling a step. * Don't combine updated reservation records in sreport's reservation report. * node_features plugin - Add suport for XOR & XAND of job constraints (node feature specifications). OBS-URL: https://build.opensuse.org/request/show/650545 OBS-URL: https://build.opensuse.org/package/show/network:cluster/slurm?expand=0&rev=75
2018-11-20 18:07:44 +01:00
/*
* Do plugin init's after _init_pidfile so systemd is happy as
* slurm_acct_storage_init() could take a long time to finish if running
@@ -598,11 +602,14 @@ static void _init_pidfile(void)
/* Become a daemon (child of init) and
* "cd" to the LogFile directory (if one is configured) */
-static void _daemonize(void)
+static int _daemonize_start(void)
{
- if (xdaemon())
+ int retval;
+ retval = xdaemon_init();
+ if (retval == -1)
error("daemon(): %m");
log_alter(log_opts, LOG_DAEMON, slurmdbd_conf->log_file);
+ return retval;
}
static void _set_work_dir(void)