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

Issue 153: Add Rollback support for Pravega Cluster #255

Merged
merged 18 commits into from
Sep 20, 2019

Conversation

pbelgundi
Copy link
Contributor

@pbelgundi pbelgundi commented Aug 30, 2019

Signed-off-by: pbelgundi [email protected]

Change log description

  • Support for manual rollback of Pravega cluster to the previous version when upgrade fails.
  • Rollback can be done only to previous cluster version and only when cluster in 'Upgrade Failed' state.
  • Added version history field to Pravega Cluster Status. This would store history of all versions through which PravegaCluster has been successfully upgraded so far. ( similar to kubectl rollout history ). The last value in this array would be same as Current Version.
  • Improvements to Upgrade: When cluster upgrade is in progress, Cluster Status condition "Upgrading" is set to true and Reason and message values are set to indicate component currently being upgraded and number of replicas for which upgrade has completed against total replicas in component.
  • Removed all occurrences of spec.version assignment from operator code.
  • Added documentation for rollback.

Purpose of the change

Fixes #153

How to verify it

  1. Rollback is triggered when Upgrade fails and user manually updates the spec.version field to the previous version.
  2. When Rollback is in progress cluster condition RollbackInProgress set to Status=true.
  3. Rollback of Pravega cluster to the previous version completes successfully for all Pravega Components.
    This is indicated by all pravega replicas moving back to the older version and re-starting successfully.
    Tested rollback after a failing upgrade in each component - bookkeeper, controller and segmentstore and in all 3 cases the cluster was successfully restored back to the previous version.
  4. Incase of Rollback Failure, Cluster Status is set to Condition Error with Status=true and Reason = RollbackFailed and manual intervention would be needed to recover from this state.

Signed-off-by: pbelgundi <[email protected]>
@pbelgundi pbelgundi changed the title Issue 153: Rollback Pravega Cluster Issue 153: Add Rollback support for Pravega Cluster Sep 4, 2019
@pbelgundi pbelgundi removed the request for review from fpj September 5, 2019 09:19
@bourgeoisor
Copy link
Contributor

Thanks for modifying the flow to cater mostly to manual upgrade, Prajakta! Some of these tweaks are also really helpful, like the enhanced statuses. I have gone through the diff and this approach seems good to me. That being said, I would like someone else to approve in my stead, mainly due to my lack of deep understanding of the Pravega codebase and practices.

@pbelgundi pbelgundi requested a review from fpj September 9, 2019 10:11
@pbelgundi
Copy link
Contributor Author

Thanks for modifying the flow to cater mostly to manual upgrade, Prajakta! Some of these tweaks are also really helpful, like the enhanced statuses. I have gone through the diff and this approach seems good to me. That being said, I would like someone else to approve in my stead, mainly due to my lack of deep understanding of the Pravega codebase and practices.

@bourgeoisor, thanks for your comments.
I have added @fpj as a reviewer.

@pbelgundi pbelgundi removed the request for review from bourgeoisor September 9, 2019 10:12
Copy link
Contributor

@EronWright EronWright left a comment

Choose a reason for hiding this comment

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

I don't have time to look at the details, but the main issue that I mentioned earlier has been resolved (thank you!).

doc/rollback-cluster.md Outdated Show resolved Hide resolved
doc/rollback-cluster.md Outdated Show resolved Hide resolved
doc/rollback-cluster.md Outdated Show resolved Hide resolved
doc/rollback-cluster.md Outdated Show resolved Hide resolved
doc/rollback-cluster.md Outdated Show resolved Hide resolved
pkg/controller/pravegacluster/upgrade.go Show resolved Hide resolved
pkg/controller/pravegacluster/upgrade.go Outdated Show resolved Hide resolved
pkg/controller/pravegacluster/upgrade.go Show resolved Hide resolved
pkg/controller/pravegacluster/upgrade.go Show resolved Hide resolved
pkg/controller/pravegacluster/upgrade.go Show resolved Hide resolved
Signed-off-by: pbelgundi <[email protected]>
Signed-off-by: pbelgundi <[email protected]>
Signed-off-by: pbelgundi <[email protected]>
@pbelgundi pbelgundi self-assigned this Sep 18, 2019
Signed-off-by: pbelgundi <[email protected]>
Signed-off-by: pbelgundi <[email protected]>
@pbelgundi pbelgundi merged commit 6315a83 into master Sep 20, 2019
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.

Rollback when upgrade process fails
5 participants