Closed Paul-Oginni closed 5 years ago
Best thing to do here would be to require the AWS service gems you need, rather than all ~150 services.
For example, if you use S3 and EC2, you could simply install aws-sdk-s3
and aws-sdk-ec2
and the number of gems you install will be cut drastically.
Thanks for the suggestion @awood45 - This fixed our problem!
Much obliged @awood45! Paring down the gemfile significantly decreased the ruby bundle
execution time.
This resolved our issue.
Issue description
TLDR: the
chef-client
command on theaws-sdk
dependencies times out before itsruby bundle
step has completed.When invoking a chef run via
chef-client
, theruby bundle
command is invoked to install dependencies. Problem is, theruby bundle
takes 10:33 minutes to finish. But thechef-client
has a 10-minute time limit that is not easily configurable. So the chef update fails.What is the best way to prevent this from happening?
Gem name
Gemfile:
Version of Ruby, OS environment
Ruby version: ruby 2.0.0p648 [x86_64-linux] OS: Amazon Linux AMI release 2017.09 4.9.76-3.78.amzn1.x86_64 Bundler version: 1.12.5 (We also tried using bundler version 1.17.3, and it still failed). Chef version: Unfortunately we are currently constrained at version 12.19.36
Code snippets / steps to reproduce
Command:
DEBUG_RESOLVER=1 /opt/chef/embedded/bin/ruby /opt/chef/embedded/bin/bundle install -VV 2>&1 | tee bundle-output.txt
Truncated output included below:Output: