Skip to content
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

Bug - Update snmp::params to use proper fqdn fact #169

Closed
wants to merge 1 commit into from
Closed

Bug - Update snmp::params to use proper fqdn fact #169

wants to merge 1 commit into from

Conversation

blackknight36
Copy link
Contributor

@blackknight36 blackknight36 commented Nov 12, 2018

$facts['networking'] does not exist on all platforms. For example, running the agent on a Fedora 27 node results in the following error.

[puppetserver] Puppet Evaluation Error: Operator '[]' is not applicable to an Undef Value. at /etc/puppetlabs/code/environments/production
/forge_modules/snmp/manifests/params.pp:27:14 on node foo.example.com

Puppet catalog compilation will fail when a template attempts
to use a fact that is not defined.
@Dan33l
Copy link
Member

Dan33l commented Nov 12, 2018

Hi @blackknight36 you are probably using unsupported version of facter and so unsupported version of puppet. Structured facts came with facter 2.x we are currently with facter 3.x
You can have a look to metadata.json to know supported version of puppet.

You should get this output with facter command about networking section.

[root@fedora27-64-1 /]# uname -a
Linux fedora27-64-1 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[root@fedora27-64-1 /]# facter -p networking
{
  domain => "openstacklocal",
  fqdn => "fedora27-64-1.openstacklocal",
  hostname => "fedora27-64-1",
  interfaces => {
    eth0 => {
      bindings => [
        {
          address => "172.17.0.2",
          netmask => "255.255.0.0",
          network => "172.17.0.0"
        }
...
[root@fedora27-64-1 /]# facter --version
3.11.6 (commit eb33a4d59e9b09d6c95028c215aa7d3081c097d3)

@alexjfisher
Copy link
Member

@blackknight36 Version 4.0.0 had several breaking changes and arguably dropping support for facter 2 was one of them. We should have probably made this clearer.

Legacy facts aren’t yet deprecated, but they are discouraged. Facter 3 was shipped by Puppet Inc with puppet 4.2 and unfortunately we can’t support all combinations of puppet, ruby, facter etc indefinitely. This situation is similar to how we support various modules on EL6, but haven’t with the OS packages (with ruby 1.8) for a very long time now.

The metadata.json doesn’t have support for declaring the minimum supported facter version. We currently still do support puppet 4, but only 4.10 onwards. We would be willing to support fedora 27, but unfortunately not with the OS supplied packages. I really don’t know why fedora ships puppet 4.10 but only facter 2.4 (this isn’t a combination puppet Inc has ever come close to shipping together).

It’s also worth mentioning, we probably won’t support puppet 4 at all sometime in the first half of next year as it goes EOL at the end of 2018.

Are you able to install puppet 4 from https://yum.puppetlabs.com/fedora/f27/PC1/x86_64/ ?

@blackknight36
Copy link
Contributor Author

@alexjfisher Thanks for the help. I could install the PC1 packages on our Fedora 27 nodes but we still have several systems running Fedora 20 which I cannot upgrade. Looks like I'll have to set our environment to use the 3.9.3 release which should resolve the issues I'm having.

@vStone vStone added the invalid label Nov 22, 2018
@vStone
Copy link
Contributor

vStone commented Nov 22, 2018

Can this be closed then @blackknight36 ?

@blackknight36
Copy link
Contributor Author

@vStone Yeah, I thought I already did. Going to close the request now.

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

Successfully merging this pull request may close these issues.

4 participants