Skip to content

Conversation

kathap
Copy link
Contributor

@kathap kathap commented Apr 7, 2025

Enhance droplet upload to be more resilient:
Add shutdown logic for cc_uploader process in Drain class

- Implement `shutdown_cc_uploader` method to handle graceful and forceful shutdown of the cc_uploader process.
- Send `TERM` signal to initiate shutdown and wait for the process to terminate.
- If the process does not terminate within the specified timeout (=900seconds), send `KILL` signal to forcefully shut it down.
- Log appropriate messages during the shutdown process.
  • A short explanation of the proposed change:
    The proposed change adds a new method shutdown_cc_uploader to the Drain class. This method handles the graceful and forceful shutdown of the cc_uploader process. It sends a TERM signal to initiate the shutdown and waits for the process to terminate. If the process does not terminate within the specified timeout (900 seconds), it sends a KILL signal to forcefully shut it down. The method also logs appropriate messages during the shutdown process.

  • An explanation of the use cases your change solves
    If api VM gets stopped and starts draining, give upload jobs the chance to finish upload, initiate a graceful shutdown, allowing the process to terminate cleanly.

  • Links to any other associated PRs
    Add draining for cc_uploader capi-release#529
    More resilient droplet upload cc-uploader#195

  • I have reviewed the contributing guide

  • I have viewed, signed, and submitted the Contributor License Agreement

  • I have made this pull request to the main branch

  • I have run all the unit tests using bundle exec rake

  • I have run CF Acceptance Tests

@kathap kathap merged commit 1f362f0 into main Apr 15, 2025
8 checks passed
ari-wg-gitbot added a commit to cloudfoundry/capi-release that referenced this pull request Apr 15, 2025
Changes in cloud_controller_ng:

- Add draining for cc uploader
    PR: cloudfoundry/cloud_controller_ng#4296
    Author: Katharina Przybill <[email protected]>
@moleske moleske deleted the add-draining-for-cc-uploader branch April 15, 2025 15:17
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.

2 participants