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

Broken plugins dependencies after updating sensu to 0.25.0 #1339

Closed
ttarczynski opened this issue Jun 14, 2016 · 9 comments

Comments

Projects
None yet
6 participants
@ttarczynski
Copy link

commented Jun 14, 2016

After updating sensu to version 0.25.0 some plugins stopped working due to missing 'sensu-plugin' (= 1.2.0) dependency.
Here's an example:

# /opt/sensu/embedded/bin/gem list | egrep 'sensu-plugin |sensu-plugins-cpu-checks '
sensu-plugin (1.3.0)
sensu-plugins-cpu-checks (0.0.4)

# /opt/sensu/embedded/bin/check-cpu.rb 
/opt/sensu/embedded/lib/ruby/site_ruby/2.3.0/rubygems/dependency.rb:310:in `to_specs': Could not find 'sensu-plugin' (= 1.2.0) - did find: [sensu-plugin-1.3.0] (Gem::MissingSpecVersionError)

I think this issue is caused by:

  • sensu-plugin is updated to version 1.3.0 in sensu 0.25.0
  • some checks have a fixed version dependency to 'sensu-plugin' (= 1.2.0)

So it's probably something to be fixed in plugins.
These are the plugins that stopped working in my setup after update:

sensu-plugins-cpu-checks (0.0.4)
sensu-plugins-disk-checks (1.1.3)
sensu-plugins-docker (1.1.1)
sensu-plugins-entropy-checks (0.0.3)
sensu-plugins-load-checks (0.0.4)
sensu-plugins-process-checks (0.0.6)
sensu-plugins-puppet (0.0.2)
@ttarczynski

This comment has been minimized.

Copy link
Author

commented Jun 14, 2016

Here's a workaround that worked for me:

# /opt/sensu/embedded/bin/gem install sensu-plugin --version '=1.2.0'

# /opt/sensu/embedded/bin/gem list | egrep 'sensu |sensu-plugin |sensu-plugins-cpu-checks '
sensu (0.25.0)
sensu-plugin (1.3.0, 1.2.0)
sensu-plugins-cpu-checks (0.0.4)

I've installed sensu-plugin (= 1.2.0) gem and now all checks work OK again.

@Halytskyi

This comment has been minimized.

Copy link

commented Jun 14, 2016

I can confirm, that after upgrade to 0.25.0-1 version (Ubuntu Trusty) some plugins (like check-ntp, metrics-uptime, etc) stopped working:

# /opt/sensu/embedded/bin/check-ntp.rb /opt/sensu/embedded/lib/ruby/site_ruby/2.3.0/rubygems/dependency.rb:310:in to_specs': Could not find 'sensu-plugin' (= 1.2.0) - did find: [sensu-plugin-1.3.0] (Gem::MissingSpecVersionError)
Checked in 'GEM_PATH=/root/.gem/ruby/2.3.0:/opt/sensu/embedded/lib/ruby/gems/2.3.0', execute gem env for more information
from /opt/sensu/embedded/lib/ruby/site_ruby/2.3.0/rubygems/specification.rb:1439:in block in activate_dependencies' from /opt/sensu/embedded/lib/ruby/site_ruby/2.3.0/rubygems/specification.rb:1428:in each'
from /opt/sensu/embedded/lib/ruby/site_ruby/2.3.0/rubygems/specification.rb:1428:in activate_dependencies' from /opt/sensu/embedded/lib/ruby/site_ruby/2.3.0/rubygems/specification.rb:1410:in activate'
from /opt/sensu/embedded/lib/ruby/site_ruby/2.3.0/rubygems.rb:279:in block in activate_bin_path' from /opt/sensu/embedded/lib/ruby/site_ruby/2.3.0/rubygems.rb:279:in synchronize'
from /opt/sensu/embedded/lib/ruby/site_ruby/2.3.0/rubygems.rb:279:in activate_bin_path' from /opt/sensu/embedded/bin/check-ntp.rb:22:in

'`

Another temporary fix, downgrade to '0.24.1-1' version.

@zbintliff

This comment has been minimized.

Copy link
Contributor

commented Jun 14, 2016

This seems more of an issue with the sensu-plugins than with sensu.

@cwjohnston

This comment has been minimized.

Copy link
Member

commented Jun 14, 2016

Thanks for reporting this issue. The problem you are experiencing is specific to sensu-plugin gems which have dependency on sensu-plugin = 1.2.0 instead of allowing for newer versions, e.g. sensu-plugin ~> 1.2.

Sensu 0.25 ships with sensu-plugin 1.3.0. Installing sensu-plugin 1.2.0 into your Sensu embedded Ruby environment should be a usable workaround.

The Sensu Plugins team is working to issue new versions of the affected plugins to resolve this; it would be helpful if you would open issues on the specific affected projects under the sensu-plugins organization.

@portertech

This comment has been minimized.

Copy link
Member

commented Jun 14, 2016

We are going to ship sensu-plugin 1.2.0 AND 1.3.0 in the Sensu 0.25.1-1 package, later today 👍

@Salamek

This comment has been minimized.

Copy link

commented Jun 14, 2016

@portertech Maybe move 0.25.1 package to main from unstable... cos 0.25.0 is totaly "broken" (well it is not but sensu withnout working plugins is useless)

@Salamek

This comment has been minimized.

Copy link

commented Jun 14, 2016

@portertech all green, thx

@ttarczynski

This comment has been minimized.

Copy link
Author

commented Jun 15, 2016

I've just updated to 0.25.1 which includes both sensu-plugin 1.2.0 and 1.3.0 (Support multiple versions of sensu-plugin #166).
Checks works OK, and the above workaround is no longer needed. So I think it solves this issue.

@portertech @amdprophet thank you for fixing this right away.

@ttarczynski

This comment has been minimized.

Copy link
Author

commented Jun 15, 2016

@cwjohnston I've looked into the code in sensu-plugins organization.
I've searched for: org:sensu-plugins "add_runtime_dependency sensu-plugin" and it seems that many plugins already have corrected dependency on master:

s.add_runtime_dependency 'sensu-plugin', '~> 1.2'

but haven't been released since the correction.
Here is one such example: sensu-plugins-cpu-checks – New release needed #14

@ttarczynski ttarczynski referenced this issue Jun 20, 2016

Merged

Changes in runtime dependencies #34

3 of 5 tasks complete

@portertech portertech closed this Mar 20, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.