Skip to content

Commit

Permalink
Making 'singularity pull' more tolerant
Browse files Browse the repository at this point in the history
  • Loading branch information
natacha-beck committed Aug 23, 2017
1 parent fb187ff commit 70e46ba
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions BrainPortal/app/models/cluster_task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2372,8 +2372,9 @@ def load_singularity_image_from_repo #:nodoc:
errfile = "/tmp/.container_load_cmd.#{self.run_id}.err"
success = system("#{singularity_executable_name} pull --name #{image_name.bash_escape} #{singularity_image_name.bash_escape} </dev/null >/dev/null 2>#{errfile.bash_escape}")
err = File.read(errfile) rescue "No Error File?"
# Singularity command can generate `implausibly old timestamp` when pulling a docker image (due to tar), we ignore it.
err.gsub!(/^.implausibly old time stamp.$\n?/,"")
# Singularity command can generate 'implausibly old time stamp' when pulling a docker image (due to tar), we ignore it.
# Remove all lines (use ^ and $) that contains this message.
err.gsub!(/^.*implausibly old time stamp.*$\n?/,"")
cb_error "Cannot pull singularity image" if
err.present? ||
! success ||
Expand Down

0 comments on commit 70e46ba

Please sign in to comment.