cloudfoundry / cloudfoundry/cloud_controller_ng

Cancelling a rollback and trying it again fails

Open
#4,232 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
207
Forks
373
Avg merge
2d 12h
Merged PRs (30d)
56

Description

Hey
I was working on a scenario where I was doing the following steps but I am getting an error from CAPI.

  1. push an app
  2. restage it to create a new revision
  3. Execute cf revisions test-dora and get the output
Getting revisions for app test-dora in org test / space test as admin...

revision       description                                        deployable   revision guid                          created at
10(deployed)   New droplet deployed.                              true         7e2f381b-f8d3-49a7-a81a-faedaed348c1   2025-02-21T18:45:16Z
9              New droplet deployed. Rolled back to revision 1.   true         1df6188f-518b-4237-adea-8018ddd4bd58   2025-02-20T18:08:17Z
8              New droplet deployed.                              true         208c4716-38bd-4935-b7a2-23e3a10cf5a8   2025-02-20T18:05:51Z
7              New droplet deployed. Rolled back to revision 1.   true         580a624d-b2b2-47d1-b2dc-bd7b38d91d67   2025-02-20T17:35:46Z
6              New droplet deployed.                              true         a8bba232-9e64-4a2b-9d1a-57610e215c38   2025-02-20T17:19:00Z
5              New droplet deployed. Rolled back to revision 1.   true         acf05ec4-0a26-4569-9570-5fc653793e68   2025-02-20T17:13:05Z
4              New droplet deployed.                              true         b719c3f8-8a91-42e2-a5af-ceed6a045be6   2025-02-20T17:11:38Z
3              New droplet deployed. Rolled back to revision 1.   true         a9d3d8e3-808b-40a6-8249-666eb2eade27   2025-02-19T18:59:04Z
2              New droplet deployed.                              true         617a33e0-2245-4c99-a722-de447094feea   2025-02-19T18:57:13Z
1              Initial revision.                                  true         edbe120e-d62e-43f9-aa64-30f9ce278b68   2025-02-19T18:52:35Z
  1. do cf rollback --strategy canary dora -v 1
  2. execute cf revisions test-dora with the output
Getting revisions for app test-dora in org test / space test as admin...

Info: this app is in the middle of a rolling deployment. More than one revision is deployed.

Info: this app is in the middle of a deployment. More than one revision is deployed.

revision       description                                        deployable   revision guid                          created at
11(deployed)   New droplet deployed. Rolled back to revision 1.   true         73facf40-ea02-4d75-9cbe-7bfed584838f   2025-02-21T18:46:30Z
10(deployed)   New droplet deployed.                              true         7e2f381b-f8d3-49a7-a81a-faedaed348c1   2025-02-21T18:45:16Z
9              New droplet deployed. Rolled back to revision 1.   true         1df6188f-518b-4237-adea-8018ddd4bd58   2025-02-20T18:08:17Z
8              New droplet deployed.                              true         208c4716-38bd-4935-b7a2-23e3a10cf5a8   2025-02-20T18:05:51Z
7              New droplet deployed. Rolled back to revision 1.   true         580a624d-b2b2-47d1-b2dc-bd7b38d91d67   2025-02-20T17:35:46Z
6              New droplet deployed.                              true         a8bba232-9e64-4a2b-9d1a-57610e215c38   2025-02-20T17:19:00Z
5              New droplet deployed. Rolled back to revision 1.   true         acf05ec4-0a26-4569-9570-5fc653793e68   2025-02-20T17:13:05Z
4              New droplet deployed.                              true         b719c3f8-8a91-42e2-a5af-ceed6a045be6   2025-02-20T17:11:38Z
3              New droplet deployed. Rolled back to revision 1.   true         a9d3d8e3-808b-40a6-8249-666eb2eade27   2025-02-19T18:59:04Z
2              New droplet deployed.                              true         617a33e0-2245-4c99-a722-de447094feea   2025-02-19T18:57:13Z
1              Initial revision.                                  true         edbe120e-d62e-43f9-aa64-30f9ce278b68   2025-02-19T18:52:35Z
  1. execute cf cancel-deployment dora
  2. Execute cf revisions test-dora with the output
Getting revisions for app test-dora in org test / space test as admin...

revision       description                                        deployable   revision guid                          created at
11             New droplet deployed. Rolled back to revision 1.   true         73facf40-ea02-4d75-9cbe-7bfed584838f   2025-02-21T18:46:30Z
10(deployed)   New droplet deployed.                              true         7e2f381b-f8d3-49a7-a81a-faedaed348c1   2025-02-21T18:45:16Z
9              New droplet deployed. Rolled back to revision 1.   true         1df6188f-518b-4237-adea-8018ddd4bd58   2025-02-20T18:08:17Z
8              New droplet deployed.                              true         208c4716-38bd-4935-b7a2-23e3a10cf5a8   2025-02-20T18:05:51Z
7              New droplet deployed. Rolled back to revision 1.   true         580a624d-b2b2-47d1-b2dc-bd7b38d91d67   2025-02-20T17:35:46Z
6              New droplet deployed.                              true         a8bba232-9e64-4a2b-9d1a-57610e215c38   2025-02-20T17:19:00Z
5              New droplet deployed. Rolled back to revision 1.   true         acf05ec4-0a26-4569-9570-5fc653793e68   2025-02-20T17:13:05Z
4              New droplet deployed.                              true         b719c3f8-8a91-42e2-a5af-ceed6a045be6   2025-02-20T17:11:38Z
3              New droplet deployed. Rolled back to revision 1.   true         a9d3d8e3-808b-40a6-8249-666eb2eade27   2025-02-19T18:59:04Z
2              New droplet deployed.                              true         617a33e0-2245-4c99-a722-de447094feea   2025-02-19T18:57:13Z
1              Initial revision.                                  true         edbe120e-d62e-43f9-aa64-30f9ce278b68   2025-02-19T18:52:35Z
  1. execute cf rollback --strategy canary test-dora --version 1 with the output
Rolling 'test-dora' back to revision '1' will create a new revision. The new revision will use the settings from revision '1'.
Are you sure you want to continue? [yN]: y
Rolling back to revision 1 for app test-dora in org test / space test as admin...
Creating deployment for app test-dora...

Unable to rollback. The code and configuration you are rolling back to is the same as the deployed revision.
FAILED

This happens with both strategies canary and rolling.

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

Reproduce the sequence using cf rollback --strategy canary, cf cancel-deployment, and cf revisions, then retry the rollback to observe the failure. Trace the Cloud Controller handling for cancellation and rollback, and consider the issue done when both canary and rolling strategies allow the cancelled rollback to be attempted again successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.