Skip to content

Commit

Permalink
associate node to host during migration
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkasun committed Aug 10, 2023
1 parent c834071 commit 0ff1f04
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions controllers/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ func migrate(w http.ResponseWriter, r *http.Request) {
} else {
node = convertLegacyNode(legacyNode, host.ID)
}
if err := logic.AssociateNodeToHost(&node, &host); err != nil {
slog.Error("associate node to host", "node", node.ID, "host", host.ID, "hostname", host.Name, "error", err)
}
if err := logic.UpsertNode(&node); err != nil {
slog.Error("update node", "error", err)
continue
Expand Down

0 comments on commit 0ff1f04

Please sign in to comment.