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

Invalid package provider 'sensu_gem' #383

Closed
rickatnight11 opened this issue Jul 15, 2015 · 9 comments
Closed

Invalid package provider 'sensu_gem' #383

rickatnight11 opened this issue Jul 15, 2015 · 9 comments

Comments

@rickatnight11
Copy link
Contributor

I have my sensu server set up with this module, but I can't figure out why it's not registering sensu_gem as a valid provider. I'm using the embedded Ruby, and this code:

  package { 'redphone':
    ensure   => 'installed',
    provider => sensu_gem,
  }

...is resulting in:

[root@mgmt01 ~]# puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for <omitted>.org
Error: Failed to apply catalog: Parameter provider failed on Package[redphone]: Invalid package provider 'sensu_gem' at /etc/puppet/modules/monitoring/manifests/sensu/client.pp:9
@jlambert121
Copy link
Contributor

What version of the sensu module and puppet? Have you restarted your puppet masters since installing the module?

@rickatnight11
Copy link
Contributor Author

I'm running Puppet 3.8.1 on CentOS 7.1, and I installed the sensu module via puppet module install sensu/sensu:

[root@mgmt01 puppet]# puppet module list | grep sensu
├── sensu-sensu (v1.3.1)

I'm using Passenger via httpd as the puppet master, and I've restarted httpd several times for other changes to take effect. Is that sufficient?

@jlambert121
Copy link
Contributor

@rickatnight11 I don't think the sensu_gem provider is in a released version of the sensu module, but we'll have a 2.0 release (hopefully) before long that will have it. If you'd like to test it out now you can run the module from git.

@rickatnight11
Copy link
Contributor Author

Ah, I assumed what puppet pulled from Forge would reflect what's documented there and here on Github, but it looks like Forge shows v1.5.5 as the latest, while I only pulled v1.3.1. The changelog shows that v1.4.0 includes the sensu_gem package provider from #274, so that's totally my problem.

Interestingly it's not letting me upgrade the module:

[root@mgmt01 modules]# puppet module upgrade sensu/sensu
Notice: Preparing to upgrade 'sensu-sensu' ...
Notice: Found 'sensu-sensu' (v1.3.1) in /etc/puppet/modules ...
Notice: Downloading from https://forgeapi.puppetlabs.com ...
Error: Could not upgrade module 'sensu-sensu' (v1.3.1 -> latest)
  There are 3 newer versions
    No combination of dependency upgrades would satisfy all dependencies
    Dependencies will not be automatically upgraded across major versions
    Upgrading one or more of these modules may permit the upgrade to succeed:
    - maestrodev-wget
    - puppetlabs-apt
    - puppetlabs-stdlib
    Use `puppet module upgrade --force` to upgrade only this module

If I uninstall and reinstall it, it just installs v1.3.1 again.

@rickatnight11
Copy link
Contributor Author

Ahah, it's because it depends on puppetlabs/apt (>= 0.0.1 <2.0.0), and my puppetlabs-apt module is on v2.1.0.

@rickatnight11
Copy link
Contributor Author

Booyah, I downgraded puppetlabs-apt to 1.8.0, and now sensu-sensu upgrades fine:

[root@mgmt01 modules]# puppet module uninstall puppetlabs-apt --force
Notice: Preparing to uninstall 'puppetlabs-apt' ...
Removed 'puppetlabs-apt' (v2.1.0) from /etc/puppet/modules
[root@mgmt01 modules]# puppet module install puppetlabs-apt --version 1.8.0
Notice: Preparing to install into /etc/puppet/modules ...
Notice: Downloading from https://forgeapi.puppetlabs.com ...
Notice: Installing -- do not interrupt ...
/etc/puppet/modules
└─┬ puppetlabs-apt (v1.8.0)
  └── puppetlabs-stdlib (v4.6.0)
[root@mgmt01 modules]# puppet module upgrade sensu/sensu
Notice: Preparing to upgrade 'sensu-sensu' ...
Notice: Found 'sensu-sensu' (v1.3.1) in /etc/puppet/modules ...
Notice: Downloading from https://forgeapi.puppetlabs.com ...
Notice: Upgrading -- do not interrupt ...
/etc/puppet/modules
└── sensu-sensu (v1.3.1 -> v1.5.5)

Now I see the sensu_gem provider code:

[root@mgmt01 modules]# find . -name sensu_gem.rb
./sensu/lib/puppet/provider/package/sensu_gem.rb

@rickatnight11
Copy link
Contributor Author

Now I'm hitting the Invalid parameter reconnect_on_error on Sensu_rabbitmq_config bug in #336. I think I'll take your advice and switch to GitHub master.

@rickatnight11
Copy link
Contributor Author

After a restart of my Passenger puppetmaster:

...
Notice: /Stage[main]/Monitoring::Sensu::Client/Package[redphone]/ensure: created
...

Woooooot. Thanks for the help, @jlambert121!

@jlambert121
Copy link
Contributor

Glad this worked! We'll get a new release out soon which will help!

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

No branches or pull requests

2 participants