Giter VIP home page Giter VIP logo

Comments (4)

timharsch avatar timharsch commented on July 20, 2024

I was working on the same issue today. Apparently, the issue is recent ruby modules are requiring ruby >= 2.3 Even though the modules in the template are pinned at certain versions, it seems some rub modules may be allowed to link to the latest for their dependencies. For my version of the Jenkins CF template the issue was specifically with aws-eventstream v1.2.0 requiring ruby >= 2.3

Some of my notes are below. I'll give your solution a try with my template, thanks for figuring it out!

/var/log/cloud-init-output.log
Cloud-init v. 19.3-3.amzn2 running 'modules:final' at Fri, 03 Sep 2021 22:12:51 +0000. Up 32.12 seconds.
+ /opt/aws/bin/cfn-init -v --stack Jenkins --resource AgentLC --region us-east-2
Error occurred during build: Failed to install gem: aws-sdk-ec2-1.62.0 (return code 1)
+ /opt/aws/bin/cfn-signal -e 1 --stack Jenkins --resource AgentASG --region us-east-2
ValidationError: Stack arn:aws:cloudformation:us-east-2:XXX:stack/Jenkins/7daca480-efca-11ea-yyy-0aa874bc8df2 is in UPDATE_COMPLETE state and cannot be signaled



/var/log/cfn-init.log
021-09-03 21:55:59,220 [ERROR] Gem failed. Output: ERROR:  Error installing aws-sdk-ec2:
        aws-eventstream requires Ruby version >= 2.3.

021-09-03 21:55:59,220 [ERROR] Error encountered during build of setup: Failed to install gem: aws-sdk-ec2-1.62.0 (return code 1)
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/cfnbootstrap/construction.py", line 542, in run_config
    CloudFormationCarpenter(config, self._auth_config).build(worklog)
  File "/usr/lib/python2.7/site-packages/cfnbootstrap/construction.py", line 229, in build
Hangupanges['packages'][manager] = CloudFormationCarpenter._packageTools[manager]().apply(packages, self._auth_config)
sh-4.2$ ls -lapython2.7/site-packages/cfnbootstrap/lang_package_tools.py", line 111, in apply
    if self._install_gem(pkg, ver):
  File "/usr/lib/python2.7/site-packages/cfnbootstrap/lang_package_tools.py", line 155, in _install_gem
    raise ToolError("Failed to install gem: %s-%s" % (pkg, ver), result.returncode)
ToolError: Failed to install gem: aws-sdk-ec2-1.62.0 (return code 1)
2021-09-03 21:55:59,222 [ERROR] -----------------------BUILD FAILED!------------------------
2021-09-03 21:55:59,222 [ERROR] Unhandled exception during build: Failed to install gem: aws-sdk-ec2-1.62.0 (return code 1)
Traceback (most recent call last):
  File "/opt/aws/bin/cfn-init", line 171, in <module>
    worklog.build(metadata, configSets)
  File "/usr/lib/python2.7/site-packages/cfnbootstrap/construction.py", line 129, in build
    Contractor(metadata).build(configSets, self)
  File "/usr/lib/python2.7/site-packages/cfnbootstrap/construction.py", line 530, in build
    self.run_config(config, worklog)
  File "/usr/lib/python2.7/site-packages/cfnbootstrap/construction.py", line 542, in run_config
    CloudFormationCarpenter(config, self._auth_config).build(worklog)
  File "/usr/lib/python2.7/site-packages/cfnbootstrap/construction.py", line 229, in build
    changes['packages'][manager] = CloudFormationCarpenter._packageTools[manager]().apply(packages, self._auth_config)
  File "/usr/lib/python2.7/site-packages/cfnbootstrap/lang_package_tools.py", line 111, in apply
    if self._install_gem(pkg, ver):
  File "/usr/lib/python2.7/site-packages/cfnbootstrap/lang_package_tools.py", line 155, in _install_gem
    raise ToolError("Failed to install gem: %s-%s" % (pkg, ver), result.returncode)
ToolError: Failed to install gem: aws-sdk-ec2-1.62.0 (return code 1)

Agents must use Ruby 2.0
root@ip-10-0-37-179 bin]# yum list available ruby
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Available Packages
ruby.x86_64               

AWS Eventstream adds:
>  spec.required_ruby_version = '>= 2.3'
see here:
https://github.com/aws/aws-sdk-ruby/blob/a6736ea94dc708bfea6a7099dd11d40931a527a1/gems/aws-eventstream/aws-eventstream.gemspec#L18

from aws-cf-templates.

michaelwittig avatar michaelwittig commented on July 20, 2024

aws/aws-sdk-ruby#2573 (comment)

from aws-cf-templates.

timharsch avatar timharsch commented on July 20, 2024

the fix proposed by @Elrendio worked for me

from aws-cf-templates.

Ten0 avatar Ten0 commented on July 20, 2024

Looks like they aren't ever reverting this. Wouldn't it be more future-proof to have this fixed in a more long-term manner, that is, unpinning stuff and installing a newer version of Ruby as initially proposed ?

from aws-cf-templates.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.