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

RVM conflicts with sensu-install #876

Closed
tibers opened this issue Jan 26, 2018 · 1 comment
Closed

RVM conflicts with sensu-install #876

tibers opened this issue Jan 26, 2018 · 1 comment
Labels

Comments

@tibers
Copy link

tibers commented Jan 26, 2018

The scenario is that if rvm installs ruby first, sensu-install -p sensu-plugins-elasticsearch will install the gems into the systemwide ruby folder and sensu can no longer find the gems. If I install sensu first, sensu-install does The Right Thing and installs them in the embedded ruby path. I can't just go ripping rvm and ruby out of prod however. :)

/etc/default/sensu has embedded ruby set to true.

Talked a bit with @majormoses - installing rvm and then trying to use sensu-install throws problems:

[root@esdata03 centos]# /opt/sensu/embedded/bin/sensu-install -p elasticsearch
/opt/sensu/embedded/lib/ruby/site_ruby/2.4.0/rubygems.rb:270:in `find_spec_for_exe': can't find gem sensu (>= 0.a) (Gem::GemNotFoundException)
	from /opt/sensu/embedded/lib/ruby/site_ruby/2.4.0/rubygems.rb:298:in `activate_bin_path'
	from /opt/sensu/embedded/bin/sensu-install:22:in `<main>'

However we can work around this by calling the embedded gem installer directly:

/opt/sensu/embedded/bin/gem install sensu-plugins-elasticsearch

I propose changing the sensu_gem provider (which is way above my head) to invoke the embedded gem install directly.

Platform and version information

  • Your OS: centos 7
  • Your Ruby version: 2.4.0 (2.4.1 embedded with sensu)
  • Your version of Puppet: 5.3.3
  • Your version of Sensu: sensu-1.2.0-1.el7.x86_64
  • Your version of this module: 2.50.0

Anything else to add that you think will be helpful?

Beer. So much beer.

@tibers
Copy link
Author

tibers commented Jan 27, 2018

It looks very similar to this issue, I'll try to bang out a PR since I think I have an idea.

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

No branches or pull requests

2 participants