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

Error while creating dashboard #25

Closed
dbanetto opened this issue Feb 3, 2017 · 1 comment · Fixed by #31
Closed

Error while creating dashboard #25

dbanetto opened this issue Feb 3, 2017 · 1 comment · Fixed by #31

Comments

@dbanetto
Copy link

dbanetto commented Feb 3, 2017

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 3.8
  • Ruby: 2.3.1
  • Distribution: ubuntu 16.04
  • Module version: 2.6.3

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

  grafana_dashboard { 'my_dash':
    grafana_url       => "http://127.0.0.1:3000",
    content           => template('profiles/my_dash.json'),
  }

What are you seeing

Puppet will error with wrong number of arguments (given 0, expected 1),
I --trace'd this back to types/grafana_dashboard#to_s, upon renaming it to to_s? it worked

What behaviour did you expect instead

Puppet not to throw an error & dashboard created

Output log

Error: /Stage[main]/Catapult::Grafana/Grafana_dashboard[docker_dashboard]: Could not evaluate: wrong number of arguments (given 0, expected 1)
/var/lib/puppet/lib/puppet/type/grafana_dashboard.rb:48:in `to_s'
/usr/lib/ruby/vendor_ruby/puppet/resource.rb:525:in `parameter_name'
/usr/lib/ruby/vendor_ruby/puppet/resource.rb:140:in `[]='
/usr/lib/ruby/vendor_ruby/puppet/type.rb:1056:in `block in retrieve'
/usr/lib/ruby/vendor_ruby/puppet/type.rb:1053:in `each'
/usr/lib/ruby/vendor_ruby/puppet/type.rb:1053:in `retrieve'
/usr/lib/ruby/vendor_ruby/puppet/type.rb:1076:in `retrieve_resource'
/usr/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:236:in `from_resource'
/usr/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:19:in `evaluate'
/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:204:in `apply'
/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:217:in `eval_resource'
/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:147:in `call'
/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:147:in `block (2 levels) in evaluate'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:335:in `block in thinmark'
/usr/lib/ruby/2.3.0/benchmark.rb:308:in `realtime'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:334:in `thinmark'
/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:147:in `block in evaluate'
/usr/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:118:in `traverse'
/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:138:in `evaluate'
/usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:169:in `block in apply'
/usr/lib/ruby/vendor_ruby/puppet/util/log.rb:149:in `with_destination'
/usr/lib/ruby/vendor_ruby/puppet/transaction/report.rb:112:in `as_logging_destination'
/usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:168:in `apply'
/usr/lib/ruby/vendor_ruby/puppet/configurer.rb:120:in `block in apply_catalog'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:161:in `block in benchmark'
/usr/lib/ruby/2.3.0/benchmark.rb:308:in `realtime'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:160:in `benchmark'
/usr/lib/ruby/vendor_ruby/puppet/configurer.rb:119:in `apply_catalog'
/usr/lib/ruby/vendor_ruby/puppet/configurer.rb:227:in `run_internal'
/usr/lib/ruby/vendor_ruby/puppet/configurer.rb:134:in `block in run'
/usr/lib/ruby/vendor_ruby/puppet/context.rb:64:in `override'
/usr/lib/ruby/vendor_ruby/puppet.rb:246:in `override'
/usr/lib/ruby/vendor_ruby/puppet/configurer.rb:133:in `run'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:47:in `block (4 levels) in run'
/usr/lib/ruby/vendor_ruby/puppet/agent/locker.rb:20:in `lock'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:47:in `block (3 levels) in run'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:117:in `with_client'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:44:in `block (2 levels) in run'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:82:in `run_in_fork'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:43:in `block in run'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:179:in `controlled_run'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:41:in `run'
/usr/lib/ruby/vendor_ruby/puppet/application/agent.rb:361:in `onetime'
/usr/lib/ruby/vendor_ruby/puppet/application/agent.rb:327:in `run_command'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:381:in `block (2 levels) in run'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:507:in `plugin_hook'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:381:in `block in run'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:496:in `exit_on_fail'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:381:in `run'
/usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:146:in `run'
/usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:92:in `execute'
/usr/bin/puppet:8:in `<main>'

Any additional information you'd like to impart

Upon renaming to_s to to_s? myself I also found that some of the usages of send_request were
off, like find_dashboard and in delete and caused errors

@Sukiyakijango
Copy link

the last merge had some major brakage... plz checkout plull request #17 or #23 fixing this issue(s)

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

Successfully merging a pull request may close this issue.

2 participants