Added comment to Azure driver

Added comment explaining retries in hackForIdentityAuth() method

Signed-off-by: Ruslan Gabitov <ruslan.gabitov@live.com>
This commit is contained in:
Ruslan Gabitov 2014-12-09 18:48:03 -08:00
parent 04382b4730
commit a644aba70f
1 changed files with 5 additions and 0 deletions

View File

@ -235,6 +235,11 @@ func (driver *Driver) hackForIdentityAuth() error {
log.Debugf("HACK: Downloading version of Docker with identity auth...") log.Debugf("HACK: Downloading version of Docker with identity auth...")
/* We need to add retries to every SSH call we make, because Azure has some weird networking bug:
sometimes when it comes to communication between VMs or with Azure itself, Azure API throws an error.
So when we are running remote commands via SSH, sometimes they fail for no reason.
This issue is fixed by repeating SSH calls few times before throwing an error.
*/
numberOfRetries := 3 numberOfRetries := 3
if err := driver.runSSHCommand("sudo stop docker", numberOfRetries); err != nil { if err := driver.runSSHCommand("sudo stop docker", numberOfRetries); err != nil {
return err return err