Reset the encryption keys on swarm leave

Signed-off-by: Santhosh Manohar <santhosh@docker.com>
This commit is contained in:
Santhosh Manohar 2016-08-16 17:37:33 -07:00
parent bbe19ab902
commit 6e965c03ad
2 changed files with 6 additions and 0 deletions

View file

@ -328,7 +328,10 @@ func (c *controller) agentClose() {
c.agent.epTblCancel()
c.agent.networkDB.Close()
c.Lock()
c.agent = nil
c.Unlock()
}
func (n *network) isClusterEligible() bool {

View file

@ -307,13 +307,16 @@ func (c *controller) clusterAgentInit() {
c.Lock()
c.clusterConfigAvailable = false
c.agentInitDone = make(chan struct{})
c.keys = nil
c.Unlock()
if err := c.ingressSandbox.Delete(); err != nil {
log.Warnf("Could not delete ingress sandbox while leaving: %v", err)
}
c.Lock()
c.ingressSandbox = nil
c.Unlock()
n, err := c.NetworkByName("ingress")
if err != nil {