the metadata.rb file will break the OpsWorks command
towerjoo opened this issue · 2 comments
When we try to run a OpsWorks command in our stack, it failed with the log below.
as chef/chef#2937 mentioned, such change will break the ones who are using Chef < 12, while we are currently using Chef 11.10.
Is that possible to make it compatible to old versions?
Mixlib::ShellOut::ShellCommandFailed
Expected process to exit with [0], but received '47'
---- Begin output of /opt/aws/opsworks/local/bin/berks vendor /opt/aws/opsworks/current/berkshelf-cookbooks ----
STDOUT: Resolving cookbook dependencies...
Fetching 'build-essential' from git://github.com/opscode-cookbooks/build-essential.git (at v1.4.2)
Fetching 'conffile' from git://github.com/optiflows-cookbooks/conffile.git (at master)
Fetching 'logrotate' from git://github.com/stevendanna/logrotate.git (at master)
STDERR: Ridley::Errors::FromFileParserError Could not parse /tmp/d20160428-32603-xmzigf/metadata.rb': undefined method
source_url' for #Ridley::Chef::Cookbook::Metadata:0x007fd69a5b3ce0
---- End output of /opt/aws/opsworks/local/bin/berks vendor /opt/aws/opsworks/current/berkshelf-cookbooks ----
Ran /opt/aws/opsworks/local/bin/berks vendor /opt/aws/opsworks/current/berkshelf-cookbooks returned 47
I will look into putting a version guard around metadata.rb methods that aren't supported by 11; however, please note that version 2.0 of this cookbook will only support 12+ so you may need to pin to an older version once that lands on master.
Version 2.1.0 does have a version check for the source_url: https://github.com/stevendanna/logrotate/blob/v2.1.0/metadata.rb
In the upcoming 2.2.0, we will now require 12.5.0, so I've removed those checks. If you are still on Chef < 12.5.0 you will likely want to pin to 2.1.0.