zachfi / puppet-bsd

A Puppet module for BSD
Apache License 2.0
9 stars 11 forks source link

Error: Failed to apply catalog: no parameter named 'value' #118

Closed da125 closed 6 years ago

da125 commented 6 years ago

Hi,

With the below config, I'm getting an error that I cannot figure out `package { 'ipaddress': ensure => 'present', provider => 'gem', }

class { 'bsd::network': v4gateway => '1.2.3.4' }`

The error: puppet agent --test --noop Info: Using configured environment 'production' Info: Retrieving pluginfacts Info: Retrieving plugin Info: Retrieving locales Info: Loading facts Warning: Found multiple default providers for sysctl: parsed, augeas; using parsed Error: Failed to apply catalog: no parameter named 'value'

The puppet node is an OpenBSD 6.3 amd64 bare-metal with ruby-2.4.3p0 and ipaddress version 0.8.3.

Can this issue be fixed?

zachfi commented 6 years ago

Hi. Yes this can be fixed. I believe you just need to ensure you have the right dependencies in place. Please see this section of the metadata for a dependency list.

https://github.com/xaque208/puppet-bsd/blob/master/metadata.json#L30

Once you've got those installed, let me know if there is still an issue.

da125 commented 6 years ago

I already have all of them installed on the puppet master.

remkolodder commented 6 years ago

did you restart the puppetmaster? I needed to do that before the new modules and stuff got recognized ..

da125 commented 6 years ago

restarted. now I'm getting:

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: no parameter named 'value' (file: /etc/puppetlabs/code/environments/production/modules/bsd/manifests/network.pp, line: 32) on Sysctl[net.inet.ip.forwarding]

zachfi commented 6 years ago

If you have the another sysctl provider installed, you might remove the ones that are not mentioned in the metadata. This is likely just a conflict of the agueas provider compared to the older sysctl provider.

da125 commented 6 years ago

Removed. Had "duritong-sysctl". The error persists though.

Currently installed modules: /etc/puppetlabs/code/environments/production/modules ├── dalen-puppetdbquery (v3.0.1) ├── example42-puppi (v2.2.5) ├── herculesteam-augeasproviders_apache (v2.0.2) ├── herculesteam-augeasproviders_base (v2.0.1) ├── herculesteam-augeasproviders_core (v2.1.4) ├── herculesteam-augeasproviders_grub (v2.4.0) ├── herculesteam-augeasproviders_mounttab (v2.0.3) ├── herculesteam-augeasproviders_nagios (v2.0.2) ├── herculesteam-augeasproviders_pam (v2.1.1) ├── herculesteam-augeasproviders_postgresql (v2.0.4) ├── herculesteam-augeasproviders_puppet (v2.1.1) ├── herculesteam-augeasproviders_shellvar (v2.2.3) ├── herculesteam-augeasproviders_ssh (v2.5.3) ├── herculesteam-augeasproviders_sysctl (v2.2.0) ├── herculesteam-augeasproviders_syslog (v2.1.1) ├── pdxcat-nrpe (v2.1.1) ├── puppetlabs-concat (v4.2.1) ├── puppetlabs-motd (v1.9.0) ├── puppetlabs-mount_providers (v1.0.0) ├── puppetlabs-ntp (v7.1.1) ├── puppetlabs-registry (v1.1.4) ├── puppetlabs-stdlib (v4.25.1) ├── ssm-munin (v0.0.9) ├── thrnio-ip (v1.0.1) ├── zleslie-bsd (v2.2.0) └── zleslie-openvpn (v1.1.5) /etc/puppetlabs/code/modules └── mymodule (???) /opt/puppetlabs/puppet/modules └── files (???)

da125 commented 6 years ago

Any ideas?

zachfi commented 6 years ago

Once the module is removed, you may need to restart the puppet server. This should force the master to learn that the manifest now has a value param on it. If you've already done that we can dig a bit more.

da125 commented 6 years ago

I've already restarted the puppet server but like I said, sadly nothing changed.

zachfi commented 6 years ago

Just to confirm then, there is no other sysctl module in /etc/puppetlabs/code/environments/production/modules, correct? The error message should have changed if this were the case. Would you mind posting the latest error please? Does the master log give you any extra indication?

da125 commented 6 years ago

I only have the "herculesteam-augeasproviders_sysctl" module.

The node.pp contains:

node 'nodename' { package { 'ipaddress': ensure => 'present', provider => 'gem', }

class { 'bsd::network': v4gateway => '10.0.0.1', }

bsd::network::interface { 'em0': description => 'Primary Interface', addresses => [ '10.0.0.2/24', 'fc00::b0b/64' ], } }

Puppet error on the agent:

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, Could not autoload puppet/parser/functions/get_openbsd_hostname_if_content: no such file to load -- ipaddress (file: /etc/puppetlabs/code/environments/production/modules/bsd/manifests/network/interface.pp, line: 75, column: 20) (file: /etc/puppetlabs/code/environments/production/manifests/node.pp, line: 14) on node nodename Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run

"gem list" returns "ipaddress (0.8.3)" on the agent.

I'm not really sure why it cannot find it.

remkolodder commented 6 years ago

did you do a puppetserver gem install ipaddress and then restart the puppetserver? I had something similar and needed to do just that..

da125 commented 6 years ago

Forgot to mention that I did that a couple of days ago but just for the hell of it, I can confirm that I have ipaddress (0.8.3) on the puppetserver and that after restarting the server, I get the same error on the agent.

zachfi commented 6 years ago

On you're master, you should have ipaddress in the output from puppetserver gem list. The error is complaining about the function, which are only run on the master.

da125 commented 6 years ago

Indeed, puppetmaster gem list does not return the ipaddress module but gem list does. I removed the module with gem uninstall ipaddress and did a puppetmaster gem install ipaddress. restarted the master and everything works now.

Thank you!

zachfi commented 6 years ago

No worries. Let us know if any other issues pop up.