Changeset 4452 for trunk/Ohana/src/opihi/doc/scheduler.txt
- Timestamp:
- Jul 5, 2005, 7:12:22 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/doc/scheduler.txt (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/doc/scheduler.txt
r4450 r4452 1 2 2005.07.05 3 4 At this point, scheduler / pcontrol / pclient all work in a basic way. 5 pclient is the most robust of the three, having the simplest 6 responsibility. pcontrol is generally pretty good, though I need to 7 flesh out the user interface a bit and clean up the output warning / info 8 messages. scheduler will need the most attention, though it is 9 already fairly reasonable. I need to flesh out the user commands to 10 check on the controller status (basically, these need to replicate the 11 status commands available to the controller). 12 13 I also need to handle the case of timeout on the controller, 14 independently of timeout for a local job on the scheduler. currently, 15 if a local job exceeds the timeout value, scheduler flags it. but, it 16 does not make sense to use the same timeout value for a controller 17 job. I could pass the timeout to the controller when the job executes, 18 in which case it has the same meaning, essentially, for the controller 19 jobs as it does for the local jobs: once you start the function, it 20 needs to complete within NN seconds. However, I think I still need to 21 have a scheduler concept of a job which the controller is unable to 22 complete. It should be possible to prevent a job from sitting pending 23 on the controller forever. What exactly you do if the controller is 24 unwilling to execute a job is another story (possible reasons: 25 controller overload, missing required host, missing any hosts, 26 something hung somewhere?). 27 28 The scheduler does not do a good job of shutting down the controller 29 when it (the scheduler) exits. This works well for the 30 pcontrol/pclient interface, so the solution lies there. 31 32 I need to decide how to behave if the scheduler asks for a job with a 33 required host which the controller knows is currently down or 34 non-existent. Several options could be used. The controller could 35 simply hold the task until the scheduler notices it is not being 36 executed (after all, the controller does not know if the machine is 37 being serviced for a short time or a long time, but the scheduler 38 could know). The controller could immediately return a failure noting 39 the current state of the machine (this would put the burden of 40 deciding that the machine should be available on the scheduler). The 41 controller could try to execute the job a certain number of times, and 42 then it could report the failure to the scheduler. This is not so 43 different from having a pending-timeout which the scheduler tracks 44 (moves the timeout check to the controller, essentially). 45 46 There was some odd behavior with 'exec echo $stdout >> foo'. This 47 resulted in empty files 'foo'. The following work fine, so something 48 is just weird: 49 exec echo foobar >> foo 50 output foo 51 echo $stdout 52 output stdout 53 54 Various error conditions should be checked 55 56 What do we do if a task requests a host which is not available to the 57 controller (ie, not defined)? this is similar to the problem of 58 requesting a host which is down. I think the controller should either 59 immediately refuse or accept in anticipation that such a host may 60 eventually be defined. 61 62 I need to be careful about jobs sent to the controller and not 63 harvested before stopping the scheduler execution. 1 64 2 65 --- … … 5 68 6 69 - sched: validate task hosts with controller 7 - pcontrol: host (name) -check should return state8 - sched: start / stop controller connection?9 - pcontrol: add command to check status of a job10 - pcontrol: add command to dump stdout/stderr for a job11 70 12 71 --- … … 40 99 - may be in task or in task.macro (exit/exec) 41 100 (in task, value is static; in task.macro, value is defined for each instance) 101 - value of LOCAL runs job as local job (not on controller) 102 - value of NONE runs job on controller without specifying host 42 103 43 104 stderr (file / variable) … … 54 115 - defines relevant time-scale for the task 55 116 56 schedule 57 - runs the scheduler loop, executing the various tasks 58 59 scheduler functions: 60 61 InitTasks (); 62 FindTask (); 63 CreateTask (); 117 run 118 stop 119 - start or stop the scheduler loop, executing the various tasks 64 120 65 121 --- … … 67 123 local jobs vs controller jobs 68 124 69 if 'host' is 'local', task is run as background fork (ie, not on controller) 70 if 'host' is NULL or 'any', task is run on controller without specified host 71 if 'host' is (machine), task is run on controller with specified host 72 73 --- 74 75 scheduler / controller / local interactions 76 77 scheduler can execute local jobs and jobs on the controller. 78 scheduler needs to initiate the connection to the controller, if the 79 controller is being used. it also needs to fork each local command. 80 81 we need a command to define the controller hosts to be used. if a 82 task or job defines a host which is not known, how is this caught? 83 does sched need to keep a list of valid hosts, or should the host be 84 passed down to the controller. Also, the scheduler should not 85 initiate a connection to the controller unless it is requested. is 86 this implicit when defining a host? 87 88 - controller host foobar 89 90 this should setup the controller interface (if it does not currently 91 exist), and send the command 'host foobar'. scheduler should not 92 care if the connection is successful or not (we can know about hosts 93 which are currently off). 94 95 96 --- 97 controller interaction: 98 99 controller accepts the following commands: 100 101 job [options] argv0 argv1 argv2 ... 102 -host name : run job on specified host, or any other if not available 103 +host name : run job on specified host, error if not available 104 -timeout N : seconds before controller gives up on job (once started) 105 -stdout name : redirect job stdout to file directly 106 -stderr name : redirect job stderr to file directly 107 * priority information? 108 * returns JobID 109 110 status (JobID) 111 112 stdout (JobID) 113 114 stderr (JobID) 115 116 stop (JobID) 117 118 delete (JobID) 125 a local job is run as background fork (ie, not on controller) 126 a controller job is sent to the controller to run when it can 119 127 120 128 --- … … 127 135 - controller says command not found 128 136 - controller has too many processes 129 - controller takes to long to start job ( schedulertimeout)137 - controller takes to long to start job (pending timeout) 130 138 - controller says job timed out 131 139 - controller says job crashed … … 138 146 - watch for NFS lags / blocking. if NFS has file visibility lags, we 139 147 may need to add blocking as an option to the job (-block filename) 140
Note:
See TracChangeset
for help on using the changeset viewer.
