Skip to content

Commit

Permalink
Only log worker marker file error if exists (#820)
Browse files Browse the repository at this point in the history
  • Loading branch information
bschimke95 authored Nov 20, 2024
1 parent 2f1c021 commit bd42a49
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/k8s/pkg/k8sd/app/hooks_remove.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package app
import (
"context"
"database/sql"
"errors"
"fmt"
"net"
"os"
Expand Down Expand Up @@ -122,7 +123,9 @@ func (a *App) onPreRemove(ctx context.Context, s state.State, force bool) (rerr

log.Info("Removing worker node mark")
if err := snaputil.MarkAsWorkerNode(snap, false); err != nil {
log.Error(err, "Failed to unmark node as worker")
if !errors.Is(err, os.ErrNotExist) {
log.Error(err, "failed to unmark node as worker")
}
}

log.Info("Cleaning up control plane certificates")
Expand Down

0 comments on commit bd42a49

Please sign in to comment.