Skip to content

Commit

Permalink
assisted agent: adjust delete() returns (#802)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebrandon1 authored Dec 10, 2024
1 parent 404ffb3 commit 0f9dd43
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/assisted/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,12 @@ func (builder *agentBuilder) Delete() error {
builder.Definition.Name, builder.Definition.Namespace)

if !builder.Exists() {
return fmt.Errorf("agent cannot be deleted because it does not exist")
glog.V(100).Infof("agent %s in namespace %s does not exist",
builder.Definition.Name, builder.Definition.Namespace)

builder.Object = nil

return nil
}

err := builder.apiClient.Delete(context.TODO(), builder.Definition)
Expand Down

0 comments on commit 0f9dd43

Please sign in to comment.