baremetal-operator: Resetting status.errorCount manualy?

Is there any way of re-setting errorCount manually inside bmh object? Maybe using some kind of special annotation?

{"level":"info","ts":1613681703.0899441,"logger":"controllers.BareMetalHost","msg":"done","baremetalhost":"default/master-2","provisioningState":"deprovisioning","requeue":false,"after":18790.040866384}

Waiting for ~5h is a bit too much 😃

Would you be willing to accept for review PR that add special annotation for clearing error count and message?

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 22 (22 by maintainers)

Most upvoted comments

we could add an annotation API to reset the value

I’m not very keen to such approach (if the intention it’s to zero the value), as it will give the user the possibility to modify a field that it is managed by the operator - and usually the ErrorCount goes in pair with the ErrorMessage, so it wouldn’t be enough to clear it. I think that in such cases what it’s required it’s something like a “wake up” annotation that will set it to 1, forcing thus at the same time a re-evaluation of the current status without losing the current error condition

That makes sense. I was mostly pointing out that any edit to the host should trigger reconciliation, so we don’t need a special API just to trigger a retry. If we wanted an API to let the user say “I think I have cleared the error on this host, try again” then an annotation would make sense instead of a spec field, because the controller could delete the annotation.

And fixing the Image field on the bmh object didn’t retrigger the reconcile loop and cleared out the errorCount? If not, that’s the issue to be fixed