datosgobar/portal-andino

Al deployear, puede ocurrir que se intente ejecutar scripts en el container mientras éste se está reiniciando

chdigiorno opened this issue · 0 comments

Ejemplo:

Error response from daemon: Container 5d525171d0f9a99346e2611fc987324b5df17cfbf6624779de7fb06272b44118 is restarting, wait until the container is running
[ ERROR ] Error al correr el script 'run_updates.sh'
Traceback (most recent call last):
  File "/home/[secure]/update.py", line 135, in run_configuration_scripts
    self.run_compose_command("exec -T portal bash /etc/ckan_init.d/run_updates.sh")
  File "/home/[secure]/installation_manager.py", line 40, in run_compose_command
    output = self.run_with_subprocess("docker-compose {0} {1}".format(self.convert_compose_files_to_flags(), cmd))
  File "/home/[secure]/installation_manager.py", line 36, in run_with_subprocess
    return subprocess.check_output(cmd, shell=True).strip()
  File "/usr/lib/python2.7/subprocess.py", line 574, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
CalledProcessError: Command 'docker-compose -f latest.yml -f latest.dev.yml exec -T portal bash /etc/ckan_init.d/run_updates.sh' returned non-zero exit status 1
Error response from daemon: Container 5d525171d0f9a99346e2611fc987324b5df17cfbf6624779de7fb06272b44118 is restarting, wait until the container is running```