[Backport release-1.6] feat(kubevirt): expose migration configuration through platform values - #4339
europrinter (yankawai) wants to merge 2 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: cozystack/cozystack/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Aleksei Sviridkin (lexfrei)
left a comment
There was a problem hiding this comment.
europrinter (@yankawai) NOT LGTM because of one test case the backport dropped. Everything else matches #4254, and an existing 1.6 install renders exactly as before.
What I checked, against the current release-1.6 tip (8a6ce81):
- The diff differs from #4254's merge only where release-1.6 forces it. Platform values gain the
kubevirt:key with its header, and the hop iniaas.yamlgets a reworded copy of the comment that sits over the disabledFeatureGates hop on main. The test script gainsrun_update_logged, and the Makefile header says "six". Main's rewording of a Makefile comment is left out, because release-1.6 doesn't have that paragraph. Nothing from the disabledFeatureGates work comes along, and the rest is line for line the same as main. make updatefrom this branch, run on the release-1.6 CR, produces the committed CR byte for byte. A second run changes nothing. Without the new awk check,update_idempotency_test.shgoes red on the missing-key case, as the description says.- With default values the rendered output is byte-identical between the base and this head. That covers the platform chart with values.yaml alone and with each of the isp-full, isp-full-generic and isp-hosted files, and the kubevirt chart with defaults and with a GPU-style set of forwarded values. I dropped
templates/repository.yamlon both sides, since its lookup fails offline. - With
migrationsset, the Package values and the renderedspec.configuration.migrationsare the same as on main. I tried limits,false/0,{},null, andkubevirt: null. - kubevirt runs 9 tests (5 on the base), platform runs 101 in 24 suites (97 on the base), and the idempotency script passes. CI hasn't run any of this yet. The Pull Request, Pre-Commit Checks and API Review Gate runs on this head are waiting for workflow approval.
The blocker is a null-block test that was dropped together with the disabledFeatureGates tests around it. On main, #4254 added a notExists on spec.components.kubevirt.values.migrations to "renders the kubevirt Package without a nil-pointer error when the whole kubevirt block is set to null". That test came with the disabledFeatureGates work, so release-1.6 doesn't have it, and the assertion went with it. But on this branch (.Values.kubevirt).migrations is the only reader of .Values.kubevirt, so here the test belongs to this change.
Nothing on this branch catches a regression there. I changed iaas.yaml:17 to {{- with .Values.kubevirt.migrations -}}. The platform suite stays at 101/101, while helm template with kubevirt: null fails with nil pointer evaluating interface {}.migrations. The same edit on main turns that test red. The comment this PR adds over the hop says the walk is nil-safe for the reason the gpu block gives, and the gpu block says its null cases are pinned by tests. This one isn't.
The fix is to restore the case without its disabledFeatureGates assertion, next to the new migrations cases in bundles_gpu_kubevirt_wiring_test.yaml:
- it: renders the kubevirt Package without a nil-pointer error when the whole kubevirt block is set to null
set:
bundles:
system:
enabled: true
variant: isp-full
iaas:
enabled: true
enabledPackages: []
kubevirt: null
documentSelector:
path: metadata.name
value: cozystack.kubevirt
asserts:
- equal:
path: kind
value: Package
- notExists:
path: spec.components.kubevirt.values.migrationsWith it the suite passes at 102, and the flattened walk turns it red. The platform-defaults assertion dropped the same way doesn't need to come back. The default is {}, and "omits empty kubevirt.migrations" already fails if the hop forwards it. The wiring-test bullet in the commit message and in the description will need a small edit afterwards, since the description becomes the merge commit message on release-1.6.
Two things that don't block. The commit lists me as its author. It was cherry-picked from the merge commit of #4254, which I made, and cherry-pick keeps the author of that commit. You wrote the change and you sign it off, so git commit --amend --reset-author while you're amending puts your name on it.
The other is docs. The website's 1.6 page content/en/docs/v1.6/operations/configuration/platform-package.md is the table of platform values keys, and it has no kubevirt.* row. website#697 only touched next. The trigger map in docs/agents/contributing.md ties platform values.yaml to the next copy of that page, and says a docs change gets backported once it matters for a released version, which this one now does. A one-row follow-up there, linked from the description, fits better than the "no downstream repository" tick.
Backport of cozystack#4254 to release-1.6. Cluster-wide migration settings could only be applied by patching the KubeVirt CR: the kubevirt chart did not render `migrations`, and the platform bundle did not forward it. The optional `kubevirt.migrations` platform value now passes through the generated Package to `spec.configuration.migrations`, and a hand patch of that Package is undone on the next platform render, so this hop is the only supported setter. Four differences from main, all from release-1.6 predating the disabledFeatureGates work: - platform values gains a `kubevirt` block holding `migrations` alone, and the iaas bundle gains only the migrations hop; - the wiring test takes the four migrations cases and the case for a null `kubevirt` block, without the assertions that belong to disabledFeatureGates cases absent here; - update_idempotency_test.sh gains `run_update_logged`, which arrived on main alongside that work and the new cases need; - the kubevirt Makefile header counts six sed patches rather than five. Verified on this branch: 9 kubevirt chart tests, 31 platform wiring tests (102 across the platform suite), and update_idempotency_test PASS under GNU make and sed. Removing the new awk guard from the Makefile turns that test red naming the migrations block, so the ported guard is not decorative. On this line (.Values.kubevirt).migrations is the only reader of .Values.kubevirt, and rewriting it as .Values.kubevirt.migrations turns the null-block case red with a nil pointer. The automated backport in cozystack#4322 stopped with conflict markers in four files as its only commit, which is why this exists. Assisted-by: LLM Signed-off-by: Yan Bondarenko <[email protected]>
7fa1d01 to
d45eb9b
Compare
|
Restored the null-block case: the platform suite is at 102, and rewriting the hop as |
Aleksei Sviridkin (lexfrei)
left a comment
There was a problem hiding this comment.
europrinter (@yankawai) LGTM. The test for a null kubevirt block is back, and it can go red.
It keeps the notExists check on migrations that #4254 has on main and drops only the disabledFeatureGates one, which has nothing to check on this line. I removed the parentheses at iaas.yaml:17, and only that test failed, with nil pointer evaluating interface {}.migrations. With the parentheses back the platform suite passes, 102 tests.
The rebuilt commit sits on the same release-1.6 base, and the author field is now yours.
Replace negative Chainsaw assertions with deletion watches, keeping the two-minute timeout and the preceding Bound assertions for both PVCs. Chainsaw 0.2.15 can abort polling on an API read error and report its previous "resource matches expectation" instead. The failed cozystack#4402 run ended this check after 4.5 seconds, not its two-minute budget. Verified with Chainsaw 0.2.15 and kubectl 1.33.13 against a loopback API: delayed deletion, already absent, a read failure on the old polling path, and watch reconnect succeed; retained PVCs and forbidden reads fail. Chainsaw lint passes. The original CI API error was not preserved; a full E2E rerun is still needed. Signed-off-by: Yan Bondarenko <[email protected]>
… through platform values (#4402) This reopens a fork backport from a branch in this repository so its CI can run. The commit is the one from #4339 by @yankawai, unchanged. On release-1.6 the pull-request CI pushes the images it builds, and a run from a fork has no registry credentials, so #4339 stopped at the build jobs and never reached e2e. The description below is the author's. ## What this PR does Manual backport of #4254 to `release-1.6`. The automated backport, #4322, stopped with conflict markers in four files as its only commit, so it is red on DCO and unmergeable as it stands. Every conflict has the same cause: the `kubevirt.disabledFeatureGates` work landed on main after 1.6 was cut, and the cherry-pick carried it into hunks this line does not have. Four differences follow: - platform values gains a `kubevirt` block holding `migrations` alone, and the iaas bundle gains only the migrations hop; - the wiring test takes the four migrations cases and the case for a null `kubevirt` block, without the assertions that belong to disabledFeatureGates cases this line does not have; - `update_idempotency_test.sh` gains `run_update_logged`, a four-line helper that arrived on main with that work and the new cases need; - the kubevirt Makefile header counts six sed patches rather than five. Verified on this branch: 9 kubevirt chart tests, 31 platform wiring tests (102 across the platform suite), and `update_idempotency_test` PASS under GNU make and sed. Removing the new awk guard from the Makefile turns that test red naming the migrations block, so the ported guard is doing work. On this line `(.Values.kubevirt).migrations` is the only reader of `.Values.kubevirt`; rewriting it as `.Values.kubevirt.migrations` turns the null-block case red with a nil pointer. Feature summary, unchanged from #4254: cluster-wide migration settings could only be applied by patching the KubeVirt CR, because the kubevirt chart did not render `migrations` and the platform bundle did not forward it. `kubevirt.migrations` now passes through the generated Package to `spec.configuration.migrations`. A hand patch of that Package is undone on the next platform render, so this hop is the only supported setter. ```yaml kubevirt: migrations: bandwidthPerMigration: 625M parallelMigrationsPerCluster: 2 parallelOutboundMigrationsPerNode: 1 ``` ### Screenshots Not a UI change. ### Downstream repositories Walked the trigger map against the diff: platform values, the iaas bundle and the kubevirt chart. The v1.6 reference page of the platform values had no `kubevirt` section, so the row goes there as a follow-up that should land with this backport. - [ ] No downstream repository is affected by this change - [x] [cozystack/website](https://github.com/cozystack/website) - follow-up: cozystack/website#705 ### Release note ```release-note feat(kubevirt): expose `kubevirt.migrations` in the platform values and forward it to `spec.configuration.migrations` on the KubeVirt CR, so live-migration bandwidth and parallelism can be set without patching a Package that the platform re-renders. ```
This reopens a fork pull request from a branch in this repository so its CI can run. The commit is the one from #4481 by @yankawai, unchanged. On release-1.6 the pull-request CI pushes the images it builds, and a run from a fork has no registry credentials, so #4481 could never get past the build jobs to e2e. The description below is the author's. ## What this PR does Wait for both ZooKeeper PVCs to disappear after Kafka deletion. Negative assertions can stop on an API read error before their timeout; deletion watches wait for the resource to be removed. The existing Bound and KafkaTopic checks are unchanged. Carries the test-only change from c92828c in #4339, which was not included in #4402. This targets `release-1.6`; the Kafka suite on `main` uses KRaft without ZooKeeper. Validated with Chainsaw 0.2.15: delayed deletion, an already absent PVC, an interrupted watch, and the read-error fixture pass. A retained PVC and forbidden access fail. The full Kafka E2E run remains for CI. ### Screenshots Not applicable. ### Downstream repositories - [x] No downstream repository is affected by this change - [ ] [cozystack/website](https://github.com/cozystack/website) - follow-up: - [ ] [cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack) - follow-up: - [ ] [cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack) - follow-up: - [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up: - [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up: - [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) - follow-up: - [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) - follow-up: - [ ] [cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server) - follow-up: - [ ] [cozystack/external-apps-example](https://github.com/cozystack/external-apps-example) - follow-up: - [ ] [cozystack/examples](https://github.com/cozystack/examples) - follow-up: ### Release note ```release-note NONE ```
What this PR does
Manual backport of #4254 to
release-1.6.The automated backport, #4322, stopped with conflict markers in four files as its only commit, so it is red on DCO and unmergeable as it stands.
Every conflict has the same cause: the
kubevirt.disabledFeatureGateswork landed on main after 1.6 was cut, and the cherry-pick carried it into hunks this line does not have. Four differences follow:kubevirtblock holdingmigrationsalone, and the iaas bundle gains only the migrations hop;kubevirtblock, without the assertions that belong to disabledFeatureGates cases this line does not have;update_idempotency_test.shgainsrun_update_logged, a four-line helper that arrived on main with that work and the new cases need;Verified on this branch: 9 kubevirt chart tests, 31 platform wiring tests (102 across the platform suite), and
update_idempotency_testPASS under GNU make and sed. Removing the new awk guard from the Makefile turns that test red naming the migrations block, so the ported guard is doing work. On this line(.Values.kubevirt).migrationsis the only reader of.Values.kubevirt; rewriting it as.Values.kubevirt.migrationsturns the null-block case red with a nil pointer.Feature summary, unchanged from #4254: cluster-wide migration settings could only be applied by patching the KubeVirt CR, because the kubevirt chart did not render
migrationsand the platform bundle did not forward it.kubevirt.migrationsnow passes through the generated Package tospec.configuration.migrations. A hand patch of that Package is undone on the next platform render, so this hop is the only supported setter.Close #4322 in favour of this one, or tell me to take a different route and I will.
CI follow-up: the run on the maintainer copy #4402 stopped the Kafka PVC check after 4.5 seconds of its two-minute budget. Chainsaw 0.2.15 can hide an API read error behind the previous
resource matches expectationmessage; this path reproduces locally, but the original API error was not preserved in the run. The added test-only commit uses deletion watches for both PVCs, retaining their earlier Bound assertions and the same timeout. Verified with Chainsaw 0.2.15 and kubectl 1.33.13 against a loopback API: delayed/already-completed deletion and a watch reconnect pass; retained PVCs and forbidden reads fail. Chainsaw lint passes. A full E2E rerun on the new head still needs workflow approval.Screenshots
Not a UI change.
Downstream repositories
Walked the trigger map against the diff: platform values, the iaas bundle and the kubevirt chart. The v1.6 reference page of the platform values had no
kubevirtsection, so the row goes there as a follow-up that should land with this backport.Release note