Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

store: fail faster if not running in EC2 #415

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Aug 24, 2023

  1. store: fail faster if not running in EC2

    If you are running `chamber` outside of EC2 without a region
    configured, the binary will take 5 seconds to fail because the default
    ec2 metadata API timeout is 5 seconds.
    
    Instead, take a few milliseconds to determine whether
    we are even running on EC2. We attempt to do this by
    checking the contents of different files on the disk, e.g.
    /sys/devices/virtual/dmi/id/board_asset_tag, and then if all of those
    fail, attempting to see if anything is listening on the metadata host.
    
    This can help prevent the 5 second failure timeout.
    kevinburkesegment committed Aug 24, 2023
    Configuration menu
    Copy the full SHA
    e71fe86 View commit details
    Browse the repository at this point in the history