arvados-cli 0.1.20150701122515 → 0.1.20150730193703
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/crunch-job +14 -12
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ca0a9c8bd3b784b99eded196d9c6aedeab09d9d
|
4
|
+
data.tar.gz: bb72d0d7162a44eebe61009637c4e6ddfa8807a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cdfeb6d49fe6f15a737854f60b4247eff75fd7d8c0bf51ec593de05105a8077bd53d2b3e68fa0e63ffb426058f64931f707bb2469c8c542e633a697956113feb
|
7
|
+
data.tar.gz: a77820219c5917e526a9d141b38f1186c15c24ba825bfe4a085c20537caf3cbd53a350f328a0ef223d5d4d6e310d0c176821ee996ace04e5c4b7645963a1df46
|
data/bin/crunch-job
CHANGED
@@ -126,7 +126,7 @@ my $jobspec;
|
|
126
126
|
my $job_api_token;
|
127
127
|
my $no_clear_tmp;
|
128
128
|
my $resume_stash;
|
129
|
-
my $docker_bin = "
|
129
|
+
my $docker_bin = "docker.io";
|
130
130
|
GetOptions('force-unlock' => \$force_unlock,
|
131
131
|
'git-dir=s' => \$git_dir,
|
132
132
|
'job=s' => \$jobspec,
|
@@ -169,8 +169,7 @@ if ($jobspec =~ /^[-a-z\d]+$/)
|
|
169
169
|
}
|
170
170
|
else
|
171
171
|
{
|
172
|
-
$
|
173
|
-
$local_job = 1;
|
172
|
+
$local_job = JSON::decode_json($jobspec);
|
174
173
|
}
|
175
174
|
|
176
175
|
|
@@ -178,7 +177,7 @@ else
|
|
178
177
|
# at least able to run basic commands: they aren't down or severely
|
179
178
|
# misconfigured.
|
180
179
|
my $cmd = ['true'];
|
181
|
-
if ($Job->{docker_image_locator}) {
|
180
|
+
if (($Job || $local_job)->{docker_image_locator}) {
|
182
181
|
$cmd = [$docker_bin, 'ps', '-q'];
|
183
182
|
}
|
184
183
|
Log(undef, "Sanity check is `@$cmd`");
|
@@ -208,15 +207,15 @@ else
|
|
208
207
|
{
|
209
208
|
if (!$resume_stash)
|
210
209
|
{
|
211
|
-
map { croak ("No $_ specified") unless $
|
210
|
+
map { croak ("No $_ specified") unless $local_job->{$_} }
|
212
211
|
qw(script script_version script_parameters);
|
213
212
|
}
|
214
213
|
|
215
|
-
$
|
216
|
-
$
|
217
|
-
$
|
214
|
+
$local_job->{'is_locked_by_uuid'} = $User->{'uuid'};
|
215
|
+
$local_job->{'started_at'} = gmtime;
|
216
|
+
$local_job->{'state'} = 'Running';
|
218
217
|
|
219
|
-
$Job = api_call("jobs/create", job => $
|
218
|
+
$Job = api_call("jobs/create", job => $local_job);
|
220
219
|
}
|
221
220
|
$job_id = $Job->{'uuid'};
|
222
221
|
|
@@ -396,7 +395,7 @@ if (!defined $no_clear_tmp) {
|
|
396
395
|
# TODO: When #5036 is done and widely deployed, we can get rid of the
|
397
396
|
# regular expression and just unmount everything with type fuse.keep.
|
398
397
|
srun (["srun", "--nodelist=$nodelist", "-D", $ENV{'TMPDIR'}],
|
399
|
-
['bash', '-ec', 'mount -t fuse,fuse.keep | awk \'($3 ~ /\ykeep\y/){print $3}\' | xargs -r -n 1 fusermount -u -z; sleep 1; rm -rf $JOB_WORK $CRUNCH_INSTALL $CRUNCH_TMP/task $CRUNCH_TMP/src* $CRUNCH_TMP/*.cid']);
|
398
|
+
['bash', '-ec', '-o', 'pipefail', 'mount -t fuse,fuse.keep | awk \'($3 ~ /\ykeep\y/){print $3}\' | xargs -r -n 1 fusermount -u -z; sleep 1; rm -rf $JOB_WORK $CRUNCH_INSTALL $CRUNCH_TMP/task $CRUNCH_TMP/src* $CRUNCH_TMP/*.cid']);
|
400
399
|
exit (1);
|
401
400
|
}
|
402
401
|
while (1)
|
@@ -405,7 +404,10 @@ if (!defined $no_clear_tmp) {
|
|
405
404
|
freeze_if_want_freeze ($cleanpid);
|
406
405
|
select (undef, undef, undef, 0.1);
|
407
406
|
}
|
408
|
-
|
407
|
+
if ($?) {
|
408
|
+
Log(undef, "Clean work dirs: exit ".exit_status_s($?));
|
409
|
+
exit(EX_RETRY_UNLOCKED);
|
410
|
+
}
|
409
411
|
}
|
410
412
|
|
411
413
|
# If this job requires a Docker image, install that.
|
@@ -596,7 +598,7 @@ else {
|
|
596
598
|
unless ($? == 0 && $sha1 =~ /^([0-9a-f]{40})$/) {
|
597
599
|
croak("`$gitcmd rev-list` exited "
|
598
600
|
.exit_status_s($?)
|
599
|
-
.", '$treeish' not found
|
601
|
+
.", '$treeish' not found, giving up");
|
600
602
|
}
|
601
603
|
$commit = $1;
|
602
604
|
Log(undef, "Version $treeish is commit $commit");
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arvados-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.20150730193703
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arvados Authors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: arvados
|
@@ -178,7 +178,7 @@ dependencies:
|
|
178
178
|
- - "<"
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: 1.0.0
|
181
|
-
description: Arvados command line tools, git commit
|
181
|
+
description: Arvados command line tools, git commit 6dff0705fd3b4e0acde7bdf5821ef115ba74099b
|
182
182
|
email: gem-dev@curoverse.com
|
183
183
|
executables:
|
184
184
|
- arv
|