Skip to content

Catch "object has been modified" errors in StatefulSet reconcile loop #18

Description

@simu

Summary

As a developer/operator of the statefulset-resize-controoler
I want to only see "real" errors logged as ERROR
So that I can identify at a glance whether the operator has issues

Context

Currently the controller regularly logs errors like

2021-10-19T11:01:05.758+0200	ERROR	controller-runtime.manager.controller.statefulset	Reconciler error	{"reconciler group": "apps", "reconciler kind": "StatefulSet", "name": "test", "namespace": "sg-test", "error": "Operation cannot be fulfilled on statefulsets.apps \"test\": the object has been modified; please apply your changes to the latest version and try again"}

However, it's expected that sometimes reconciliation of StatefulSet will need to be retried because the object got modified.

We should catch retry errors instead of just logging them as ERROR in the controller.

Out of Scope

  • Fixing other spurious ERROR logs

Further links

n/a

Acceptance criteria

  • When I run the controller, it doesn't log errors regarding StatefulSets being modified while the controller is reconciling them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions