sous-chefs/logrotate

unified_mode and Chef Client 12.15+ are not compatible

mfortin opened this issue ยท 0 comments

๐Ÿ‘ป Brief Description

Version 3.0.0 of the cookbook fails to compile. It seems that unified_mode is not available in Chef 14.7.17 but the requirement is Chef 12.15+.

Reference: https://docs.chef.io/release_notes_client/#unified-mode-in-custom-resources

๐Ÿฅž Cookbook version

3.0.0

๐Ÿ‘ฉโ€๐Ÿณ Chef-Infra Version

14.7.17

๐ŸŽฉ Platform details

CentOS 7.9

Steps To Reproduce

Sharing my packer logs

    centos-7: ================================================================================
    centos-7: Recipe Compile Error in /tmp/packer-chef-solo/local-mode-cache/cache/cookbooks/logrotate/resources/app.rb
    centos-7: ================================================================================
    centos-7:
    centos-7: NoMethodError
    centos-7: -------------
    centos-7: undefined method `unified_mode' for #<Class:0x0000000004a29c30>
    centos-7:
    centos-7: Cookbook Trace:
    centos-7: ---------------
    centos-7:   /tmp/packer-chef-solo/local-mode-cache/cache/cookbooks/logrotate/resources/app.rb:21:in `class_from_file'
    centos-7:
    centos-7: Relevant File Content:
    centos-7: ----------------------
    centos-7: /tmp/packer-chef-solo/local-mode-cache/cache/cookbooks/logrotate/resources/app.rb:
    centos-7:
    centos-7:  14:  # Unless required by applicable law or agreed to in writing, software
    centos-7:  15:  # distributed under the License is distributed on an "AS IS" BASIS,
    centos-7:  16:  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    centos-7:  17:  # See the License for the specific language governing permissions and
    centos-7:  18:  # limitations under the License.
    centos-7:  19:  #
    centos-7:  20:
    centos-7:  21>> unified_mode true
    centos-7:  22:
    centos-7:  23:  include ::Logrotate::Cookbook::LogrotateHelpers
    centos-7:  24:
    centos-7:  25:  property :path, [String, Array],
    centos-7:  26:            coerce: proc { |p| Array(p).sort.map { |path| path.to_s.inspect }.join(' ') }
    centos-7:  27:
    centos-7:  28:  property :frequency, String,
    centos-7:  29:            default: 'weekly'
    centos-7:  30:
    centos-7:
    centos-7: System Info:
    centos-7: ------------
    centos-7: chef_version=14.7.17
    centos-7: platform=centos
    centos-7: platform_version=7.9.2009
    centos-7: ruby=ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux]
    centos-7: program_name=/bin/chef-client
    centos-7: executable=/opt/chef/bin/chef-client

๐Ÿš“ Expected behavior

Cookbook is expected to compile or validate against tested versions.

โž• Additional context

Related to release of version 3.0.0 that happened today.