arvados-cli 0.1.20150316190023 → 0.1.20150318175258

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/crunch-job +21 -9
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 588401acaf0d304d733e96d273fcdd9aa2784d23
4
- data.tar.gz: b9b21e337625de3d064ec0d10176e9f8ba47b02d
3
+ metadata.gz: 2f2a6ec1dcf70c54e9d4c3e5c19765998bbd662e
4
+ data.tar.gz: 3a73655194150d120062964dece0f49af9ba3523
5
5
  SHA512:
6
- metadata.gz: 762e7cfdeb67a3e7d32218626b8c63f68a566ea04321b3770e99f1c5928fc05e88c942f6160e6f735a817b81b74f8607a918313c384de01c8464aa533d5f428c
7
- data.tar.gz: c7bdb2e8c86a07f38574f784e7d703df0da4c0fceac9d56a2a23590dc8aae960a0b1613509542ae7d0a08ecc098fdc13d4136d1c2c76edc691bae86aae62ed9d
6
+ metadata.gz: 8170967ae4113d5da4f93f894c47f9a47b24c49d309712f78da07d805e955a69942ab5a75a61ef04289881042c74c4fc46ed40310099acb03644ec3a95cb25b5
7
+ data.tar.gz: 39b43765b46ae46d1398c442a658114ecc43784f3449001f171b25e74d31aa9bb91952167912d69aaa7b22efa1ccd311d7b9add81004d3db34786390c3f41478
data/bin/crunch-job CHANGED
@@ -96,6 +96,7 @@ use File::Temp;
96
96
  use Fcntl ':flock';
97
97
  use File::Path qw( make_path remove_tree );
98
98
 
99
+ use constant TASK_TEMPFAIL => 111;
99
100
  use constant EX_TEMPFAIL => 75;
100
101
 
101
102
  $ENV{"TMPDIR"} ||= "/tmp";
@@ -1011,7 +1012,7 @@ sub reapchildren
1011
1012
  {
1012
1013
  my $temporary_fail;
1013
1014
  $temporary_fail ||= $Jobstep->{node_fail};
1014
- $temporary_fail ||= ($exitvalue == 111);
1015
+ $temporary_fail ||= ($exitvalue == TASK_TEMPFAIL);
1015
1016
 
1016
1017
  ++$thisround_failed;
1017
1018
  ++$thisround_failed_multiple if $Jobstep->{'failures'} >= 1;
@@ -1232,7 +1233,7 @@ sub preprocess_stderr
1232
1233
  # whoa.
1233
1234
  $main::please_freeze = 1;
1234
1235
  }
1235
- elsif ($line =~ /srun: error: (Node failure on|Unable to create job step) /) {
1236
+ elsif ($line =~ /srun: error: (Node failure on|Unable to create job step|.*: Communication connection failure)/) {
1236
1237
  $jobstep[$job]->{node_fail} = 1;
1237
1238
  ban_node_by_slot($jobstep[$job]->{slotindex});
1238
1239
  }
@@ -1831,6 +1832,8 @@ use Fcntl ':flock';
1831
1832
  use File::Path qw( make_path remove_tree );
1832
1833
  use POSIX qw(getcwd);
1833
1834
 
1835
+ use constant TASK_TEMPFAIL => 111;
1836
+
1834
1837
  # Map SDK subdirectories to the path environments they belong to.
1835
1838
  my %SDK_ENVVARS = ("perl/lib" => "PERLLIB", "ruby/lib" => "RUBYLIB");
1836
1839
 
@@ -1876,9 +1879,9 @@ if (@ARGV) {
1876
1879
  my $venv_dir = "$job_work/.arvados.venv";
1877
1880
  my $venv_built = -e "$venv_dir/bin/activate";
1878
1881
  if ((!$venv_built) and (-d $python_src) and can_run("virtualenv")) {
1879
- shell_or_die("virtualenv", "--quiet", "--system-site-packages",
1882
+ shell_or_die(undef, "virtualenv", "--quiet", "--system-site-packages",
1880
1883
  "--python=python2.7", $venv_dir);
1881
- shell_or_die("$venv_dir/bin/pip", "--quiet", "install", "-I", $python_src);
1884
+ shell_or_die(TASK_TEMPFAIL, "$venv_dir/bin/pip", "--quiet", "install", "-I", $python_src);
1882
1885
  $venv_built = 1;
1883
1886
  $Log->("Built Python SDK virtualenv");
1884
1887
  }
@@ -1974,12 +1977,12 @@ if ((-d $python_dir) and can_run("python2.7") and
1974
1977
  }
1975
1978
 
1976
1979
  if (-e "$destdir/crunch_scripts/install") {
1977
- shell_or_die ("$destdir/crunch_scripts/install", $install_dir);
1980
+ shell_or_die (undef, "$destdir/crunch_scripts/install", $install_dir);
1978
1981
  } elsif (!-e "./install.sh" && -e "./tests/autotests.sh") {
1979
1982
  # Old version
1980
- shell_or_die ("./tests/autotests.sh", $install_dir);
1983
+ shell_or_die (undef, "./tests/autotests.sh", $install_dir);
1981
1984
  } elsif (-e "./install.sh") {
1982
- shell_or_die ("./install.sh", $install_dir);
1985
+ shell_or_die (undef, "./install.sh", $install_dir);
1983
1986
  }
1984
1987
 
1985
1988
  if ($commit) {
@@ -2000,15 +2003,24 @@ sub can_run {
2000
2003
 
2001
2004
  sub shell_or_die
2002
2005
  {
2006
+ my $exitcode = shift;
2007
+
2003
2008
  if ($ENV{"DEBUG"}) {
2004
2009
  print STDERR "@_\n";
2005
2010
  }
2006
2011
  if (system (@_) != 0) {
2007
2012
  my $err = $!;
2008
- my $exitstatus = sprintf("exit %d signal %d", $? >> 8, $? & 0x7f);
2013
+ my $code = $?;
2014
+ my $exitstatus = sprintf("exit %d signal %d", $code >> 8, $code & 0x7f);
2009
2015
  open STDERR, ">&STDERR_ORIG";
2010
2016
  system ("cat $destdir.log >&2");
2011
- die "@_ failed ($err): $exitstatus";
2017
+ warn "@_ failed ($err): $exitstatus";
2018
+ if (defined($exitcode)) {
2019
+ exit $exitcode;
2020
+ }
2021
+ else {
2022
+ exit (($code >> 8) || 1);
2023
+ }
2012
2024
  }
2013
2025
  }
2014
2026
 
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.20150316190023
4
+ version: 0.1.20150318175258
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-03-16 00:00:00.000000000 Z
11
+ date: 2015-03-18 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 e3f359d1cf36bca2b675c495fcff0a76a89cbd38
181
+ description: Arvados command line tools, git commit 1ed0df4d4b2221a06e37effce42ab5b2e23b29c8
182
182
  email: gem-dev@curoverse.com
183
183
  executables:
184
184
  - arv