mom hook updates forgotten if acks not received before timeout

Description

From :
I've confirmed that there's a bug in the code where if within the current set of hook updates there are some that have not received acks from the respective moms, these updates could be "forgotten" on the next hook updates run, after timing out the previous run. I already have a fix for this:

$ diff -c hook_func.c.110317 hook_func.c.FIX

  •  

    •  

      • hook_func.c.110317 2017-11-04 09:36:42.073932200 -0700

      • hook_func.c.FIX 2017-11-05 06:50:25.132830500 -0800
        ***************

      • 6190,6195 ****

      • 6190,6196 ----
        int timeout_sec;
        time_t timeout_time;
        time_t current_time;
        + int timed_out = 0;
        if (pbs_conf.pbs_use_tcp == 1) {
        timeout_sec = SYNC_MOM_HOOKFILES_TIMEOUT_TPP;
        ***************

      • 6198,6208 ****
        }
        current_time = time((time_t *) 0);
        timeout_time = g_sync_hook_time + timeout_sec;

  • if (do_sync_mom_hookfiles &&

  • (!sync_mom_hookfiles_proc_running ||

  • (current_time > timeout_time))) {
    ! if (sync_mom_hookfiles_proc_running) {
    /* we're timing out previous sync mom hook files */
    /* process/action */
    if (pbs_conf.pbs_use_tcp == 1) {

    •  

      • 6199,6207 ----
        }
        current_time = time((time_t *) 0);
        timeout_time = g_sync_hook_time + timeout_sec;
        ! if (sync_mom_hookfiles_proc_running) {
        ! if (current_time > timeout_time) {
        /* we're timing out previous sync mom hook files */
        /* process/action */
        if (pbs_conf.pbs_use_tcp == 1) {
        ***************

      • 6225,6234 ****
        /* attempt collapsing the hook tracking file */
        collapse_hook_tr();
        sync_mom_hookfiles_proc_running = 0;
        }
        ! if (bg_sync_mom_hookfiles() == 0)
        do_sync_mom_hookfiles = 0;
        }
        }

      • 6224,6240 ----
        /* attempt collapsing the hook tracking file */
        collapse_hook_tr();
        sync_mom_hookfiles_proc_running = 0;
        + timed_out = 1;
        + } else {
        + /* previous updates still in progress and not timed out */
        + return;
        }
        + }
        ! if (do_sync_mom_hookfiles || timed_out) {
        ! if (bg_sync_mom_hookfiles() == 0) {
        do_sync_mom_hookfiles = 0;
        + }
        }
        }

Acceptance Criteria

None

Status

Assignee

Bhroam Mann

Reporter

Scott Campbell

Severity

None

OS

None

Start Date

None

Pull Request URL

None

Story Points

1

Components

Fix versions

Affects versions

13.1.2

Priority

Low
Configure