-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pdns_recursor_service_sysvinit behaves different when using Vagrant or Docker as providers #77
Comments
Have you opened an upstream issue with kitchen? I have a feeling someone may have run into this. |
I have not @martinisoft since I'm not really sure where the problem comes (kitchen, kitchen-dokken or even chef). |
Can you run Chef in debug mode to show what actions it is taking versus the service setup? |
@martinisoft that's interesting. I've been able to run Chef in debug mode by attaching |
There is a difference between chef debug and kitchen debug. |
@martinisoft the important bytes come when running chef debug. This is the trace of our internal cookbook (Vagrant), Chef fails to recognize the recursor process (and therefore it decides that it does not exist so it does not stop it). I don't know what happens in Docker because the issue mentioned above
|
Hello, I think I had the same issue on kitchen vagrant that's why I put the guardfile: |
This is the trace when running
|
A better trace of the wrapper cookbook:
|
With this round of findings, I have the issue narrowed down and a solution. Behaviour in: Docker
Vagrant
ConclusionThe erratic behaviour in docker (and in CentOS, see addendum below) mislead me on thinking that SolutionRun a AddendumThere is an additional problem on CentOS 6.7 that surfaces only when we try to stop the default pdns-recursor on top on disabling it (see code example below). This which is the simplest and ideal solution to the issue will break tests on CentOS 6.7. This piece of code stops one of the recursors created by
When running
Why this happens?
Final solutionStopping the recursor only on debian based distros:
NotesThe mix of different behaviours between Centos6.7 (addressed first in 3.3.2 release), Vagrant and Docker has been confused me for the time being and it has not being until a couple of heavy debugging sessions that I've got all the pieces together. |
@jmauro the problem with your solution is that it did not work well on Ubuntu. This workaround makes both CentOS and Ubuntu happy. Also works in both Docker and Vagrant. |
Our internal wrapper cookbook has been failing converge after 3.3.1 release.
The reason is that the
service
block that stops the initial pdns-recursor service installed by the package itself behaves different in Vagrant and Docker as providers.The following block part on pdns_recursor_service_sysvinit:
update-rc.d
.update-rc.d
I have been able to reproduce this by simply running a recipe:
And running it with Vagrant and Docker providers (using:
export KITCHEN_LOCAL_YAML=.kitchen.dokken.yml
for Docker).Chef fails in Vagrant, but converges fine with Docker.
The text was updated successfully, but these errors were encountered: