Puppet problem with api_user


#1

I’m helping out someone at work who ran into this strange problem with the current sensu puppet module.

He set a value for “sensu::api_user” other than the default (which is “undef”), and we would get this error from the puppet agent:

Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter user at /etc/puppet/environments/montest/modules/sensu/manifests/api/config.pp:30 on node test-mon-sensu01

I had him remove the setting for api_user, and api_password, and try again (hopefully picking up the default undef values), and still got the same error.

Finally we went into sensu/manifests/api/config.pp and commented out the resource definitions for user => and password =>, and the catalog would finally compile.

I’ve been studying the lib directory trying to find any cause for that problem, and I’ve come up empty.

Any other suggestions?

Best regards,
Mojo


#2

That seems pretty strange. Puppet is telling you the right line in the
code where it is being called out (config:30)

But to answer *why* "user" is not a valid parameter, can you confirm
that your sensu_api_config type looks sane?


That is where user becomes a param (property)

Providers can be a bit tricky to debug, because that code gets
executed on the client, so they end up merged in:
/var/lib/puppet/lib/puppet/type/sensu_api_config.rb

Can you confirm on the *client* that looks ok? The only explanation I
could think of is that there is an old version of the type/provider on
the client, and you are using a new module on the server, and
pluginsync is disabled for some reason, preventing the new
type/provider code from syncing over.

···

On Tue, Jun 17, 2014 at 11:42 AM, Mojo <mojo.la@gmail.com> wrote:

I'm helping out someone at work who ran into this strange problem with the
current sensu puppet module.

He set a value for "sensu::api_user" other than the default (which is
"undef"), and we would get this error from the puppet agent:

Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid
parameter user at
/etc/puppet/environments/montest/modules/sensu/manifests/api/config.pp:30 on
node test-mon-sensu01

I had him remove the setting for api_user, and api_password, and try again
(hopefully picking up the default undef values), and still got the same
error.

Finally we went into sensu/manifests/api/config.pp and commented out the
resource definitions for user => and password =>, and the catalog would
finally compile.

I've been studying the lib directory trying to find any cause for that
problem, and I've come up empty.

Any other suggestions?

Best regards,
Mojo