cloudfoundry / cloudfoundry/capi-release

Don't wait forever in cc-worker

Open
#256 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

unscheduled
Dominant language
HTML
Stars
24
Forks
110
Avg merge
3d 12h
Merged PRs (30d)
8

Description

Thanks for submitting an issue to capi-release. We are always trying to improve! To help us, please fill out the following template.

Issue

cc-worker can block bosh from cancelling a deployment, since the post start waits forever:

https://github.com/cloudfoundry/capi-release/blob/5f061c8330efecfd61588cc3186248c5c2a3aff0/jobs/cloud_controller_worker/templates/post-start.sh.erb#L16

Steps to Reproduce

CC migrations fail, or pre-start script fails in another way

Expected result

the deployment fails, the task is cancelled, and the lock is deleted

Current result

the deployment fails, the task hangs when cancelled, and the lock is not deleted

Possible Fix

introduce some kind of timeout in the post-start script

name of issue screenshot

[if relevant, include a screenshot]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read jobs/cloud_controller_worker/templates/post-start.sh.erb at line 16 and trace how the post-start behaves when CC migrations or another pre-start script fails. Reproduce the cancellation scenario, then verify that a failed deployment cancels the task and deletes the lock instead of hanging indefinitely.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
devops, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.