rabbitmq / chef-cookbook

Development repository for Chef cookbook RabbitMQ
https://supermarket.chef.io/cookbooks/rabbitmq
Apache License 2.0
214 stars 423 forks source link

Code error: providers/cluster.rb#L259 #576

Closed kevinleiyan closed 3 years ago

kevinleiyan commented 3 years ago

hi

I am chef/ruby newbie, When I read your code on https://github.com/rabbitmq/chef-cookbook/blob/v5.x/providers/cluster.rb#L259,I found you use 'node['name'] == var_node_name' not 'node['name'] = var_node_name'. I thought it is wrong. if not, please ignore and close the issue.

michaelklishin commented 3 years ago

The expression is used in an Array#select predicate, so it is meant to be a comparison. The idea is to find the entry for the current node and then look up its intended type (disk or ram).