biemond / biemond-oradb

Puppet Oracle Database Module
Apache License 2.0
59 stars 113 forks source link

Puppet Server Error: no parameter named 'provider' #255

Open mattstrain opened 5 years ago

mattstrain commented 5 years ago

Since Saturday evening all our nodes which use this module now fail with the following error:

2019-02-19 16:17:56,240 ERROR [qtp1473142752-67] [puppetserver] Puppet no parameter named 'provider' at /etc/puppetlabs/code/environments/development/modules/oradb/manifests/dbactions.pp:43 on Db_control[instance control database_oracletest] at /etc/puppetlabs/code/environments/development/modules/oradb/manifests/dbactions.pp:43 on node oracletest.sys.XXXX.co.uk 2019-02-19 16:17:56,241 ERROR [qtp1473142752-67] [puppetserver] Puppet Server Error: no parameter named 'provider' at /etc/puppetlabs/code/environments/development/modules/oradb/manifests/dbactions.pp:43 on Db_control[instance control database_oracletest] at /etc/puppetlabs/code/environments/development/modules/oradb/manifests/dbactions.pp:43 on node oracletest.sys.XXXX.co.uk

We use a master - agent configuration and at first thought it might be an issue with our master server getting corrupted somehow.

However I have since created a new isolated master server and a new node to configure but I get the same error.

Do you have any idea as to why puppet see's the provider option as a parameter which should be declared in the type?

What is also odd is other puppet modules we use, that have various providers such as the vcsrepo modules functions without issue when specifying a provider parameter.

biemond commented 5 years ago

strange see https://github.com/biemond/biemond-oradb/blob/puppet4_3_data/manifests/dbactions.pp#L45 . and it has a default https://github.com/biemond/biemond-oradb/blob/puppet4_3_data/manifests/dbactions.pp#L31 . Do make this null or empty in your config somewhere. I think you can use debug and trace to find out.

mattstrain commented 5 years ago

Hi thanks for the reply.

No it complains that the param is included in the call, as it seems to think db_control should not be given a 'provider' parameter.

In fact if I comment out https://github.com/biemond/biemond-oradb/blob/puppet4_3_data/manifests/dbactions.pp#L45 it works??

biemond commented 5 years ago

strange they are there https://github.com/biemond/biemond-oradb/tree/puppet4_3_data/lib/puppet/provider/db_control

and it should be required https://github.com/biemond/biemond-oradb/blob/puppet4_3_data/lib/puppet/type/db_control.rb and a standard property of a custom type. I guess it won't work anymore.

let me do some research on it. What is the puppet versions you use.

mattstrain commented 5 years ago

Hi well we are actually using quite an old version, which has not changed in any way since our servers all started failing.

We have 4.10.12 on all agents and 4.7.0 on the master.

mattstrain commented 5 years ago

Intrestingly I noticed that on the first run we get this error

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 Resource Statement, Could not autoload puppet/type/db_control: Could not autoload puppet/provider/db_control/srvctl: Could not find parent provider base of srvctl at /etc/puppetlabs/code/environments/development/modules/oradb/manifests/dbactions.pp:43:3 at /etc/puppetlabs/code/environments/development/modules/alfa_oracledb/manifests/database.pp:50 on node oracletest.sys.xxxx.co.uk

and then the following (same as above) on all subsequent runs

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: no parameter named 'provider' at /etc/puppetlabs/code/environments/development/modules/oradb/manifests/dbactions.pp:43 on Db_control[instance control database_oracletest] at /etc/puppetlabs/code/environments/development/modules/oradb/manifests/dbactions.pp:43 on node oracletest.sys.XXXX.co.uk Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run

biemond commented 5 years ago

ah, ok that is the main issue here. So in the early days we had to put the modules on the primary module location, restart master, do some dummy puppet runs on the master so it detects everything. After that the agents picks up all the types and providers.

mattstrain commented 5 years ago

ah-ha so that fixed it! I changed the /etc/puppetlabs/code/modules directory to a symlink to our modules directory in our 'development' environment, rebooted and ran puppet on the master.

Can I ask what you mean by early days? I guess you meant our version of Puppet. Would this work on 4.10?

biemond commented 5 years ago

nice, I don't know about puppet 5 or 6 but with puppet 3 & 4 I know this puppet master issue .

mattstrain commented 5 years ago

Great. Thanks for all your help!