From 141a3145ea628ad4e6cf46f2b66fa45e9699fa02 Mon Sep 17 00:00:00 2001 From: Moe Jette <jette1@llnl.gov> Date: Sun, 12 Nov 2006 21:34:01 +0000 Subject: [PATCH] Make handshake between primary and backup controller cleaner. --- src/slurmctld/backup.c | 1 + src/slurmctld/controller.c | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/slurmctld/backup.c b/src/slurmctld/backup.c index 7a7ab7b95e5..ece27daa44f 100644 --- a/src/slurmctld/backup.c +++ b/src/slurmctld/backup.c @@ -357,6 +357,7 @@ static int _background_process_msg(slurm_msg_t * msg) } else if (super_user && (msg->msg_type == REQUEST_CONTROL)) { debug3("Ignoring RPC: REQUEST_CONTROL"); + error_code = ESLURM_DISABLED; } else { error("Invalid RPC received %d from uid %u", msg->msg_type, uid); diff --git a/src/slurmctld/controller.c b/src/slurmctld/controller.c index cc8326ccce1..8ae6da3a15f 100644 --- a/src/slurmctld/controller.c +++ b/src/slurmctld/controller.c @@ -1051,11 +1051,14 @@ static int _shutdown_backup_controller(int wait_time) error("_shutdown_backup_controller:send/recv: %m, %s", TIME_STR); return SLURM_ERROR; } - if (rc) { + if (rc == ESLURM_DISABLED) + debug("backup controller responding"); + else if (rc == 0) + debug("backup controller has relinquished control"); + else { error("_shutdown_backup_controller: %s", slurm_strerror(rc)); return SLURM_ERROR; } - debug("backup controller has relinquished control"); /* FIXME: Ideally the REQUEST_CONTROL RPC does not return until all * other activity has ceased and the state has been saved. That is -- GitLab