Skip to content

Commit

Permalink
fix: properly reset MachineStatus hostname for deallocated machines
Browse files Browse the repository at this point in the history
Need to treat `nil` hostname as no hostname and wipe the current value
in the `MachineStatus`.

Signed-off-by: Artem Chernyshev <[email protected]>
  • Loading branch information
Unix4ever committed Jan 15, 2025
1 parent d5e1f85 commit 84c01fd
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ func pollVersion(ctx context.Context, c *client.Client, info *Info) error {
}

func pollHostname(ctx context.Context, c *client.Client, info *Info) error {
info.Hostname = pointer.To("")
info.Domainname = pointer.To("")

return forEachResource(
ctx,
c,
Expand Down

0 comments on commit 84c01fd

Please sign in to comment.