vovwxd Process Loop

The vovwxd daemon performs the following steps in its main loop.

Note: All Tcl procedures mentioned below must be defined in the driver script.
  1. Reload config.tcl or vov*.tcl files if they've been modified.
  2. Call the OnConfigLoaded Tcl procedure.​
  3. Process existing launcher jobs.
    Option Description
    If a job is VALID Create a tasker object. Calls ParseLauncherOutput Tcl procedure.​
    If a job is FAILED Report the error (vovnc will check if the same error occurred a 2nd time). Calls OnLaunchError Tcl procedure.​
    If a job is RUNNING Report a warning if the age is >= 30s
    For all other options Delete the job.​
  4. Delete the LJO (launcher job output) file from the SWD/vovwxd/launchers directory.​
  5. Obtain list of all taskers and buckets along with their metadata (job counts, users, tasker states, etc.).
    1. Call OnProcessBucket Tcl procedure for new bucket(s), where the driver script should populate the LAUNCHINFO array. The most important array keys are:​
      set LAUNCHINFO(cmd,submit)     nc run –q .... (the only mandatory key)​
      set LAUNCHINFO(cmd,submitArgs) appends additional args to submit command    ​
      set LAUNCHINFO(tasker,msg)      "Queued in NC queue <name>"    ​
      set LAUNCHINFO(taskerRes)       vovtasker's -r value​
      set LAUNCHINFO(maxlife)        vovtasker's -Z value​
      set LAUNCHINFO(maxidle)        vovtasker's -z value    ​
      set LAUNCHINFO(submit,jobName) "taskerFor_$LAUNCHINFO(BUCKETID)"
  6. Decide how many new vovtasker are needed for each bucket based on existing vovtasker count and limits config parameter. ​
    1. Call OnAdjustNumLaunchers Tcl procedure, that can fill in the following array fields:
      set LAUNCHINFO(submit,numJobs)      0 (mandatory)​
      set LAUNCHINFO(submit,numTaskers)    0 (mandatory) ​
      set LAUNCHINFO(submit,skipReason)   "Skipped because no working queue found."   ​
      set LAUNCHINFO(limit,maxReached)    1   ​
      set LAUNCHINFO(submit,taskerLogPath) "specifies full log file path for each tasker" 
  7. Create new launcher jobs.​
  8. Check for the vovtaskers that are not connected.​
    Option Description
    If the vovtasker was sick for more than CONFIG(sick,older) seconds Kill it
    If the vovtasker has never connected Check the wxagent job status. Calls the GetStatusOfJobList Tcl procedure.
    • If the job is queued or running, no action (waiting on a hardware resource).
    • If the job has failed to start, delete the vovtasker object.​​
    • The wxagent job can be deleted in the base queue, delete the vovtasker object​
    • The base queue may not be accessible, delete the vovtasker object.
  9. Start a new log cleaner thread based on CONFIG(launchers,checkfreq).​