From 4f1a81691a1ceb56957d9fef9bccb0a0bcfcf690 Mon Sep 17 00:00:00 2001 From: Danny Auble <da@schedmd.com> Date: Thu, 13 Aug 2015 12:00:29 -0700 Subject: [PATCH] Do not let the slurmctld start if there are no TRES in the cache and we are running with associations. --- src/common/assoc_mgr.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/common/assoc_mgr.c b/src/common/assoc_mgr.c index 2838bea673a..45b6e5aee22 100644 --- a/src/common/assoc_mgr.c +++ b/src/common/assoc_mgr.c @@ -5232,6 +5232,11 @@ extern int load_assoc_mgr_state(char *state_save_location) slurmdbd_free_list_msg(msg); break; case DBD_ADD_ASSOCS: + if (!g_tres_count) + fatal("load_assoc_mgr_state: " + "Unable to run cache without TRES, " + "please make sure you have a connection " + "to your database to continue."); error_code = slurmdbd_unpack_list_msg( &msg, ver, DBD_ADD_ASSOCS, buffer); if (error_code != SLURM_SUCCESS) @@ -5284,6 +5289,11 @@ extern int load_assoc_mgr_state(char *state_save_location) slurmdbd_free_list_msg(msg); break; case DBD_ADD_QOS: + if (!g_tres_count) + fatal("load_assoc_mgr_state: " + "Unable to run cache without TRES, " + "please make sure you have a connection " + "to your database to continue."); error_code = slurmdbd_unpack_list_msg( &msg, ver, DBD_ADD_QOS, buffer); if (error_code != SLURM_SUCCESS) -- GitLab