Generate no cidfile by default, even when deploying as service. #172
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR remove the default value of
/var/run/#{service_name}.cid
when deploying container as a service. In other words, this means that containers will be deployed without a cidfile unless docker_container is configured with an explicit value for its cidfile attribute.The main reason for that (slightly breaking) change is that :
/var/run
which is flushed at every reboot (tmpfs)docker start
won't recreate cidfiles (onlydocker run --cidfile
will)My conclusion is that since the cidfiles we generate in
/var/run
do not survive reboots they cannot be relied upon and should not be generated by default.My other reasons:
fgrep -r cid
shows that no code depends on them in the cookbook)docker run
won't recreate a named container when there is a stale cidfile, see Removing a container should also remove its cidfile. #164)In the past I hacked around the cidfile issue by configuring my docker_container resources with
cidfile ''
but recent dockers (post 0.9) choke whendocker run
is invoked with--cidfile=''
.