PipelineFX Forum
Qube! => General => Topic started by: eric on January 15, 2005, 04:18:54 AM
-
Recently, we received the following question:
Is there an easy way to have a job run on all worker host machines?
e.g. we wish to run a setup script prior to a job, and would like it to execute on all host machines.
The short answer is: no.
The longer answer is: not yet. We'll be supporting such a feature in 4.0.
In the meantime, you can do something similar with a teeny bit of perl code. Basically, you ask the supervisor for a list of all the hosts it knows about, an then send a qbsub to each host with the same command ("ls" in this example)
for(qb::hostinfo()) {
? ? ? ?my $host = $_;
? ? ? ?my $job = {
? ? ? ? ? "prototype" => "cmdline",
? ? ? ? ? "hosts" => $host->{"name"},
? ? ? ? ? "package" => {
? ? ? ? ? ? ? "cmdline" => "ls"
? ? ? ? ? }
? ? ? ?};
? ? ? ?qb::submit($job);
? }
-
John Burk did something like this at EA - can't remember exactly how. He made an explicit list of all the hosts, and (somehow?) ensured that the agenda would run once on each host (so, only one job).
-
Yhea the 4.0 method is to do this:
my $job = {
"flags" => "host_list",
.... stuff ...
}
qb::submit($job);