Skip to content

Fallback code for retrieving sandbox IP uses "docker inspect" fields that no longer exist #534

Description

@arcusmaximus

The function dockerService.getIPs() first tries to get the sandbox IP through the network plugin, and if that fails, runs a "docker inspect" and checks the resulting JSON for the fields NetworkSettings.IPAddress and NetworkSettings.GlobalIPv6Address. However, these fields don't exist - apparently they were removed back in Docker 1.11. The code should instead retrieve NetworkSettings.Networks[networkName].IPAddress - of course taking into account that on Windows, Docker turns the network name default into nat.

In addition, going by the code, it seems getIPs() would log the message "Failed to read pod IP" even if it did manage to retrieve the IP this way.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions