Skip to content

Commit

Permalink
A null from dos2unix causes the container to restart?
Browse files Browse the repository at this point in the history
  • Loading branch information
rHorsey committed Jun 17, 2017
1 parent 7dc6836 commit 21165bd
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions server/app/workers/run_simulate_data_point.rb
Expand Up @@ -344,11 +344,13 @@ def initialize_worker
# Run the server data_point initialization script with defined arguments, if it exists. Convert CRLF if required
begin
Timeout.timeout(600) do
exec("find #{analysis_dir}/scripts -type f -print0 | xargs -0 dos2unix")
files = Dir.glob("#{analysis_dir}/scripts/worker_initialization/*").select { |f| !f.match(/.*args$/) }.map { |f| File.basename(f) }
files.each do |f|
@sim_logger.info "Found data point initialization file #{f}."
run_file(analysis_dir, 'initialization', f)
if File.directory? File.join(analysis_dir, 'scripts')
exec("find #{analysis_dir}/scripts -type f -print0 | xargs -0 dos2unix")
files = Dir.glob("#{analysis_dir}/scripts/worker_initialization/*").select { |f| !f.match(/.*args$/) }.map { |f| File.basename(f) }
files.each do |f|
@sim_logger.info "Found data point initialization file #{f}."
run_file(analysis_dir, 'initialization', f)
end
end
end
rescue => e
Expand Down

1 comment on commit 21165bd

@rHorsey
Copy link
Contributor Author

@rHorsey rHorsey commented on 21165bd Jun 17, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See moby/moby#21081 - a kind note from syslog: aufs au_opts_verify:1612:dockerd[13073]: dirperm1 breaks the protection by the permission bits on the lower branch which tells us nothing about why piping the null find to dos2unix causes the crash. :)

Please sign in to comment.