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 looking up key in version 2.0.0 #40

Open
f0xtek opened this issue Mar 11, 2016 · 3 comments
Open

Error looking up key in version 2.0.0 #40

f0xtek opened this issue Mar 11, 2016 · 3 comments

Comments

@f0xtek
Copy link

f0xtek commented Mar 11, 2016

Hi,

There seems to be an issue looking up keys over http with version 2.0.0.

I perform hiera lookup with 'hiera -c hiera.yaml -d keyName' and get the following error:

/usr/lib/ruby/gems/1.8/gems/hiera-http-2.0.0/lib/hiera/backend/http_backend.rb:28: warning: multiple values for a block parameter (2 for 1)
        from /usr/lib/ruby/gems/1.8/gems/hiera-http-2.0.0/lib/hiera/backend/http_backend.rb:28
/usr/lib/ruby/gems/1.8/gems/hiera-http-2.0.0/lib/hiera/backend/http_backend.rb:28: warning: multiple values for a block parameter (2 for 1)
        from /usr/lib/ruby/gems/1.8/gems/hiera-http-2.0.0/lib/hiera/backend/http_backend.rb:28
/usr/lib/ruby/gems/1.8/gems/hiera-http-2.0.0/lib/hiera/backend/http_backend.rb:28: warning: multiple values for a block parameter (2 for 1)
        from /usr/lib/ruby/gems/1.8/gems/hiera-http-2.0.0/lib/hiera/backend/http_backend.rb:28
/usr/lib/ruby/gems/1.8/gems/hiera-http-2.0.0/lib/hiera/backend/http_backend.rb:28: warning: multiple values for a block parameter (2 for 1)
        from /usr/lib/ruby/gems/1.8/gems/hiera-http-2.0.0/lib/hiera/backend/http_backend.rb:28
/usr/lib/ruby/gems/1.8/gems/hiera-http-2.0.0/lib/hiera/backend/http_backend.rb:28: warning: multiple values for a block parameter (2 for 1)
        from /usr/lib/ruby/gems/1.8/gems/hiera-http-2.0.0/lib/hiera/backend/http_backend.rb:28
/usr/lib/ruby/gems/1.8/gems/hiera-http-2.0.0/lib/hiera/backend/http_backend.rb:30:in `initialize': undefined method `merge' for []:Array (NoMethodError)
        from /usr/lib/ruby/site_ruby/1.8/hiera/backend.rb:205:in `new'
        from /usr/lib/ruby/site_ruby/1.8/hiera/backend.rb:205:in `lookup'
        from /usr/lib/ruby/site_ruby/1.8/hiera/backend.rb:203:in `each'
        from /usr/lib/ruby/site_ruby/1.8/hiera/backend.rb:203:in `lookup'
        from /usr/lib/ruby/site_ruby/1.8/hiera.rb:60:in `lookup'
        from /usr/bin/hiera:225

This doesn't happen in hiera-http version 1.4.0. I am using ruby version 1.8.7.

@xescab
Copy link

xescab commented Sep 12, 2016

I get the same error, and version 1.4.0 does not work for me because I need to pass a token to the HTTP API. Please fix this. Thanks!

@crayfishx
Copy link
Owner

@drmarconi @xescab Can you show your configuration from hiera.yaml please?

@f0xtek
Copy link
Author

f0xtek commented Sep 13, 2016

Hi,

My hiera config would be as follows:

:http:
    :host: <ip_address>
    :port: <port>
    :output: json
    :failure: graceful
    :paths:
        - /path/to/endpoint

Thanks

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

No branches or pull requests

3 participants