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

Add Private Host IPv4 address to container metadata #2000

Closed
wants to merge 1 commit into from

Commits on Apr 29, 2019

  1. Add Private Host IPv4 address to container metadata

    Related issue: aws#1575
    Related PR: aws#1730
    
    PR 1730 adds the Public IP Address of the host to the container metadata
    file, however the EC2 host may be configured without a public address.
    
    In this case, the EC2 metadata API returns a 404 response, and the host
    IP is not available to containers.
    
    Example ECS Agent Log
    ```
    [ERROR] Unable to retrieve Host Instance PublicIPv4 Address: EC2MetadataError: failed to make EC2Metadata request
    caused by: <?xml version="1.0" encoding="iso-8859-1"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
             "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
     <head>
      <title>404 - Not Found</title>
     </head>
     <body>
      <h1>404 - Not Found</h1>
     </body>
    </html>
    ```
    
    This commit adds an extra field to the container metadata json,
    `HostPrivateIPv4Address` which is available on EC2 hosts without
     a public address.
    Ben Cordero committed Apr 29, 2019
    Configuration menu
    Copy the full SHA
    58da9df View commit details
    Browse the repository at this point in the history