Skip to content

Cache sync timeout after upgrading to version 0.11.0 #1786

@erikgb

Description

@erikgb

After upgrading our controller K8s dependencies to more recent versions, controller-runtime 0.11.0, K8s 0.23.1, we see an increased frequency of this type of error:

{
  "level": "error",
  "ts": 1642682485.0051146,
  "logger": "controller.application",
  "msg": "Could not wait for Cache to sync",
  "reconciler group": "stas.mycompany.com",
  "reconciler kind": "Application",
  "error": "failed to wait for application caches to sync: timed out waiting for cache to be synced",
  "stacktrace": "sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2\n\t/builds/stas/k8s-controllers/application-operator/.go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:208\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start\n\t/builds/stas/k8s-controllers/application-operator/.go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:234\nsigs.k8s.io/controller-runtime/pkg/manager.(*runnableGroup).reconcile.func1\n\t/builds/stas/k8s-controllers/application-operator/.go/pkg/mod/sigs.k8s.io/[email protected]/pkg/manager/runnable_group.go:218"
}

Any clues what might cause this, and how to fix it? The default cache timeout seems to be 2 minutes, and I think that should be (more than) enough time to sync the cache..... 🤔 We see the problem in 2 out of 3 controllers.

Is there any change that might have caused this error to emerge, and that we just have to increase the cache timeout? After reverting to the previous versions, controller-runtime 0.10.3, K8s 0.22.6, this error does not occur at all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions