{{ message }}
Repository navigation
Conversation
…ol plane The etcd StatefulSet was only scaled down and up inside the branch that handles a Deployment control plane, so with a StatefulSet control plane vcluster pause left the etcd pods running and resume never touched them. Scale etcd after the control plane regardless of the control plane kind. Signed-off-by: Youssef Omar Bouden <youssef.bouden2002@gmail.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 19de961. Configure here.
Signed-off-by: Youssef Omar Bouden <youssef.bouden2002@gmail.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


What issue type does this pull request address? (keep at least one, remove the others)
/kind bugfix
What does this pull request do? Which issues does it resolve? (use
resolves #<issue_number>if possible)resolves #4194
PauseVClusteronly scaled the etcd StatefulSet down inside the branch that handles a Deployment control plane, andResumeVClusteronly scaled it up there, so with a StatefulSet control planevcluster pauseleft the deployed etcd pods running andvcluster resumenever touched them. Etcd is now scaled after the control plane regardless of the control plane kind; the Deployment layout keeps its api and controller scale down in the legacy branch and theisRestoreguard is unchanged.PauseResumeDeployedEtcdSpecmirrorsPauseResumeScaledDownSpecwithcontrolPlane.backingStore.etcd.deploy.enabled=trueand a volume claim, so the control plane renders as a StatefulSet, and asserts the<name>-etcdStatefulSet is annotated and at 0 replicas with no etcd pods after pause, then back to 1 with running pods after resume.createAndWaitForReadytakes extra--setarguments for that. The spec is labelledprandcore; a ginkgo dry run with theprfilter lists both of its specs.Please provide a short message that should be published in the vcluster release notes
Fixed an issue where vcluster pause did not scale down the deployed etcd StatefulSet when the control plane runs as a StatefulSet, and resume did not scale it back up.
What else do we need to know?
A cluster paused by an older CLI, with the control plane at 0 and etcd still running, gets its etcd paused on the next
vcluster pausebecause the control plane's already paused path still reports it as found.E2E Tests
Default Test Execution
The mandatory PR suite runs automatically. Only specify additional test suites below if needed.
Adding New Test Suites
When adding a new ginkgo test suite:
Additional test suites
Additional test suite(s) that will be executed before the mandatory PR suite:
Note
Medium Risk
Changes core pause/resume lifecycle behavior for deployed etcd across control-plane layouts; incorrect scaling could leave clusters partially running or fail to resume.
Overview
Fixes pause/resume so a deployed etcd StatefulSet is scaled down and back up when the control plane runs as a StatefulSet, not only when it uses the Deployment layout.
In
PauseVCluster/ResumeVCluster, etcd scale operations were nested inside the branch that handles Deployment control planes, sovcluster pausecould leave etcd pods running andvcluster resumenever restored them. Etcd scaling now runs after control-plane scaling for both layouts; Deployment-only api/controller scale-down and theisRestoreguard on etcd pause are unchanged.E2E adds
PauseResumeDeployedEtcdSpec(registered in the lifecycle suite): creates a cluster with deployed etcd and a volume claim (StatefulSet control plane), then asserts etcd pause annotations, zero replicas, and pod teardown, then resume to one replica and running pods.createAndWaitForReadyaccepts optional extravcluster create --setarguments for that setup.Reviewed by Cursor Bugbot for commit 37b0934. Bugbot is set up for automated code reviews on this repo. Configure here.