Skip to content

Wait for backing resource teardown before removing ClusterInstance finalizer #28

Description

@caxu-rh

Problem

deleteIfExists treats an accepted delete request as completed teardown. The ClusterInstance controller can then remove its finalizer while backing resources with their own finalizers still exist. The pool reuses deterministic instance names, so a replacement can encounter the old HostedCluster, VM, or disk while deletion is still in progress.

This can cause stale readiness, name conflicts, or incorrect resource reuse between lease cycles.

References

  • internal/controller/helpers.go:42-54
  • internal/controller/clusterinstance_controller.go:613-627
  • internal/controller/clusterinstance_hypershift.go:411-435
  • internal/controller/clusterpool_controller.go:531-547

Suggested direction

Make teardown distinguish complete deletion from a delete request that is still pending. Keep the ClusterInstance finalizer and requeue until backing objects whose names will be reused are absent.

Tests

Add a backing object with a finalizer and verify that the ClusterInstance remains until the object is gone.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.priority/important-soonMust be staffed and worked on either currently, or very soon, ideally in time for the next release.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions