arvados-cli 0.1.20140826153331 → 0.1.20140826202602

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 +14 -7
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 46fabe4ef40420550ed96ff11645ea0a3aee2bd7
4
- data.tar.gz: 195dab2945794963ea3b34e02b25ca8bb552ed03
3
+ metadata.gz: bd9ebb9dddabe78ad6456c8b5c23279b368b5305
4
+ data.tar.gz: 2c834b9059f65215ef592b2af0e7d8a9aebe4ef8
5
5
  SHA512:
6
- metadata.gz: 204577cff475cac903763e1c9697dd8f3c15636da66fc90aea2c27ae794c2880a516ca7806fc177fecca736f819a82bd113324f65f2cc82f923a223ae1be54a6
7
- data.tar.gz: e3134fae83b9349b288d837c287693ff17947ac37723696dfb4572490d36cbc5c4543881b0f94b1ede7c3d95486fca43eee027a60325318a702485be60c9bc76
6
+ metadata.gz: cfe2966a72aa3e109bf42d00fac24309aacebb07557190db14a94c7bfd4579ebe535c2a8be68fcde68f5f818de20252b00771b2385fdecdc05b7b1043c744d7d
7
+ data.tar.gz: c8e032348584d3b812e75be31371773b783c918a3a6d4c82c1d562d3979f2bc1aaf75dbd4f6331f4aa1c58b09510babed4df61a740b25d7bd316839604cb6ea8
data/bin/crunch-job CHANGED
@@ -487,6 +487,8 @@ else
487
487
  croak ("could not figure out commit id for $treeish");
488
488
  }
489
489
 
490
+ # Note: this section is almost certainly unnecessary if we're
491
+ # running tasks in docker containers.
490
492
  my $installpid = fork();
491
493
  if ($installpid == 0)
492
494
  {
@@ -654,8 +656,6 @@ for (my $todo_ptr = 0; $todo_ptr <= $#jobstep_todo; $todo_ptr ++)
654
656
  if ($build_script)
655
657
  {
656
658
  $build_script_to_send = $build_script;
657
- $command .=
658
- "&& perl -";
659
659
  }
660
660
  $command .= "&& exec arv-mount --allow-other $ENV{TASK_KEEPMOUNT} --exec ";
661
661
  if ($docker_hash)
@@ -668,7 +668,6 @@ for (my $todo_ptr = 0; $todo_ptr <= $#jobstep_todo; $todo_ptr ++)
668
668
  $command .=
669
669
  q{$(ip -o address show scope global |
670
670
  gawk 'match($4, /^([0-9\.:]+)\//, x){print "--dns", x[1]}') };
671
- $command .= "--volume=\Q$ENV{CRUNCH_SRC}:/tmp/crunch-src:ro\E ";
672
671
  $command .= "--volume=\Q$ENV{TASK_KEEPMOUNT}:/keep:ro\E ";
673
672
  $command .= "--env=\QHOME=/home/crunch\E ";
674
673
  while (my ($env_key, $env_val) = each %ENV)
@@ -686,11 +685,13 @@ for (my $todo_ptr = 0; $todo_ptr <= $#jobstep_todo; $todo_ptr ++)
686
685
  $command .= "--env=\QCRUNCH_SRC=/tmp/crunch-src\E ";
687
686
  $command .= "\Q$docker_hash\E ";
688
687
  $command .= "stdbuf --output=0 --error=0 ";
688
+ $command .= "perl - ";
689
689
  $command .= "/tmp/crunch-src/crunch_scripts/" . $Job->{"script"};
690
690
  } else {
691
691
  # Non-docker run
692
692
  $command .= "crunchstat -cgroup-root=/sys/fs/cgroup -poll=10000 ";
693
693
  $command .= "stdbuf --output=0 --error=0 ";
694
+ $command .= "perl - ";
694
695
  $command .= "$ENV{CRUNCH_SRC}/crunch_scripts/" . $Job->{"script"};
695
696
  }
696
697
 
@@ -1504,9 +1505,11 @@ my $commit = $ENV{"CRUNCH_SRC_COMMIT"};
1504
1505
  my $repo = $ENV{"CRUNCH_SRC_URL"};
1505
1506
  my $task_work = $ENV{"TASK_WORK"};
1506
1507
 
1507
- if ($task_work) {
1508
- make_path $task_work;
1509
- -e $task_work or die "Failed to create temporary working directory ($task_work): $!";
1508
+ for my $dir ($destdir, $task_work) {
1509
+ if ($dir) {
1510
+ make_path $dir;
1511
+ -e $dir or die "Failed to create temporary directory ($dir): $!";
1512
+ }
1510
1513
  }
1511
1514
 
1512
1515
  open L, ">", "$destdir.lock" or die "$destdir.lock: $!";
@@ -1558,7 +1561,11 @@ if ($commit) {
1558
1561
 
1559
1562
  close L;
1560
1563
 
1561
- exit 0;
1564
+ if (@ARGV) {
1565
+ exec(@ARGV);
1566
+ } else {
1567
+ exit 0;
1568
+ }
1562
1569
 
1563
1570
  sub shell_or_die
1564
1571
  {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arvados-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.20140826153331
4
+ version: 0.1.20140826202602
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arvados Authors
@@ -166,7 +166,7 @@ dependencies:
166
166
  - - "<"
167
167
  - !ruby/object:Gem::Version
168
168
  version: 1.0.0
169
- description: This is the Arvados SDK CLI gem, git revision b15e80cdfa29e4bd39f207c8e1d5970373d0d7a1
169
+ description: This is the Arvados SDK CLI gem, git revision 63330000144108862a4e2b02a7a8fa124d01163e
170
170
  email: gem-dev@curoverse.com
171
171
  executables:
172
172
  - arv