BeyondTheClouds / enos

Experimental eNvironment for OpenStack :monkey:
https://beyondtheclouds.github.io/enos/
GNU General Public License v3.0
30 stars 22 forks source link

Add a polling to the init #280

Closed msimonin closed 6 years ago

msimonin commented 6 years ago

Currently init is launched asynchronously. This can lead to race when the deployment is used directly without waiting for all the initial resources to be created.

see: https://github.com/BeyondTheClouds/enos/blob/8510f44bb418f4774ddfc5a393a7c04314ac0d93/enos/ansible/roles/init_os/tasks/main.yml#L39-L46

rcherrueau commented 6 years ago

Any reasons why this is done asynchronously? I mean, another solution would be to add detach: False in the docker_container rule to execute it synchronously.

(Sorry, I am a bit late on that one)

msimonin commented 6 years ago

Oh yes detach: False would have done the trick. Should we change it ?

rcherrueau commented 6 years ago

I vote yes since the task will reflect the status of the container. Thus, enos init will fail if the init_os fails. Could not remember if this also avoids docker logs and debug tasks from https://github.com/BeyondTheClouds/enos/commit/3ecd3988b2df4ed2b905f4c0a060473569d720eb

msimonin commented 6 years ago

Agreed, I'd keep the debug if that's possible.