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

Kernel parameters errors #124

Closed
jasonmead opened this issue Jun 23, 2014 · 4 comments
Closed

Kernel parameters errors #124

jasonmead opened this issue Jun 23, 2014 · 4 comments

Comments

@jasonmead
Copy link

==> default: Recipe Compile Error in /tmp/vagrant-chef-3/chef-solo-1/cookbooks/rabbitmq/recipes/default.rb
==> default: ================================================================================
==> default:
==> default:
==> default: NoMethodError
==> default: -------------
==> default: undefined method each_pair' for []:Array ==> default: ==> default: ==> default: Cookbook Trace: ==> default: --------------- ==> default: /tmp/vagrant-chef-3/chef-solo-1/cookbooks/rabbitmq/libraries/default.rb:38:informat_kernel_parameters'
==> default: /tmp/vagrant-chef-3/chef-solo-1/cookbooks/rabbitmq/recipes/default.rb:163:in from_file' ==> default: /tmp/vagrant-chef-3/chef-solo-1/cookbooks/rabbitmq/recipes/default.rb:157:infrom_file'
==> default:
==> default:
==> default: Relevant File Content:
==> default: ----------------------
==> default: /tmp/vagrant-chef-3/chef-solo-1/cookbooks/rabbitmq/libraries/default.rb:
==> default:
==> default: 31: kernel.delete(:inet_dist_use_interface)
==> default: 32:
==> default: 33: # Otherwise, we can just render it nicely as Erlang wants. This
==> default: 34: # theoretically opens the door for arbitrary kernel_app parameters to be
==> default: 35: # declared.
==> default: 36:
==> default: 37: puts kernel.select { |k, v| !v.nil? }
==> default: 38>> kernel.select { |k, v| !v.nil? }.each_pair do |param, val|
==> default: 39: rendered << "{#{param}, #{val}}"
==> default: 40: end
==> default: 41:
==> default: 42: rendered.each { |r| r.prepend(' ') }.join(",\n")
==> default: 43: end
==> default: 44: end
==> default: 45: end
==> default: 46:
==> default:

Trying to get Rabbit installed in vagrant CentOs using chef. Using default recipe. Any help would be appreciated.

@LiamK
Copy link

LiamK commented Aug 7, 2014

Jason,
I'm running into the same error. Did you solve this?
It seems to be okay on EC2, but when I use auto-scaling it breaks.
Liam

@kirkbackus
Copy link

If you want to fix it yourself, you can change lines 37 - 40 to this

kernel.select { |_k, v| !v.nil? }.each { |param, val|
    rendered << "{#{param}, #{val}}"
}

kernel is an associative array (aka. hash in ruby), and they are iterating over it incorrectly.

It should look like this

https://github.com/kirkbackus/rabbitmq/blob/master/libraries/default.rb

@cmluciano
Copy link
Collaborator

@jasonmead Did you get this resolved?

@cmluciano
Copy link
Collaborator

Closing due to inactivity

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

4 participants