|
@@ -48,6 +48,7 @@ type driver struct {
|
|
|
vxlanIdm *idm.Idm
|
|
|
once sync.Once
|
|
|
joinOnce sync.Once
|
|
|
+ localJoinOnce sync.Once
|
|
|
keys []*key
|
|
|
sync.Mutex
|
|
|
}
|
|
@@ -241,6 +242,12 @@ func (d *driver) nodeJoin(advertiseAddress, bindAddress string, self bool) {
|
|
|
d.bindAddress = bindAddress
|
|
|
d.Unlock()
|
|
|
|
|
|
+ // If containers are already running on this network update the
|
|
|
+ // advertiseaddress in the peerDB
|
|
|
+ d.localJoinOnce.Do(func() {
|
|
|
+ d.peerDBUpdateSelf()
|
|
|
+ })
|
|
|
+
|
|
|
// If there is no cluster store there is no need to start serf.
|
|
|
if d.store != nil {
|
|
|
if err := validateSelf(advertiseAddress); err != nil {
|