-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Hi, Dustin,
first of all, thank you for creating and publishing this software!
I have a question regarding a problem I have seen recently. Sometimes, it seems that the driver does not get the IP address of a remote VM properly, or there is some other error.
The following function should do that and in most cases it works well:
// GetURL returns a Docker compatible host URL for connecting to this host
// e.g. tcp://1.2.3.4:2376
func (d *Driver) GetURL() (string, error) {
ip, err := d.GetIP()
if err != nil {
return "", err
}
return fmt.Sprintf("tcp://%s:%d", ip, dockerPort), nil
}
But then, sometimes the docker-machine ls would output the following:
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
host-name - cloudstack Running tcp://:2376 Unknown Unable to query docker version: Cannot connect to the docker engine endpoint
It looks like the IP is empty and this is not being checked. That is the URL is considered to be tcp://:2376. Do you have any idea why could this happen?
Possibly, the call is put to the API very early, and the program would never refresh this information? Because I am able to login per SSH to the host-name using its IP.
The problem appears for all machines if we try to deploy batches larges than 4 instances. Possibly, this leads to longer IP association times which needs to be tracked by the driver I suppose.
Additional side question - how do I know whether the driver would pick the private or public IP?