sous-chefs / elasticsearch

Development repository for the elasticsearch cookbook
https://supermarket.chef.io/cookbooks/elasticsearch
Other
881 stars 599 forks source link

Chef-client 15 don't work with version 5 #806

Closed tdvgit closed 1 month ago

tdvgit commented 1 month ago

:ghost: Brief Description

Hello, chef-client 15 don't know anything about 'use'. https://github.com/sous-chefs/elasticsearch/blob/75bce15a9edb1d2e132931a1d4ba638af74c9630/resources/install.rb#L2

When i use 16 version, all ok.

But in metadata.rb i see https://github.com/sous-chefs/elasticsearch/blob/75bce15a9edb1d2e132931a1d4ba638af74c9630/metadata.rb#L9

:pancakes: Cookbook version

elasticsearch (5.1.14)

:woman_cook: Chef-Infra Version

15.17.4

:tophat: Platform details

Ubuntu 18.04

Steps To Reproduce

Steps to reproduce the behavior:

       Installing Cookbook Gems:
       Compiling Cookbooks...

       ================================================================================
       Recipe Compile Error in /tmp/kitchen/cache/cookbooks/elasticsearch/resources/install.rb
       ================================================================================

       NoMethodError
       -------------
       undefined method `use' for #<Class:0x0000555f9e46d770>

       Cookbook Trace:
       ---------------
         /tmp/kitchen/cache/cookbooks/elasticsearch/resources/install.rb:2:in `class_from_file'

       Relevant File Content:
       ----------------------
       /tmp/kitchen/cache/cookbooks/elasticsearch/resources/install.rb:

         1:  unified_mode true
         2>> use 'partial/_common'
         3:  use 'partial/_package'
         4:  use 'partial/_repository'
         5:
         6:  property :type,
         7:          String,
         8:          equal_to: %w(package tarball repository),
         9:          default: 'repository'
        10:
        11:  action :install do

       System Info:
       ------------
       chef_version=15.17.4
       platform=ubuntu
       platform_version=18.04
ramereth commented 1 month ago

It actually requires 16.0+ now, this was fixed in #807