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

Fix CAPI Backup and add filter for cluster name #6313

Merged
merged 1 commit into from
Jul 27, 2023

Conversation

vignesh-goutham
Copy link
Member

Description of changes:
Set the context to right management cluster when upgrading both mgmt and workload cluster for taking backup.
Set cluster name filter for backing up the cluster that is getting upgraded.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@eks-distro-bot eks-distro-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 27, 2023
@codecov
Copy link

codecov bot commented Jul 27, 2023

Codecov Report

Merging #6313 (7127fe6) into main (92f5119) will increase coverage by 0.00%.
Report is 3 commits behind head on main.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #6313   +/-   ##
=======================================
  Coverage   75.13%   75.13%           
=======================================
  Files         447      447           
  Lines       37266    37267    +1     
=======================================
+ Hits        28001    28002    +1     
  Misses       7700     7700           
  Partials     1565     1565           
Files Changed Coverage Δ
pkg/clustermanager/cluster_manager.go 72.06% <100.00%> (ø)
pkg/executables/clusterctl.go 73.31% <100.00%> (+0.07%) ⬆️
pkg/workflows/upgrade.go 64.19% <100.00%> (ø)

@vignesh-goutham
Copy link
Member Author

/approve

@eks-distro-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vignesh-goutham

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@vignesh-goutham
Copy link
Member Author

/cherrypick release-0.17

@eks-distro-pr-bot
Copy link
Contributor

@vignesh-goutham: once the present PR merges, I will cherry-pick it on top of release-0.17 in a new PR and assign it to you.

In response to this:

/cherrypick release-0.17

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@vivek-koppuru vivek-koppuru self-requested a review July 27, 2023 22:14
@raymond-zhang00
Copy link
Contributor

/lgtm

@eks-distro-bot eks-distro-bot merged commit 590d7ba into aws:main Jul 27, 2023
5 checks passed
@eks-distro-pr-bot
Copy link
Contributor

@vignesh-goutham: #6313 failed to apply on top of branch "release-0.17":

Applying: Fix CAPI Backup and add filter for cluster name
Using index info to reconstruct a base tree...
M	pkg/clustermanager/cluster_manager.go
M	pkg/clustermanager/mocks/client_and_networking.go
M	pkg/workflows/interfaces/interfaces.go
M	pkg/workflows/interfaces/mocks/clients.go
M	pkg/workflows/upgrade.go
M	pkg/workflows/upgrade_test.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/workflows/upgrade_test.go
Auto-merging pkg/workflows/upgrade.go
Auto-merging pkg/workflows/interfaces/mocks/clients.go
Auto-merging pkg/workflows/interfaces/interfaces.go
CONFLICT (content): Merge conflict in pkg/workflows/interfaces/interfaces.go
Auto-merging pkg/clustermanager/mocks/client_and_networking.go
Auto-merging pkg/clustermanager/cluster_manager.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Fix CAPI Backup and add filter for cluster name
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherrypick release-0.17

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@vivek-koppuru
Copy link
Member

Spoke with @raymond-zhang00 and will be storing two backups with the first one including all the resources and not just the cluster name so that we can cover the scenario for restoration where mgmt cluster fails to upgrade and customer loses access to both kind cluster and mgmt cluster. This helps make it easier to recover the workload cluster resources into a new cluster if the original mgmt cluster is not recoverable.

@vignesh-goutham
Copy link
Member Author

/cherrypick release-0.16

@eks-distro-pr-bot
Copy link
Contributor

@vignesh-goutham: #6313 failed to apply on top of branch "release-0.16":

Applying: Fix CAPI Backup and add filter for cluster name
Using index info to reconstruct a base tree...
M	pkg/clustermanager/cluster_manager.go
M	pkg/clustermanager/cluster_manager_test.go
M	pkg/clustermanager/mocks/client_and_networking.go
M	pkg/executables/clusterctl.go
M	pkg/executables/clusterctl_test.go
M	pkg/workflows/interfaces/interfaces.go
M	pkg/workflows/interfaces/mocks/clients.go
M	pkg/workflows/upgrade.go
M	pkg/workflows/upgrade_test.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/workflows/upgrade_test.go
CONFLICT (content): Merge conflict in pkg/workflows/upgrade_test.go
Auto-merging pkg/workflows/upgrade.go
CONFLICT (content): Merge conflict in pkg/workflows/upgrade.go
Auto-merging pkg/workflows/interfaces/mocks/clients.go
Auto-merging pkg/workflows/interfaces/interfaces.go
CONFLICT (content): Merge conflict in pkg/workflows/interfaces/interfaces.go
Auto-merging pkg/executables/clusterctl_test.go
CONFLICT (content): Merge conflict in pkg/executables/clusterctl_test.go
Auto-merging pkg/executables/clusterctl.go
CONFLICT (content): Merge conflict in pkg/executables/clusterctl.go
Auto-merging pkg/clustermanager/mocks/client_and_networking.go
Auto-merging pkg/clustermanager/cluster_manager_test.go
Auto-merging pkg/clustermanager/cluster_manager.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Fix CAPI Backup and add filter for cluster name
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherrypick release-0.16

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

vignesh-goutham added a commit to vignesh-goutham/eks-anywhere that referenced this pull request Aug 1, 2023
eks-distro-bot pushed a commit that referenced this pull request Aug 1, 2023
…r flags for backups (#6360)

* add backup cluster retries on infrastructure error (#6211)

* adding bootstrap backup for upgrade failure (#6086)

* Fix CAPI Backup and add filter for cluster name (#6313)

* best effort backup and bootstrap backup to different directory (#6332)

* Update clusterctl move regex

---------

Co-authored-by: Raymond Zhang <67798267+raymond-zhang00@users.noreply.github.com>
shubhamsharan21 pushed a commit to shubhamsharan21/eks-anywhere that referenced this pull request Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants