arvados-cli 0.1.20160331222945 → 0.1.20160502182247
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/arv +1 -1
- data/bin/arv-run-pipeline-instance +2 -2
- data/bin/crunch-job +29 -21
- 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: 028deb623850341357235f78b0a0778c05a41553
|
4
|
+
data.tar.gz: 27461048cae5ade3b6a080ae407fce6be4eebdda
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9a4f4bbe80b59cd33a937ee00be54b1e1d0ac83ce1917e56e29af2d791722153edced8759fc57eafbab4bc831bcdb912555855c547b96fe479a430db774fd6a
|
7
|
+
data.tar.gz: 35bd843bbd394c4f4eebad20914bdba94755bb63c258b5ba0adef0568bbfbc4baa384b7199cf1faad1320ac7a66a8ad8be0e2048fd2287463c4526df589d369f
|
data/bin/arv
CHANGED
@@ -566,7 +566,7 @@ def parse_arguments(discovery_document, subcommands)
|
|
566
566
|
end
|
567
567
|
end
|
568
568
|
|
569
|
-
discovered_params.each do |k,v|
|
569
|
+
discovered_params.merge({resource => {'type' => 'object'}}).each do |k,v|
|
570
570
|
k = k.to_sym
|
571
571
|
if ['object', 'array'].index(v["type"]) and method_opts.has_key? k
|
572
572
|
if method_opts[k].andand.match /^\//
|
@@ -17,7 +17,7 @@ begin
|
|
17
17
|
require 'trollop'
|
18
18
|
require 'google/api_client'
|
19
19
|
rescue LoadError => l
|
20
|
-
puts $:
|
20
|
+
$stderr.puts $:
|
21
21
|
abort <<-EOS
|
22
22
|
#{$0}: fatal: #{l.message}
|
23
23
|
Some runtime dependencies may be missing.
|
@@ -132,7 +132,7 @@ if $options[:instance]
|
|
132
132
|
abort "#{$0}: syntax error: --instance cannot be combined with --template or --submit."
|
133
133
|
end
|
134
134
|
elsif not $options[:template]
|
135
|
-
puts "error: you must supply a --template or --instance."
|
135
|
+
$stderr.puts "error: you must supply a --template or --instance."
|
136
136
|
p.educate
|
137
137
|
abort
|
138
138
|
end
|
data/bin/crunch-job
CHANGED
@@ -416,8 +416,17 @@ if ($docker_locator = $Job->{docker_image_locator}) {
|
|
416
416
|
Log (undef, "docker image hash is $docker_hash");
|
417
417
|
$docker_stream =~ s/^\.//;
|
418
418
|
my $docker_install_script = qq{
|
419
|
-
if
|
420
|
-
|
419
|
+
if $docker_bin images -q --no-trunc --all | grep -qxF \Q$docker_hash\E; then
|
420
|
+
exit 0
|
421
|
+
fi
|
422
|
+
declare -a exit_codes=("\${PIPESTATUS[@]}")
|
423
|
+
if [ 0 != "\${exit_codes[0]}" ]; then
|
424
|
+
exit "\${exit_codes[0]}" # `docker images` failed
|
425
|
+
elif [ 1 != "\${exit_codes[1]}" ]; then
|
426
|
+
exit "\${exit_codes[1]}" # `grep` encountered an error
|
427
|
+
else
|
428
|
+
# Everything worked fine, but grep didn't find the image on this host.
|
429
|
+
arv-get \Q$docker_locator$docker_stream/$docker_hash.tar\E | $docker_bin load
|
421
430
|
fi
|
422
431
|
};
|
423
432
|
|
@@ -853,9 +862,10 @@ for (my $todo_ptr = 0; $todo_ptr <= $#jobstep_todo; $todo_ptr ++)
|
|
853
862
|
.q{&& SWAP=$(awk '($1 == "SwapTotal:"){print $2}' </proc/meminfo) }
|
854
863
|
."&& MEMLIMIT=\$(( (\$MEM * 95) / ($ENV{CRUNCH_NODE_SLOTS} * 100) )) "
|
855
864
|
."&& let SWAPLIMIT=\$MEMLIMIT+\$SWAP "
|
856
|
-
.
|
857
|
-
.
|
858
|
-
.
|
865
|
+
.q{&& declare -a VOLUMES=() }
|
866
|
+
.q{&& if which crunchrunner >/dev/null ; then VOLUMES+=("--volume=$(which crunchrunner):/usr/local/bin/crunchrunner") ; fi }
|
867
|
+
.q{&& if test -f /etc/ssl/certs/ca-certificates.crt ; then VOLUMES+=("--volume=/etc/ssl/certs/ca-certificates.crt:/etc/arvados/ca-certificates.crt") ; }
|
868
|
+
.q{elif test -f /etc/pki/tls/certs/ca-bundle.crt ; then VOLUMES+=("--volume=/etc/pki/tls/certs/ca-bundle.crt:/etc/arvados/ca-certificates.crt") ; fi };
|
859
869
|
|
860
870
|
$command .= "&& exec arv-mount --read-write --mount-by-pdh=by_pdh --mount-tmp=tmp --crunchstat-interval=10 --allow-other $arv_file_cache \Q$keep_mnt\E --exec ";
|
861
871
|
$ENV{TASK_KEEPMOUNT} = "$keep_mnt/by_pdh";
|
@@ -922,7 +932,7 @@ for (my $todo_ptr = 0; $todo_ptr <= $#jobstep_todo; $todo_ptr ++)
|
|
922
932
|
|
923
933
|
# Bind mount the crunchrunner binary and host TLS certificates file into
|
924
934
|
# the container.
|
925
|
-
$command .= "
|
935
|
+
$command .= '"${VOLUMES[@]}" ';
|
926
936
|
|
927
937
|
while (my ($env_key, $env_val) = each %ENV)
|
928
938
|
{
|
@@ -1152,13 +1162,6 @@ sub reapchildren
|
|
1152
1162
|
. $slot[$proc{$pid}->{slot}]->{cpu});
|
1153
1163
|
my $jobstepidx = $proc{$pid}->{jobstepidx};
|
1154
1164
|
|
1155
|
-
if (!WIFEXITED($childstatus))
|
1156
|
-
{
|
1157
|
-
# child did not exit (may be temporarily stopped)
|
1158
|
-
Log ($jobstepidx, "child $pid did not actually exit in reapchildren, ignoring for now.");
|
1159
|
-
next;
|
1160
|
-
}
|
1161
|
-
|
1162
1165
|
$children_reaped++;
|
1163
1166
|
my $elapsed = time - $proc{$pid}->{time};
|
1164
1167
|
my $Jobstep = $jobstep[$jobstepidx];
|
@@ -1466,6 +1469,9 @@ sub readfrompipes
|
|
1466
1469
|
sub preprocess_stderr
|
1467
1470
|
{
|
1468
1471
|
my $jobstepidx = shift;
|
1472
|
+
# slotindex is only defined for children running Arvados job tasks.
|
1473
|
+
# Be prepared to handle the undef case (for setup srun calls, etc.).
|
1474
|
+
my $job_slot_index = $jobstep[$jobstepidx]->{slotindex};
|
1469
1475
|
|
1470
1476
|
while ($jobstep[$jobstepidx]->{stderr} =~ /^(.*?)\n/) {
|
1471
1477
|
my $line = $1;
|
@@ -1475,19 +1481,16 @@ sub preprocess_stderr
|
|
1475
1481
|
# whoa.
|
1476
1482
|
$main::please_freeze = 1;
|
1477
1483
|
}
|
1478
|
-
elsif (!exists $jobstep[$jobstepidx]->{slotindex}) {
|
1479
|
-
# Skip the following tempfail checks if this srun proc isn't
|
1480
|
-
# attached to a particular worker slot.
|
1481
|
-
}
|
1482
1484
|
elsif ($line =~ /srun: error: (Node failure on|Aborting, .*\bio error\b)/) {
|
1483
|
-
my $job_slot_index = $jobstep[$jobstepidx]->{slotindex};
|
1484
|
-
$slot[$job_slot_index]->{node}->{fail_count}++;
|
1485
1485
|
$jobstep[$jobstepidx]->{tempfail} = 1;
|
1486
|
-
|
1486
|
+
if (defined($job_slot_index)) {
|
1487
|
+
$slot[$job_slot_index]->{node}->{fail_count}++;
|
1488
|
+
ban_node_by_slot($job_slot_index);
|
1489
|
+
}
|
1487
1490
|
}
|
1488
1491
|
elsif ($line =~ /srun: error: (Unable to create job step|.*: Communication connection failure)/) {
|
1489
1492
|
$jobstep[$jobstepidx]->{tempfail} = 1;
|
1490
|
-
ban_node_by_slot($
|
1493
|
+
ban_node_by_slot($job_slot_index) if (defined($job_slot_index));
|
1491
1494
|
}
|
1492
1495
|
elsif ($line =~ /\bKeep(Read|Write|Request)Error:/) {
|
1493
1496
|
$jobstep[$jobstepidx]->{tempfail} = 1;
|
@@ -1977,6 +1980,11 @@ sub srun_sync
|
|
1977
1980
|
delete $reader{$jobstepidx};
|
1978
1981
|
|
1979
1982
|
my $j = pop @jobstep;
|
1983
|
+
# If the srun showed signs of tempfail, ensure the caller treats that as a
|
1984
|
+
# failure case.
|
1985
|
+
if ($main::please_freeze || $j->{tempfail}) {
|
1986
|
+
$exited ||= 255;
|
1987
|
+
}
|
1980
1988
|
return ($exited, $j->{stdout_captured}, $j->{stderr_captured});
|
1981
1989
|
}
|
1982
1990
|
|
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.20160502182247
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arvados Authors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-02 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 4c360c5a3a9564f584dac973810059d2d45d08ef
|
182
182
|
email: gem-dev@curoverse.com
|
183
183
|
executables:
|
184
184
|
- arv
|