IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 10661


Ignore:
Timestamp:
Dec 12, 2006, 10:45:22 AM (20 years ago)
Author:
eugene
Message:

better solution for hung hosts

Location:
trunk/Ohana/src/opihi/pcontrol
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/pcontrol/CheckBusyJob.c

    r10659 r10661  
    4040      FreeIOBuffer (&buffer);
    4141      return (TRUE);
    42 
    43 # if (0)     
    44       HarvestHost (host[0].pid);
    45       // unlink host & job
    46       job[0].host = NULL;
    47       host[0].job = NULL;
    48       PutHost (host, PCONTROL_HOST_DOWN, STACK_BOTTOM);
    49       PutJobSetState (job, PCONTROL_JOB_PENDING, STACK_BOTTOM, PCONTROL_JOB_HUNG);
    50       FreeIOBuffer (&buffer);
    51       return (TRUE);
    52 # endif
    5342
    5443    case PCLIENT_GOOD:
  • trunk/Ohana/src/opihi/pcontrol/CheckDoneHost.c

    r10659 r10661  
    2727    case PCLIENT_HUNG:
    2828      // don't do anything drastic, just try again later
    29       PutHost (host, PCONTROL_HOST_BUSY, STACK_BOTTOM);
     29      PutHost (host, PCONTROL_HOST_DONE, STACK_BOTTOM);
    3030      if (DEBUG || VerboseMode()) gprint (GP_ERR, "host %s is not responding\n", host[0].hostname);
    3131      FreeIOBuffer (&buffer);
  • trunk/Ohana/src/opihi/pcontrol/KillJob.c

    r10659 r10661  
    3131    case PCLIENT_HUNG:
    3232      // don't do anything drastic, just keep trying
    33       if (VerboseMode()) gprint (GP_ERR, "client is busy, not responding");
     33      // XXX move to which stack??
     34      gprint (GP_ERR, "client is busy, not responding (KillJob)");
    3435      FreeIOBuffer (&buffer);
    3536      return (TRUE);
    36 
    37 # if (0)
    38       HarvestHost (host[0].pid);
    39       // unlink host & job
    40       job[0].host = NULL;
    41       host[0].job = NULL;
    42       PutHost (host, PCONTROL_HOST_DOWN, STACK_BOTTOM);
    43       PutJobSetState (job, PCONTROL_JOB_PENDING, STACK_BOTTOM, PCONTROL_JOB_HUNG);
    44       FreeIOBuffer (&buffer);
    45       return (TRUE);
    46 # endif
    4737
    4838    case PCLIENT_GOOD:
  • trunk/Ohana/src/opihi/pcontrol/StartJob.c

    r10659 r10661  
    4040      // we need the job start to return a valid Job ID,
    4141      // give up on jobs which don't get started.
     42      // XXX we are sensitive here to the time it takes pclient
     43      // to fork the job.  if this is slow, the client may appear to hang.
    4244      gprint (GP_ERR, "host %s is not responding (StartJob)\n", host[0].hostname);
    4345      if (VerboseMode()) gprint (GP_ERR, "host %s is not responding\n", host[0].hostname);
    44       goto failure;
     46
     47      // unlink host & job
     48      job[0].host = NULL;
     49      host[0].job = NULL;
     50      PutHost (host, PCONTROL_HOST_DONE, STACK_BOTTOM);
     51      PutJob (job, PCONTROL_JOB_PENDING, STACK_BOTTOM);
     52      FreeIOBuffer (&buffer);
     53      return (FALSE);
    4554
    4655    case PCLIENT_GOOD:
Note: See TracChangeset for help on using the changeset viewer.