mirror of
https://github.com/gravitl/netmaker.git
synced 2025-11-10 08:41:20 +08:00
server fix
This commit is contained in:
parent
3572c33e0b
commit
3416a61e77
2 changed files with 4 additions and 0 deletions
|
|
@ -4,6 +4,7 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"log"
|
||||||
"sort"
|
"sort"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
|
@ -397,6 +398,7 @@ func GetNodeByIDorMacAddress(uuid string, macaddress string, network string) (mo
|
||||||
logger.Log(2, "rewriting legacy node data; node now has id,", node.ID)
|
logger.Log(2, "rewriting legacy node data; node now has id,", node.ID)
|
||||||
node.PullChanges = "yes"
|
node.PullChanges = "yes"
|
||||||
}
|
}
|
||||||
|
log.Printf("Node is %v, Error is %v \n", node, err)
|
||||||
return node, err
|
return node, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -87,6 +87,8 @@ func ServerJoin(networkSettings *models.Network, serverID string) error {
|
||||||
|
|
||||||
node.Network = networkSettings.NetID
|
node.Network = networkSettings.NetID
|
||||||
|
|
||||||
|
cleanupServerIfLegacy(node.MacAddress, network)
|
||||||
|
|
||||||
logger.Log(2, "adding a server instance on network", node.Network)
|
logger.Log(2, "adding a server instance on network", node.Network)
|
||||||
err = CreateNode(node)
|
err = CreateNode(node)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue