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

undefined method 'unified_mode' #577

Closed sbrennan4 closed 3 years ago

sbrennan4 commented 3 years ago

After upgrading to v5.9.0 we get

WARN: Deprecation CHEF-25 from /var/chef/cache/cookbooks/sysctl/resources/param.rb:27:in `class_from_file'

Resource sysctl from a cookbook is overriding the resource from the client. Please upgrade your cookbook or remove the cookbook from your run_list before the next major release of Chef.

Please see https://docs.chef.io/deprecations_map_collision.html for further details and information on how to correct this problem.

================================================================================
Recipe Compile Error in /var/chef/cache/cookbooks/rabbitmq/resources/cluster.rb
================================================================================

NoMethodError
-------------
undefined method `unified_mode' for #<Class:0x0000000003d6eab8>

Cookbook Trace:
---------------
  /var/chef/cache/cookbooks/rabbitmq/resources/cluster.rb:22:in `class_from_file'

Relevant File Content:
----------------------
/var/chef/cache/cookbooks/rabbitmq/resources/cluster.rb:

 15:  # Unless required by applicable law or agreed to in writing, software
 16:  # distributed under the License is distributed on an "AS IS" BASIS,
 17:  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 18:  # See the License for the specific language governing permissions and
 19:  # limitations under the License.
 20:  #
 21:  
 22>> unified_mode true
 23:  
 24:  actions :join, :set_cluster_name, :change_cluster_node_type
 25:  
 26:  default_action :join
 27:  
 28:  attribute :cluster_nodes, :kind_of => String, :name_attribute => true # first node name to join
 29:  attribute :cluster_name,  :kind_of => String                          # cluster name
 30:  

System Info:
------------
chef_version=14.10.9
platform=ubuntu
platform_version=14.04
ruby=ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux]
program_name=/usr/bin/chef-client
executable=/opt/chef/bin/chef-client

We also depend on the hadoop cookbook which depends on sysctl so we cannot remove it.

Should unified_mode be handled like it is here? https://github.com/chef-cookbooks/chef-client/blob/0fed4b410886894b67132251dbe56cd216d58b11/resources/launchd.rb#L13

michaelklishin commented 3 years ago

sysctl only emits a warning, the real issue was that Chef 14 which you run does not provide unified_mode.

michaelklishin commented 3 years ago

5.9.1 is out.