-
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
CentOS 7 Support #64
Comments
Hello @MattMencel, The 3.0.0 release was not really focused on providing proper support systemd for pdns either for the recursor or the authoritative. I even dropped systemd support for this release at some point. But later on I decided to leave it broken and promise to fix it soon. Work it's already been done in #61 to provide proper systemd/centos 7 support. I'm looking forward to merge & release a new 3.1.0 version of this cookbook with that PR, but we still have to address a few problems there. |
Ok sounds good. I also noticed that if I had the default pdns-recursor already installed from the main centos repos (version 3.7.4 currently)... the install LWRP here doesn't upgrade to the 4.X version by default. |
@MattMencel can you set a separate issue for that? Thanks. |
Hi @MattMencel can you re-test your changes against CentOS 7? I may be able to add it to the suite in a future release. |
Hi @martinisoft, I tested against the 4.0 version of this cookbook first, without the changes I currently have to do in my wrapper. The pdns_recursor_install and pdns_recursor_config resources work. The pdns_recursor_service resource is not catching that it should use systemd and it runs the _sysvinit version of the resource instead. So I reverted back to just using the pdns_recursor_install resource and then overwriting the default /etc/pdns-recursor/recursor.conf with my template and using the default systemd service that the installer package creates. |
That is really strange since we defer to Chef's built-in detection method for systemd. Which Chef Client version are you running? |
So... systemd doesn't detect correctly on kitchen-docker maybe.... My first tests I was using the docker driver and that's where I saw it pick up _sysvinit. Running it with chef-client 13.2.20 with the test-kitchen vagrant driver detects the _systemd resource just fine. So with vagrant and a CentOS 7.3 box, it installs the package and deploys a new config for my_recursor to /etc/pdns-recursor.
By default, the service created by the installer is going to look at that original recursor.conf file. So I use the systemd_service_drop_in resource from the systemd cookbook to add an override.
So maybe that could be added to your _systemd resource? Or you could deploy a completely separate instance of the pdns-recursor.service? |
Hello @MattMencel, Have you setup docker to start The normal behaviour on CentOS 7, which supports |
Set it up to use the dokken driver as @jmauro suggested and now test-kitchen with the dokken driver works great. Here's what I have in my working wrapper cookbook.
|
Hello @MattMencel , I really don't understand why you should specify a Regards, |
Hi @jmauro , In the
The default CentOS package creates /etc/pdns-recursor/recursor.conf and the default systemd service (/usr/lib/systemd/system/pdns-recursor.service) expects to use that config file. That's why I think I need to do the override. I realized I don't necessarily need to use the May just need to update that helper to this?
But an override would still be needed if a custom name was used. |
Hello @MattMencel, this behaviors seems related to #86, doesn't it? |
I've got a preposed resolution to this in #86 as it also affected us as well. Once @onlyhavecans can give it a look over it'll go out in the next minor release. |
I've just released 4.3.0 which ships #86 so can you please re-check and let me know if this resolves your issue @MattMencel? |
Hi again @MattMencel Since we haven't heard from you we'll be closing this issue. If you have feedback for us please feel free to re-open the issue and update us. |
Opening this for discussion as I'm not sure what needs to be done yet. This is only related to the pdns-recursor.
Install
I think the deployment model for this cookbook currently conflicts with how CentOS 7 installs and configures pdns-recursor.
I used only the install LWRP:
It successfully sets up the repo and installs the latest version:
By default the installer puts the config in /etc/pdns-recursor:
By default the installer sets up a systemd service that expects to find the config in the default location:
By default, when the service runs it creates this default socket file:
The pdns_recursor_config LWRP creates a different default config location, adding an instance_dir and instance_name to the path.
In order to support CentOS 7 I think the default systemd service that is setup during the install above needs to be edited to point to the correct path that is created in the config LWRP? Rather than attempting to create a separate SysVInit service which conflicts with the default systemd service that gets created.
Maybe with this resource? https://docs.chef.io/resource_systemd_unit.html
Again....I can possibly help with a PR, but just not sure which direction the developers here want to go.
Current Workaround
Install: I use the pdns-recursor-install LWRP from this cookbook.
Config: I'm currently using a template in my wrapper cookbook to update the default config at /etc/pdns-recursor/recursor.conf.
Service: Just using the default systemd service created by the installer.
The text was updated successfully, but these errors were encountered: