mirror of
https://github.com/gravitl/netmaker.git
synced 2025-02-28 01:52:58 +08:00
Merge pull request #827 from gravitl/hotfix_v0.11.0-serversync
sync hotfix
This commit is contained in:
commit
4c976b49a2
2 changed files with 4 additions and 0 deletions
|
@ -8,6 +8,7 @@ import (
|
|||
"github.com/gravitl/netmaker/logic"
|
||||
"github.com/gravitl/netmaker/models"
|
||||
"github.com/gravitl/netmaker/servercfg"
|
||||
"github.com/gravitl/netmaker/serverctl"
|
||||
)
|
||||
|
||||
// PublishPeerUpdate --- deterines and publishes a peer update to all the peers of a node
|
||||
|
@ -126,6 +127,7 @@ func sendPeers() {
|
|||
}
|
||||
} else {
|
||||
logger.Log(1, "unable to retrieve leader for network ", network.NetID)
|
||||
serverctl.SyncServerNetwork(network.NetID)
|
||||
logger.Log(1, errN.Error())
|
||||
continue
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import (
|
|||
"net"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/gravitl/netmaker/database"
|
||||
"github.com/gravitl/netmaker/logger"
|
||||
|
@ -38,6 +39,7 @@ func InitializeCommsNetwork() error {
|
|||
logger.Log(1, "comms net does not exist, creating with ID,", network.NetID, "and CIDR,", network.AddressRange)
|
||||
return logic.CreateNetwork(network)
|
||||
}
|
||||
time.Sleep(time.Second << 1)
|
||||
SyncServerNetwork(COMMS_NETID)
|
||||
|
||||
return nil
|
||||
|
|
Loading…
Reference in a new issue