cloudfoundry / cloudfoundry/cloud_controller_ng
App env vars and service binding changes aren't reverted for failed rolling deployment
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 207
- Forks
- 373
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 56
Description
Issue
A rolling update which is canceled because of an application issue (e.g. failed start) will revert to the latest known droplet version but any changes to environment variables or service bindings will not be reverted.
Steps to Reproduce
- Deploy a slightly modified version of the spring-music app which introduces a
versionand a new env var calledTESTby following the instructions available on the readme. - Verify that
https://<apphost>/appinfoshows{"profiles":["http2"],"services":[],"version":"1.0.0"}andhttps://<apphost>/envVarTestshowsfalse - Create a service instance from any type with the name
test - Deploy with
cf push --strategy rollinganother version of the spring-music app which can't start and introduces changes to the appversion, the value of theTESTenv var and a binding to thetestservice instance. - The
cf push --strategy rollingwill fail and withcf droplets <my-app>you can check that the latest droplet isn't the current one, butcf env <my-app>will show the updated version of the env var and that the app is bound to thetestservice. - Restart the app with
cf restart <my-app>Verify thathttps://<apphost>/appinfoshows{"profiles":["http2"],"services":["test"],"version":"1.0.0"}andhttps://<apphost>/envVarTestshowstrue.
Expected result
The env var and service binding changes are not applied for failed rolling deployments.
Current result
Currently the env var and service binding changes are applied to the application.
Possible Fix
One option could be to use the Cloud Foundry API app revisions to revert to the last known good version in such a situation.
Additional Context
Create an issue on the docs side to document the current behaviour.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named. Reproduce the failed rolling deployment with the linked spring-music variants, then trace the rolling deployment handling around cf push and the Cloud Foundry API revisions documentation. Done means a canceled failed deployment leaves environment variables and service bindings unchanged, as verified with cf env, cf droplets, and cf restart.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- backend, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100