[ARVADOS] updated: 491cd605f0d0af804b1e7ca099432bae74870221
git at public.curoverse.com
git at public.curoverse.com
Tue Sep 30 15:36:29 EDT 2014
Summary of changes:
sdk/cli/bin/arv-run-pipeline-instance | 6 +++---
sdk/cli/bin/crunch-job | 29 +++++++++++++++++++----------
2 files changed, 22 insertions(+), 13 deletions(-)
via 491cd605f0d0af804b1e7ca099432bae74870221 (commit)
from 79deba45d38e64a10105526f4cf2d5fccbc4916a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 491cd605f0d0af804b1e7ca099432bae74870221
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Tue Sep 30 15:36:26 2014 -0400
3859: Rename --local-job to --local-script and add perldoc documentation.
Rename --force-unlock to --skip-lock (--force-unlock remains for backward
compatability.)
diff --git a/sdk/cli/bin/arv-run-pipeline-instance b/sdk/cli/bin/arv-run-pipeline-instance
index dbb00bd..f1a4209 100755
--- a/sdk/cli/bin/arv-run-pipeline-instance
+++ b/sdk/cli/bin/arv-run-pipeline-instance
@@ -551,7 +551,7 @@ class WhRunPipelineInstance
report_status
begin
require 'open3'
- Open3.popen3("arv-crunch-job", "--force-unlock", "--local-job",
+ Open3.popen3("arv-crunch-job", "--skip-lock", "--local-script",
"--job", c[:job][:uuid]) do |stdin, stdout, stderr, wait_thr|
debuglog "arv-crunch-job pid #{wait_thr.pid} started", 0
stdin.close
@@ -653,7 +653,7 @@ class WhRunPipelineInstance
end
end
elsif ["Queued", "Running"].include? c[:job][:state]
- # Job is still running
+ # Job is running or scheduled to run, so keep monitoring it
moretodo = true
elsif c[:job][:state] == "Cancelled"
debuglog "component #{cname} job #{c[:job][:uuid]} cancelled."
@@ -686,7 +686,7 @@ class WhRunPipelineInstance
end
end
- c_in_state = @components.values.group_by { |c|
+ c_in_state = @components.values.group_by { |c|
c[:job] and c[:job][:state]
}
succeeded = c_in_state["Complete"].andand.count || 0
diff --git a/sdk/cli/bin/crunch-job b/sdk/cli/bin/crunch-job
index c0baa30..e571921 100755
--- a/sdk/cli/bin/crunch-job
+++ b/sdk/cli/bin/crunch-job
@@ -23,7 +23,7 @@ Obtain job details from command line, run tasks on local machine
=item --force-unlock
-If the job is already locked, steal the lock and run it anyway.
+Don't try to lock the job, just run it.
=item --git-dir
@@ -39,6 +39,14 @@ Do not clear per-job/task temporary directories during initial job
setup. This can speed up development and debugging when running jobs
locally.
+=item --local-script
+
+Permit running scripts with local filesystem path in script_version.
+
+=item --skip-lock
+
+Don't try to lock the job, just run it.
+
=back
=head1 RUNNING JOBS LOCALLY
@@ -106,15 +114,16 @@ $ENV{"CRUNCH_INSTALL"} = "$ENV{CRUNCH_TMP}/opt";
$ENV{"CRUNCH_WORK"} = $ENV{"JOB_WORK"}; # deprecated
mkdir ($ENV{"JOB_WORK"});
-my $force_unlock;
+my $skip_lock;
my $git_dir;
my $jobspec;
my $job_api_token;
my $no_clear_tmp;
my $resume_stash;
-my $local_job;
-GetOptions('force-unlock' => \$force_unlock,
- 'local-job' => \$local_job,
+my $local_script;
+GetOptions('force-unlock' => \$skip_lock,
+ 'skip-lock' => \$skip_lock,
+ 'local-script' => \$local_script,
'git-dir=s' => \$git_dir,
'job=s' => \$jobspec,
'job-api-token=s' => \$job_api_token,
@@ -128,8 +137,8 @@ if (defined $job_api_token) {
my $have_slurm = exists $ENV{SLURM_JOBID} && exists $ENV{SLURM_NODELIST};
my $job_has_uuid = $jobspec =~ /^[-a-z\d]+$/;
-if (!$local_job) {
- $local_job = !$job_has_uuid;
+if (!$local_script) {
+ $local_script = !$job_has_uuid;
}
@@ -156,7 +165,7 @@ my $sth;
if ($job_has_uuid)
{
$Job = $arv->{'jobs'}->{'get'}->execute('uuid' => $jobspec);
- if (!$force_unlock) {
+ if (!$skip_lock) {
# Claim this job, and make sure nobody else does
eval {
# lock() sets is_locked_by_uuid and changes state to Running.
@@ -164,7 +173,7 @@ if ($job_has_uuid)
};
if ($@) {
Log(undef, "Error while locking job, exiting ".EX_TEMPFAIL);
- exit EX_TEMPFAIL;
+ exit EX_TEMPFAIL;
};
}
}
@@ -340,7 +349,7 @@ my $build_script;
$ENV{"CRUNCH_SRC_COMMIT"} = $Job->{script_version};
-my $skip_install = ($local_job && $Job->{script_version} =~ m{^/});
+my $skip_install = ($local_script && $Job->{script_version} =~ m{^/});
if ($skip_install)
{
if (!defined $no_clear_tmp) {
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list