Skip to content

Commit ad03543

Browse files
committed
BF: CS-662: verify delayed job reporting of sge_execd after reconnecting to sge_qmaster (cleanup)
1 parent e674615 commit ad03543

File tree

5 files changed

+11
-20
lines changed

5 files changed

+11
-20
lines changed

source/daemons/execd/execd_ck_to_do.cc

+4-9
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,8 @@ update_wallclock_usage(u_long64 now, const lListElem *job, const lListElem *ja_t
394394
#define OLD_JOB_INTERVAL 60
395395

396396
int do_ck_to_do(bool is_qmaster_down) {
397-
u_long64 now;
397+
DENTER(TOP_LAYER);
398+
u_long64 now = sge_get_gmt64();
398399
static u_long64 next_pdc = 0;
399400
static u_long64 next_signal = 0;
400401
static u_long64 next_old_job = 0;
@@ -404,13 +405,7 @@ int do_ck_to_do(bool is_qmaster_down) {
404405
int return_value = 0;
405406
const char *qualified_hostname = component_get_qualified_hostname();
406407

407-
DENTER(TOP_LAYER);
408408

409-
/*
410-
* get current time (now)
411-
* ( don't update the now time inside this function )
412-
*/
413-
now = sge_get_gmt64();
414409

415410
#ifdef KERBEROS
416411
krb_renew_tgts(Master_Job_List);
@@ -566,8 +561,8 @@ int do_ck_to_do(bool is_qmaster_down) {
566561
if (next_report <= now) {
567562
next_report = now + sge_gmt32_to_gmt64(mconf_get_load_report_time());
568563

569-
/* if pdc_interval is equals load_report time syncronize both calls to
570-
make the online usage acurate as possible */
564+
/* if pdc_interval is equals load_report time synchronize both calls to
565+
make the online usage accurate as possible */
571566
if (sge_gmt32_to_gmt64(mconf_get_load_report_time()) == mconf_get_pdc_interval()) {
572567
next_pdc = next_report;
573568
}

source/daemons/execd/execd_get_new_conf.cc

+2-4
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,13 @@
6666
** executed on startup. This function is triggered by the execd
6767
** dispatcher table when the tag TAG_GET_NEW_CONF is received.
6868
*/
69-
int do_get_new_conf(ocs::gdi::ClientServerBase::struct_msg_t *aMsg)
70-
{
69+
int do_get_new_conf(ocs::gdi::ClientServerBase::struct_msg_t *aMsg) {
70+
DENTER(TOP_LAYER);
7171
int ret;
7272
bool use_qidle = mconf_get_use_qidle();
7373
u_long32 dummy; /* always 0 */
7474
u_long32 old_reprioritization_enabled = mconf_get_reprioritize();
7575

76-
DENTER(TOP_LAYER);
77-
7876
unpackint(&(aMsg->buf), &dummy);
7977

8078
const char *old_spool = mconf_get_execd_spool_dir();

source/daemons/qmaster/qmaster_to_execd.cc

+3-5
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,10 @@ host_notify_about_X(lListElem *host, u_long32 x, ocs::gdi::ClientServerBase::Cli
9191
*******************************************************************************/
9292
static int
9393
host_notify_about_X(lListElem *host, u_long32 x, ocs::gdi::ClientServerBase::ClientServerBaseTag tag, int progname_id) {
94-
const char *hostname = nullptr;
95-
sge_pack_buffer pb;
96-
int ret = -1;
97-
9894
DENTER(TOP_LAYER);
95+
int ret = -1;
9996

100-
hostname = lGetHost(host, EH_name);
97+
const char *hostname = lGetHost(host, EH_name);
10198
if (progname_id == EXECD) {
10299
unsigned long last_heard_from;
103100
u_short id = 1;
@@ -111,6 +108,7 @@ host_notify_about_X(lListElem *host, u_long32 x, ocs::gdi::ClientServerBase::Cli
111108
}
112109
}
113110

111+
sge_pack_buffer pb;
114112
if (init_packbuffer(&pb, 256) == PACK_SUCCESS) {
115113
u_long32 dummy = 0;
116114

source/libs/mir/sge_queue_mirror.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ sge_callback_result
5151
cqueue_update_master_list(sge_evc_class_t *evc, sge_object_type type,
5252
sge_event_action action, lListElem *event, void *clientdata)
5353
{
54+
DENTER(TOP_LAYER);
5455
sge_callback_result ret = SGE_EMA_OK;
5556
const char *name = nullptr;
5657
lList *qinstance_list = nullptr;
5758
lListElem *cqueue = nullptr;
5859
lList **list = nullptr;
5960
const lDescr *list_descr = nullptr;
6061

61-
DENTER(TOP_LAYER);
6262
name = lGetString(event, ET_strkey);
6363
list = ocs::DataStore::get_master_list_rw(SGE_TYPE_CQUEUE);
6464
list_descr = lGetListDescr(lGetList(event, ET_new_version));

source/libs/sgeobj/ocs_DataStore.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include "sge_object.h"
2828
#include "ocs_DataStore.h"
2929

30-
#define DATA_STORE_LAYER TOP_LAYER
30+
#define DATA_STORE_LAYER BASIS_LAYER
3131

3232
namespace ocs {
3333
// the key to get thread local memory

0 commit comments

Comments
 (0)