Skip to content
This repository has been archived by the owner on Jul 28, 2020. It is now read-only.

Fix Chef 13 CI build failures #65

Closed
wants to merge 2 commits into from
Closed

Fix Chef 13 CI build failures #65

wants to merge 2 commits into from

Conversation

arm4b
Copy link
Member

@arm4b arm4b commented May 22, 2017

Closes #63.

Outdated rabbitmq cookbok produces the following error (https://travis-ci.org/StackStorm/chef-stackstorm/jobs/234373310) in Chef 13:

 Compiling Cookbooks...
================================================================================
       Recipe Compile Error in /tmp/kitchen/cache/cookbooks/rabbitmq/resources/parameter.rb
      ================================================================================       
       ArgumentError
       -------------
       Property `params` of resource `rabbitmq_parameter` overwrites an existing method.
       
       Cookbook Trace:
       ---------------
         /tmp/kitchen/cache/cookbooks/rabbitmq/resources/parameter.rb:27:in `class_from_file'
       
       Relevant File Content:
       ----------------------
       /tmp/kitchen/cache/cookbooks/rabbitmq/resources/parameter.rb:
       
        20:  
        21:  actions :set, :clear, :list
        22:  default_action :set
        23:  
        24:  attribute :parameter, :kind_of => String, :name_attribute => true
        25:  attribute :component, :kind_of => String
        26:  attribute :vhost, :kind_of => String
        27>> attribute :params, :kind_of => [Hash, Array], :default => {}
        28:  

       System Info:

Seems that https://github.com/rabbitmq/chef-cookbook build is GREEN again and we can use latest rabbitmq.

Checking...

@arm4b arm4b added the WIP label May 22, 2017
@arm4b arm4b changed the title Use latest rabbitmq cookbook Fix Chef13 build failures May 22, 2017
@arm4b arm4b changed the title Fix Chef13 build failures Fix Chef 13 CI build failures May 22, 2017
@arm4b
Copy link
Member Author

arm4b commented May 22, 2017

Another error (https://travis-ci.org/StackStorm/chef-stackstorm/jobs/234797606) from outdated mongodb3 cookbook (https://github.com/sunggun-yu/chef-mongodb3)

NoMethodError
       -------------
       undefined method `platform_version' for #<Chef::Node::Attribute:0x00000005343460>
     
       Cookbook Trace:

       ---------------
         /tmp/kitchen/cache/cookbooks/mongodb3/recipes/package_repo.rb:26:in `from_file'
         /tmp/kitchen/cache/cookbooks/mongodb3/recipes/default.rb:20:in `from_file'
         /tmp/kitchen/cache/cookbooks/stackstorm/recipes/bundle.rb:45:in `from_file'
       
       Relevant File Content:
       ----------------------
       /tmp/kitchen/cache/cookbooks/mongodb3/recipes/package_repo.rb:
       
        19:  
        20:  pkg_major_version = node['mongodb3']['version'].to_f # eg. 3.0, 3.2
        21:  
        22:  # Setup default package version attribute to install
        23:  pkg_version = node['mongodb3']['version']
        24:  case node['platform_family']
        25:    when 'rhel', 'fedora'
        26>>     pkg_version =  "#{node['mongodb3']['version']}-1.el#{node.platform_version.to_i}" # ~FC019
        27:      if node['platform'] == 'amazon'
        28:        pkg_version = "#{node['mongodb3']['version']}-1.amzn1" # ~FC019
        29:      end
        30:  end
        31:  
        32:  # Setup default package repo url attribute for each platform family or platform
        33:  case node['platform']
        34:    when 'redhat', 'oracle','centos', 'fedora' # ~FC024
        35:      pkg_repo = "https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/#{pkg_major_version}/#{node['kernel']['machine'] =~ /x86_64/ ? 'x86_64' : 'i686'}"

@shortdudey123
Copy link
Contributor

Yeah, i have a long standing PR to clean up mongodb3
sunggun-yu/chef-mongodb3#55
I would not count on it being merged anytime soon though

@arm4b
Copy link
Member Author

arm4b commented May 23, 2017

Holy moly, yeah we're stuck here for a long time.

@shortdudey123 what you can suggest as a workaround?
Switching to Chef 12 or maybe using another mongo cookbook? I didn't find anything, where I could use 3.2 or 3.4 mongodb-org packages (that's what StackStorm is currently supporting).

@shortdudey123
Copy link
Contributor

I would hard code testing to 12.20.3 (think thats the newest 12.x) and add a note in the readme saying the cookbook is chef 13 compliment, but not all of the upstream dependencies are.

I have done that with several other cookbooks i work with

@arm4b
Copy link
Member Author

arm4b commented May 23, 2017

@shortdudey123 That makes sense 👍
Thanks, will do!

@jjm
Copy link
Member

jjm commented Jun 21, 2018

Having a look at the chef cookbook and indeed the mongodb3 cookbook does not yet support Chef 13+ and may may be better to migrate to using https://supermarket.chef.io/cookbooks/sc-mongodb (aka https://github.com/sous-chefs/mongodb) instead.

@LindsayHill LindsayHill mentioned this pull request Sep 27, 2018
@arm4b arm4b deleted the add/chef-13 branch October 29, 2018 20:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants