Skip to content

CMP-4444: Add rule kubevirt-vcpu-metrics-enabled (CIS OCP-Virt 6.2) - #14980

Merged
Vincent056 merged 1 commit into
ComplianceAsCode:masterfrom
taimurhafeez:CMP-4444-kubevirt-vcpu-metrics-enabled
Aug 12, 2026
Merged

CMP-4444: Add rule kubevirt-vcpu-metrics-enabled (CIS OCP-Virt 6.2)#14980
Vincent056 merged 1 commit into
ComplianceAsCode:masterfrom
taimurhafeez:CMP-4444-kubevirt-vcpu-metrics-enabled

Conversation

@taimurhafeez

Copy link
Copy Markdown
Contributor

Supersedes #14961

Tested on OCP 4.22

oc get csv -n openshift-cnv
NAME                                         DISPLAY                          VERSION               RELEASE   REPLACES                                   PHASE
kubevirt-hyperconverged-operator.v4.22.2     OpenShift Virtualization         4.22.2                          kubevirt-hyperconverged-operator.v4.22.0   Succeeded

Result when there is no schedstats=enable

oc get ccr -n openshift-compliance 
NAME                                                             STATUS   SEVERITY
cis-vm-ext-node-worker-kubevirt-nested-virtualization-disabled   PASS     medium
cis-vm-ext-node-worker-kubevirt-seccomp-profile-permissions      PASS     medium
cis-vm-ext-node-worker-kubevirt-vcpu-metrics-enabled             FAIL     medium

Result with schedstats=enable

oc get ccr -n openshift-compliance 
NAME                                                             STATUS   SEVERITY
cis-vm-ext-node-worker-kubevirt-nested-virtualization-disabled   PASS     medium
cis-vm-ext-node-worker-kubevirt-seccomp-profile-permissions      PASS     medium
cis-vm-ext-node-worker-kubevirt-vcpu-metrics-enabled             PASS     medium

OpenSCAP node rule using the coreos_kernel_option template to check
that schedstats=enable is present in the kernel command line
(/proc/cmdline) and boot loader entries. Enables vCPU metrics for
monitoring virtual CPU consumption on OpenShift Virtualization nodes.

Validated on a live cluster: schedstats=enable absent = FAIL,
schedstats=enable present (via MachineConfig) = PASS.
@openshift-ci openshift-ci Bot added the needs-ok-to-test Used by openshift-ci bot. label Aug 11, 2026
@openshift-ci

openshift-ci Bot commented Aug 11, 2026

Copy link
Copy Markdown

Hi @taimurhafeez. Thanks for your PR.

I'm waiting for a ComplianceAsCode member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@Vincent056

Copy link
Copy Markdown
Contributor

/lgtm

@Vincent056

Copy link
Copy Markdown
Contributor

/ok-to-test

@Vincent056 Vincent056 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Rule content is byte-identical to #14961, which I validated in depth (built datastream + oscap-chroot truth table, 5/5) - and the live before/after results here match.

/approve

@openshift-ci openshift-ci Bot added ok-to-test Used by openshift-ci bot. and removed needs-ok-to-test Used by openshift-ci bot. labels Aug 11, 2026
@openshift-ci

openshift-ci Bot commented Aug 11, 2026

Copy link
Copy Markdown

@taimurhafeez: The following test 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-aws-openshift-node-compliance d597fe7 link false /test e2e-aws-openshift-node-compliance

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.

@Mab879 Mab879 added this to the 0.1.82 milestone Aug 11, 2026
@Vincent056
Vincent056 merged commit 11db079 into ComplianceAsCode:master Aug 12, 2026
70 of 74 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Used by openshift-ci bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants