Skip to content

[release-ocm-2.16] ACM-35998: apply disk encryption defaults on cluster create and update#10514

Open
openshift-cherrypick-robot wants to merge 8 commits into
openshift:release-ocm-2.16from
openshift-cherrypick-robot:cherry-pick-10442-to-release-ocm-2.16
Open

[release-ocm-2.16] ACM-35998: apply disk encryption defaults on cluster create and update#10514
openshift-cherrypick-robot wants to merge 8 commits into
openshift:release-ocm-2.16from
openshift-cherrypick-robot:cherry-pick-10442-to-release-ocm-2.16

Conversation

@openshift-cherrypick-robot

Copy link
Copy Markdown

This is an automated cherry-pick of #10442

/assign andrej1991

In OCPBUGS-86731 the issue was likelly caused by DiskEncryptionEnabledOn was an empty string and the validation threated empty string as enabled.
A new test is also added to test the robustness.
Normalize nil or empty disk_encryption enable_on and mode to none and
tpmv2 when syncing from AgentClusterInstall and when persisting cluster
updates. Prevents writing an empty enable_on while mode stays tpmv2,
which could leave hosts stuck in Discovering during hardware validation.
…kencryption tests so CI ginkgo flags are accepted, and remove the unused ginkgo table import from hostutil tests.
Use RequestsConfiguration at the API boundary so tang mode or tang_servers
without enable_on cannot bypass the disk encryption feature gate on
unsupported platforms.
…mon solution would be used in the whole project.

a separate follow-up task will be added
Introduce HasMode for raw mode checks and IsSetWithTang as the Tang
counterpart to IsSetWithTpm, then replace scattered inline enable_on
and mode comparisons with the shared helpers in validators, manifest
generation, API validation, and tang connectivity checks.
This keeps runtime paths on IsSetWithTpm/IsSetWithTang, payload
validation on HasMode where enable_on may still be unset, and role
targeting on EnabledForRole everywhere.
@openshift-ci-robot

openshift-ci-robot commented Jun 24, 2026

Copy link
Copy Markdown

@openshift-cherrypick-robot: Ignoring requests to cherry-pick non-bug issues: ACM-34978

Details

In response to this:

This is an automated cherry-pick of #10442

/assign andrej1991

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 openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: e159007f-a093-4bbe-9eb2-fb04f3ab854e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@openshift-ci openshift-ci Bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jun 24, 2026
@openshift-ci openshift-ci Bot requested review from carbonin and oourfali June 24, 2026 16:16
@openshift-ci

openshift-ci Bot commented Jun 24, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: openshift-cherrypick-robot
Once this PR has been reviewed and has the lgtm label, please assign romfreiman for approval. For more information see the Code Review Process.

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

Details 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

@andrej1991

Copy link
Copy Markdown
Contributor

/hold

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 24, 2026
@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.19231% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 44.03%. Comparing base (9dd048d) to head (5b07b9d).

Files with missing lines Patch % Lines
internal/cluster/validations/validations.go 0.00% 2 Missing ⚠️
internal/hardware/validator.go 75.00% 1 Missing and 1 partial ⚠️
internal/common/disk_encryption.go 98.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@                 Coverage Diff                  @@
##           release-ocm-2.16   #10514      +/-   ##
====================================================
+ Coverage             44.01%   44.03%   +0.02%     
====================================================
  Files                   415      416       +1     
  Lines                 72094    72135      +41     
====================================================
+ Hits                  31730    31768      +38     
- Misses                37479    37480       +1     
- Partials               2885     2887       +2     
Files with missing lines Coverage Δ
internal/bminventory/inventory.go 71.99% <100.00%> (ø)
...oller/controllers/clusterdeployments_controller.go 73.10% <100.00%> (+0.17%) ⬆️
...l/host/hostcommands/tang_connectivity_check_cmd.go 81.70% <100.00%> (-0.44%) ⬇️
internal/host/hostutil/host_utils.go 52.04% <ø> (-2.07%) ⬇️
internal/host/validator.go 83.61% <100.00%> (-0.13%) ⬇️
internal/network/manifests_generator.go 76.47% <100.00%> (-0.23%) ⬇️
internal/common/disk_encryption.go 98.00% <98.00%> (ø)
internal/cluster/validations/validations.go 44.25% <0.00%> (ø)
internal/hardware/validator.go 79.16% <75.00%> (-0.49%) ⬇️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@andrej1991 andrej1991 changed the title [release-ocm-2.16] ACM-34978: apply disk encryption defaults on cluster create and update [release-ocm-2.16] ACM-35998: apply disk encryption defaults on cluster create and update Jun 25, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 25, 2026
@openshift-ci-robot

openshift-ci-robot commented Jun 25, 2026

Copy link
Copy Markdown

@openshift-cherrypick-robot: This pull request references ACM-35998 which is a valid jira issue.

Details

In response to this:

This is an automated cherry-pick of #10442

/assign andrej1991

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 openshift-eng/jira-lifecycle-plugin repository.

@andrej1991

Copy link
Copy Markdown
Contributor

/retest

@openshift-ci

openshift-ci Bot commented Jun 25, 2026

Copy link
Copy Markdown

@openshift-cherrypick-robot: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-ai-operator-disconnected-capi 5b07b9d link true /test e2e-ai-operator-disconnected-capi
ci/prow/e2e-ai-operator-ztp-capi 5b07b9d link true /test e2e-ai-operator-ztp-capi

Full PR test history. Your PR dashboard.

Details

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-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants