Skip to content

Fail stuck service instance 'update' operations - #5359

Closed
kathap wants to merge 3 commits into
mainfrom
service-update-in-progress-cleanup
Closed

Fail stuck service instance 'update' operations#5359
kathap wants to merge 3 commits into
mainfrom
service-update-in-progress-cleanup

Conversation

@kathap

@kathap kathap commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

When CCDB is briefly unavailable during a broker polling cycle, the CC polling job can fail permanently (max_attempts=1) while the broker is still processing. This leaves an update stuck: last_operation.state stays 'in progress' with no delayed job working on it, requiring operator intervention.

Add ServiceOperationsUpdateInProgressCleanup, a periodic job that detects stuck 'update' operations whose polling job has permanently failed and marks the operation and its pollable job as 'failed', giving clients a definitive final state. A FOR UPDATE SKIP LOCKED guard prevents double processing across concurrent CC instances.

Unlike the create cleanup, no orphan mitigation is triggered: an update targets a resource that already exists, so it must not be deprovisioned.

Thanks for contributing to cloud_controller_ng. To speed up the process of reviewing your pull request please provide us with:

When CCDB is briefly unavailable during a broker polling cycle, the CC
polling job can fail permanently (max_attempts=1) while the broker is
still processing. This leaves an update stuck: last_operation.state
stays 'in progress' with no delayed job working on it, requiring
operator intervention.

Add ServiceOperationsUpdateInProgressCleanup, a periodic job that
detects stuck 'update' operations whose polling job has permanently
failed and marks the operation and its pollable job as 'failed', giving
clients a definitive final state. A FOR UPDATE SKIP LOCKED guard
prevents double processing across concurrent CC instances.

Unlike the create cleanup, no orphan mitigation is triggered: an update
targets a resource that already exists, so it must not be deprovisioned.
kathap added 2 commits August 13, 2026 16:31
Add ServiceOperationsDeleteStuckInProgressRetry, a periodic clock job that
detects service-instance delete operations stuck in 'in progress' (broker
still working, CC polling job permanently failed after a transient DB error)
and re-enqueues the original delete polling job instead of marking it failed.

The failed delayed_job's serialized handler is reused, preserving the original
user_audit_info and start_time so the ReoccurringJob max-duration expiry still
marks the operation failed once the original polling window elapses. No orphan
mitigation, since delete targets a resource that should be removed.
@kathap kathap closed this Aug 14, 2026
@kathap
kathap deleted the service-update-in-progress-cleanup branch August 14, 2026 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant