-
-
Notifications
You must be signed in to change notification settings - Fork 879
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
Package installs yum repo despite manage_repo setting #653
Comments
If you delete the repo that's being added incorrectly, can you do a puppet run again and make sure that you see in the puppet run's output that the yum repo is being added by Puppet? Taking a cursory look at the code it should not be adding the repo in this case. There's no complicated logic and we have spec test coverage too so there may be another cause (perhaps your hiera config isn't actually being applied?) |
Here's a bit of log that shows it adding the repo:
I'm really rusty on my hiera debugging, and I'm aware of common problems like a root level name being masked by another class downstream. Not having the hiera apply was my first thought, but I haven't figured out how to prove that it is or it isn't. |
If you run with |
This is indeed annoying. We have a custom install (compiled Nginx) so no need for the YUM repo. puppet-agent[15639]: (/Stage[main]/Nginx::Package::Redhat/Yumrepo[nginx-release]/ensure) created
puppet-agent[15639]: Could not get latest version: private method `warn' called for Puppet::Type::Package::ProviderYum:Class Even though the configuration (JSON Hiera here) specifies: "nginx::package_ensure": "absent",
"nginx::package::redhat::manage_repo": false |
@tux-o-matic as I suggested above please run with --debug enabled so you can see more details about how hiera is processing its configuration. |
So on node, something similar to the original message: Notice: /Stage[main]/Nginx::Package::Redhat/Yumrepo[nginx-release]/ensure: created
Info: changing mode of /etc/yum.repos.d/nginx-release.repo from 600 to 644
Debug: /Stage[main]/Nginx::Package::Redhat/Yumrepo[nginx-release]: The container Class[Nginx::Package::Redhat] will propagate my refresh event Yet on the master when using the hiera command to debug the right data is picked up: $ ./hiera --debug nginx::package::redhat::manage_repo environment=13305 osfamily=RedHat
DEBUG: 2015-08-21 12:19:37 +0200: Hiera JSON backend starting
DEBUG: 2015-08-21 12:19:37 +0200: Looking up nginx::package::redhat::manage_repo in JSON backend
DEBUG: 2015-08-21 12:19:37 +0200: Looking for data source common_13305
false This behaviour is happening in multiple environments and on both RHEL and CentOS. |
@tux-o-matic sorry I meant to run |
Well that's the first block of my last message, that's the interesting output of the run with --debug after I manually removed the repo file. |
@tux-o-matic there should be output from hiera when --debug is used with the Can you please post the full output when using --debug? |
Finally worked it out. Of all combinations, there is only one place where it should and can be set (working on v0.2.7). And that is on top level, nginx.pp, so in Hiera nginx::manage_repo: false Tested on both Centos 6.6 container and RedHat 6.7 server. nginx::package_ensure: absent |
I need to pick up a custom build of nginx from a local yum repository (RedHat based machines).
I have set
in hiera, and added for good measure
The module appears to add the nginx release repository to yum.repos.d regardless. I get the correct package of nginx installed, so the repo search order is correct, but I need to not have that extra repo on the machine.
The text was updated successfully, but these errors were encountered: