Skip to content
This repository has been archived by the owner on Jun 17, 2023. It is now read-only.

Prefetching postconf provider instances fails if not all entries are managed by puppet #2

Open
oxc opened this issue Jun 15, 2017 · 1 comment

Comments

@oxc
Copy link
Contributor

oxc commented Jun 15, 2017

In my setup, I'd like to only have those config parameters in my main.cf that I have explicitly defined in puppet.

Thanks to the resource provider, this could usually be achieved by this snippet:

resources { 'postconf': 
  purge => true,
  noop => true, # only warn about unmanaged resources
}

However, this fails with a Nil dereference in postconf.rb#L42, where the value is split unless size==1, because those resources have no value set.

I tried to fix this and submit a pull request, but I can't really figure out what's going on here in the first place. Can you explain why the value is split on /', +/? Seems strange :) (Note that there are postconf values that can legally contain a comma followed by a space which does not donate multiple values, e.g. in the subkey syntax for smtpd_milters)
If I change the unless condition to handle nil values (either way), or remove the split altogether, everything seems to work correctly.

@oxc oxc changed the title Prefetching postconf resources fails if not all entries are managed by puppet Prefetching postconf provider instances fails if not all entries are managed by puppet Jun 15, 2017
@oxc
Copy link
Contributor Author

oxc commented Jun 19, 2017

See #5

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant