Signed-off-by: Pradip Dhara <pradipd@microsoft.com>
This commit is contained in:
Pradip Dhara 2017-11-30 00:22:30 -08:00
parent 9037a42bae
commit 4aab854d6d
2 changed files with 11 additions and 2 deletions

View file

@ -849,13 +849,22 @@ addToStore:
return network, nil
}
joinCluster(network)
defer func() {
if err != nil {
network.cancelDriverWatches()
if e := network.leaveCluster(); e != nil {
logrus.Warnf("Failed to leave agent cluster on network %s on failure (%v): %v", network.name, err, e)
}
}
}()
if len(network.loadBalancerIP) != 0 {
if err = network.createLoadBalancerSandbox(); err != nil {
return nil, err
}
}
joinCluster(network)
if !c.isDistributedControl() {
c.Lock()
arrangeIngressFilterRule()

View file

@ -256,7 +256,7 @@ retry:
if err := cs.GetObject(datastore.Key(kvObject.Key()...), kvObject); err != nil {
return fmt.Errorf("could not update the kvobject to latest when trying to delete: %v", err)
}
logrus.Errorf("Error (%v) deleting object %v, retrying....", err, kvObject.Key())
logrus.Warnf("Error (%v) deleting object %v, retrying....", err, kvObject.Key())
goto retry
}
return err