From f3ac6205d4f15456f7408a23cab98601f796a854 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 15 Aug 2024 23:34:56 -0700 Subject: [PATCH] client: if using a dynamic AM (like Science United) use its prefs ... rather than the prefs from projects, which the user can't control --- client/acct_mgr.cpp | 16 ++++++++++++---- client/acct_mgr.h | 1 + 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/client/acct_mgr.cpp b/client/acct_mgr.cpp index 17e5235df5..9a9a8666d7 100644 --- a/client/acct_mgr.cpp +++ b/client/acct_mgr.cpp @@ -799,10 +799,18 @@ void ACCT_MGR_OP::handle_reply(int http_op_retval) { // process prefs if any // if (!global_prefs_xml.empty()) { - double mod_time = GLOBAL_PREFS::parse_mod_time( - global_prefs_xml.c_str() - ); - if (mod_time > gstate.global_prefs.mod_time) { + bool use_am_prefs; + // if dynamic AM (like SU) its prefs are our net prefs + // + if (ami.dynamic) { + use_am_prefs = true; + } else { + double mod_time = GLOBAL_PREFS::parse_mod_time( + global_prefs_xml.c_str() + ); + use_am_prefs = mod_time > gstate.global_prefs.mod_time; + } + if (use_am_prefs) { retval = gstate.save_global_prefs( global_prefs_xml.c_str(), ami.master_url, ami.master_url ); diff --git a/client/acct_mgr.h b/client/acct_mgr.h index cecc250252..efb7c11e3b 100644 --- a/client/acct_mgr.h +++ b/client/acct_mgr.h @@ -84,6 +84,7 @@ struct ACCT_MGR_INFO : PROJ_AM { // This AM dynamically decides what projects to assign. // - send EC in AM RPCs // - send starvation info if idle resources + // - network preferences are those from AM USER_KEYWORDS user_keywords; // user's yes/no keywords. // These are conveyed to projects in scheduler requests