Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong app instance state returned by process stats endpoint during graceful shutdown #3834

Merged

Conversation

kathap
Copy link
Contributor

@kathap kathap commented Jun 7, 2024

This change solves issue #3780.
After stopping an app, cloud controller immediately returns state DOWN when calling GET /v3/apps/:guid/processes/:type/stats even if the app is still in graceful shutdown period. The goal is to not simply to report DOWN for an app instance when the desired LRP is not found but it should request the actual LRP additionally to determine the instance state.

  • A short explanation of the proposed change:
    If no running instance is found, instead of just returning state DOWN, now there is a check for the actual LRP state and if there is an actual LRP, state will be set to STOPPING.

  • An explanation of the use cases your change solves
    After stopping an app, cloud controller will return state STOPPING when calling GET /v3/apps/:guid/processes/:type/stats as long as the app is still in graceful shutdown period and there exists still an actual LRP.

  • 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 marked this pull request as draft June 7, 2024 16:39
@kathap kathap force-pushed the return-state-STOPPING-for-processes-that-are-in-graceful-shutdown branch from ae44b42 to e12855e Compare June 14, 2024 15:01
@kathap kathap marked this pull request as ready for review June 17, 2024 13:20
@kathap kathap force-pushed the return-state-STOPPING-for-processes-that-are-in-graceful-shutdown branch from e5f1bb2 to dbf0b61 Compare June 18, 2024 14:36
…aceful shutdown

After stopping an app, cloud controller will return state STOPPING (instead of DOWN) when calling GET /v3/apps/:guid/processes/:type/stats as long as the app is still in graceful shutdown period and there exists still an actual LRP
@kathap kathap force-pushed the return-state-STOPPING-for-processes-that-are-in-graceful-shutdown branch from dbf0b61 to 40cbd19 Compare June 18, 2024 15:10
Copy link
Contributor

@johha johha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 👍

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