publish dns update on node ip change

This commit is contained in:
Matthew R Kasun
2023-02-06 09:01:45 -05:00
parent af66356061
commit a24263281c
2 changed files with 23 additions and 0 deletions

View File

@@ -967,6 +967,9 @@ func updateNode(w http.ResponseWriter, r *http.Request) {
json.NewEncoder(w).Encode(apiNode)
runUpdates(newNode, ifaceDelta)
if err := mq.PublishReplaceDNS(&currentNode, newNode, host); err != nil {
logger.Log(1, "failed to publish dns update", err.Error())
}
}
// swagger:route DELETE /api/nodes/{network}/{nodeid} nodes deleteNode