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

"Could not autoload" error in grafana_dashboard with ruby 2.4 on Centos 6 #83

Closed
michal-rybinski opened this issue Dec 14, 2017 · 4 comments

Comments

@michal-rybinski
Copy link

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet:
    3.8.7
  • Ruby:
    2.4.1
  • Distribution:
    Centos 6
  • Module version:
    2.6.3

How to reproduce (e.g Puppet code you use)

class profiles::grafana {
class { '::grafana':
}

grafana_dashboard { 'example_dashboard':
grafana_url => 'http://localhost:3000',
grafana_user => 'admin',
grafana_password => 'password',
}

grafana_datasource { 'influxdb':
grafana_url => 'http://localhost:3000',
grafana_user => 'admin',
grafana_password => 'password',
type => 'influxdb',
url => 'http://localhost:8086',
user => 'admin',
password => 'password',
database => 'graphite',
access_mode => 'proxy',
is_default => true,
}
}

What are you seeing

I had this error when I had ruby 1.8.7 on puppet server, but I've upgraded it to 2.4.1 and restarted the box to make sure all services will use the new one. Firing "ruby -v" shows:
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
so I am not sure what can be wrong here, might it be due to some other dependencies not being met?

What behaviour did you expect instead

catalog compiles fine

Output log

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not autoload puppet/type/grafana_dashboard: /etc/puppet/modules/grafana/lib/puppet/type/grafana_dashboard.rb:21: syntax error, unexpected ':', expecting ')'
newparam(:title, namevar: true) do
^
/etc/puppet/modules/grafana/lib/puppet/type/grafana_dashboard.rb:79: syntax error, unexpected kEND, expecting $end on node xxx.com

Any additional information you'd like to impart

@bastelfreak
Copy link
Member

Hi @michal-rybinski, this error messages comes from ruby1.8.3. Do you still have that version on the agent? Also Puppet 3 isn't supported anymore.

@michal-rybinski
Copy link
Author

Hi @bastelfreak, Thanks for your response.

Yes, I found that bit online, that's why I decided to upgrade the version on the server.
On agent there is Centos 7 witn ruby 2.0 installed by default (ruby 2.0.0p648 (2015-12-16) [x86_64-linux]) so I guess this should be fine.

The only thing that I found online just a 10 minutes ago is that I haven't done "gem update" after the upgrade, so I am doing it atm and will see if that helps.

Thanks

@michal-rybinski
Copy link
Author

michal-rybinski commented Dec 14, 2017

Sorry closed it by mistake

gem update didn't help unfortunately.
I have no experience with ruby whatsoever, do you have any hints where I might look for potential problems after upgrading ruby versions?

About the Puppet v3 not being supported, I've noticed that that's why I've gone for module version 2.6.3 which it says is the last one that supports it.

@michal-rybinski
Copy link
Author

Ok, I'played with it for a while and looks like a problem with installing ruby via rvm plus possibly some other dependencies within the OS so I'll just drop managing dashboards ans datasources via this module and will settle for the rest of the functionality till we not migrate to newest versions of OS and Puppet.

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