Skip to content

OCPBUGS-53041: Fix multi-platform support for OVS rules #13201

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

Merged
merged 1 commit into from
Apr 2, 2025

Conversation

rhmdnd
Copy link
Collaborator

@rhmdnd rhmdnd commented Mar 18, 2025

No description provided.

@rhmdnd rhmdnd requested a review from Vincent056 March 18, 2025 22:05
@rhmdnd
Copy link
Collaborator Author

rhmdnd commented Mar 18, 2025

/test

Copy link

openshift-ci bot commented Mar 18, 2025

@rhmdnd: The /test command needs one or more targets.
The following commands are available to trigger required jobs:

/test 4.12-e2e-aws-ocp4-cis
/test 4.12-e2e-aws-ocp4-cis-node
/test 4.12-e2e-aws-ocp4-e8
/test 4.12-e2e-aws-ocp4-high
/test 4.12-e2e-aws-ocp4-high-node
/test 4.12-e2e-aws-ocp4-moderate
/test 4.12-e2e-aws-ocp4-moderate-node
/test 4.12-e2e-aws-ocp4-pci-dss
/test 4.12-e2e-aws-ocp4-pci-dss-4-0
/test 4.12-e2e-aws-ocp4-pci-dss-node
/test 4.12-e2e-aws-ocp4-pci-dss-node-4-0
/test 4.12-e2e-aws-ocp4-stig
/test 4.12-e2e-aws-ocp4-stig-node
/test 4.12-e2e-aws-rhcos4-e8
/test 4.12-e2e-aws-rhcos4-high
/test 4.12-e2e-aws-rhcos4-moderate
/test 4.12-e2e-aws-rhcos4-stig
/test 4.12-images
/test 4.13-e2e-aws-ocp4-bsi
/test 4.13-e2e-aws-ocp4-bsi-node
/test 4.13-e2e-aws-ocp4-cis
/test 4.13-e2e-aws-ocp4-cis-node
/test 4.13-e2e-aws-ocp4-e8
/test 4.13-e2e-aws-ocp4-high
/test 4.13-e2e-aws-ocp4-high-node
/test 4.13-e2e-aws-ocp4-moderate
/test 4.13-e2e-aws-ocp4-moderate-node
/test 4.13-e2e-aws-ocp4-pci-dss
/test 4.13-e2e-aws-ocp4-pci-dss-4-0
/test 4.13-e2e-aws-ocp4-pci-dss-node
/test 4.13-e2e-aws-ocp4-pci-dss-node-4-0
/test 4.13-e2e-aws-ocp4-stig
/test 4.13-e2e-aws-ocp4-stig-node
/test 4.13-e2e-aws-rhcos4-bsi
/test 4.13-e2e-aws-rhcos4-e8
/test 4.13-e2e-aws-rhcos4-high
/test 4.13-e2e-aws-rhcos4-moderate
/test 4.13-e2e-aws-rhcos4-stig
/test 4.13-images
/test 4.14-e2e-aws-ocp4-bsi
/test 4.14-e2e-aws-ocp4-bsi-node
/test 4.14-e2e-aws-ocp4-pci-dss-4-0
/test 4.14-e2e-aws-ocp4-pci-dss-node-4-0
/test 4.14-e2e-aws-rhcos4-bsi
/test 4.14-images
/test 4.15-e2e-aws-ocp4-bsi
/test 4.15-e2e-aws-ocp4-bsi-node
/test 4.15-e2e-aws-ocp4-cis
/test 4.15-e2e-aws-ocp4-cis-node
/test 4.15-e2e-aws-ocp4-e8
/test 4.15-e2e-aws-ocp4-high
/test 4.15-e2e-aws-ocp4-high-node
/test 4.15-e2e-aws-ocp4-moderate
/test 4.15-e2e-aws-ocp4-moderate-node
/test 4.15-e2e-aws-ocp4-pci-dss
/test 4.15-e2e-aws-ocp4-pci-dss-4-0
/test 4.15-e2e-aws-ocp4-pci-dss-node
/test 4.15-e2e-aws-ocp4-pci-dss-node-4-0
/test 4.15-e2e-aws-ocp4-stig
/test 4.15-e2e-aws-ocp4-stig-node
/test 4.15-e2e-aws-rhcos4-bsi
/test 4.15-e2e-aws-rhcos4-e8
/test 4.15-e2e-aws-rhcos4-high
/test 4.15-e2e-aws-rhcos4-moderate
/test 4.15-e2e-aws-rhcos4-stig
/test 4.15-e2e-rosa-ocp4-cis-node
/test 4.15-e2e-rosa-ocp4-pci-dss-node
/test 4.15-images
/test 4.16-e2e-aws-ocp4-bsi
/test 4.16-e2e-aws-ocp4-bsi-node
/test 4.16-e2e-aws-ocp4-cis
/test 4.16-e2e-aws-ocp4-cis-node
/test 4.16-e2e-aws-ocp4-e8
/test 4.16-e2e-aws-ocp4-high
/test 4.16-e2e-aws-ocp4-high-node
/test 4.16-e2e-aws-ocp4-moderate
/test 4.16-e2e-aws-ocp4-moderate-node
/test 4.16-e2e-aws-ocp4-pci-dss
/test 4.16-e2e-aws-ocp4-pci-dss-4-0
/test 4.16-e2e-aws-ocp4-pci-dss-node
/test 4.16-e2e-aws-ocp4-pci-dss-node-4-0
/test 4.16-e2e-aws-ocp4-stig
/test 4.16-e2e-aws-ocp4-stig-node
/test 4.16-e2e-aws-rhcos4-bsi
/test 4.16-e2e-aws-rhcos4-e8
/test 4.16-e2e-aws-rhcos4-high
/test 4.16-e2e-aws-rhcos4-moderate
/test 4.16-e2e-aws-rhcos4-stig
/test 4.16-images
/test 4.17-e2e-aws-ocp4-bsi
/test 4.17-e2e-aws-ocp4-bsi-node
/test 4.17-e2e-aws-ocp4-cis
/test 4.17-e2e-aws-ocp4-cis-node
/test 4.17-e2e-aws-ocp4-e8
/test 4.17-e2e-aws-ocp4-high
/test 4.17-e2e-aws-ocp4-high-node
/test 4.17-e2e-aws-ocp4-moderate
/test 4.17-e2e-aws-ocp4-moderate-node
/test 4.17-e2e-aws-ocp4-pci-dss
/test 4.17-e2e-aws-ocp4-pci-dss-4-0
/test 4.17-e2e-aws-ocp4-pci-dss-node
/test 4.17-e2e-aws-ocp4-pci-dss-node-4-0
/test 4.17-e2e-aws-ocp4-stig
/test 4.17-e2e-aws-ocp4-stig-node
/test 4.17-e2e-aws-rhcos4-bsi
/test 4.17-e2e-aws-rhcos4-e8
/test 4.17-e2e-aws-rhcos4-high
/test 4.17-e2e-aws-rhcos4-moderate
/test 4.17-e2e-aws-rhcos4-stig
/test 4.17-images
/test 4.18-e2e-aws-ocp4-bsi
/test 4.18-e2e-aws-ocp4-bsi-node
/test 4.18-e2e-aws-ocp4-cis
/test 4.18-e2e-aws-ocp4-cis-node
/test 4.18-e2e-aws-ocp4-e8
/test 4.18-e2e-aws-ocp4-high
/test 4.18-e2e-aws-ocp4-high-node
/test 4.18-e2e-aws-ocp4-moderate
/test 4.18-e2e-aws-ocp4-moderate-node
/test 4.18-e2e-aws-ocp4-pci-dss
/test 4.18-e2e-aws-ocp4-pci-dss-4-0
/test 4.18-e2e-aws-ocp4-pci-dss-node
/test 4.18-e2e-aws-ocp4-pci-dss-node-4-0
/test 4.18-e2e-aws-ocp4-stig
/test 4.18-e2e-aws-ocp4-stig-node
/test 4.18-e2e-aws-rhcos4-bsi
/test 4.18-e2e-aws-rhcos4-e8
/test 4.18-e2e-aws-rhcos4-high
/test 4.18-e2e-aws-rhcos4-moderate
/test 4.18-e2e-aws-rhcos4-stig
/test 4.18-images
/test e2e-aws-ocp4-bsi
/test e2e-aws-ocp4-bsi-node
/test e2e-aws-ocp4-cis
/test e2e-aws-ocp4-cis-arm
/test e2e-aws-ocp4-cis-node
/test e2e-aws-ocp4-cis-node-arm
/test e2e-aws-ocp4-e8
/test e2e-aws-ocp4-high
/test e2e-aws-ocp4-high-node
/test e2e-aws-ocp4-moderate
/test e2e-aws-ocp4-moderate-node
/test e2e-aws-ocp4-pci-dss
/test e2e-aws-ocp4-pci-dss-4-0
/test e2e-aws-ocp4-pci-dss-node
/test e2e-aws-ocp4-pci-dss-node-4-0
/test e2e-aws-ocp4-stig
/test e2e-aws-ocp4-stig-node
/test e2e-aws-rhcos4-bsi
/test e2e-aws-rhcos4-e8
/test e2e-aws-rhcos4-high
/test e2e-aws-rhcos4-moderate
/test e2e-aws-rhcos4-stig
/test images

Use /test all to run the following jobs that were automatically triggered:

pull-ci-ComplianceAsCode-content-master-4.12-images
pull-ci-ComplianceAsCode-content-master-4.13-images
pull-ci-ComplianceAsCode-content-master-4.14-images
pull-ci-ComplianceAsCode-content-master-4.15-images
pull-ci-ComplianceAsCode-content-master-4.16-images
pull-ci-ComplianceAsCode-content-master-4.17-images
pull-ci-ComplianceAsCode-content-master-4.18-images
pull-ci-ComplianceAsCode-content-master-images

In response to this:

/test

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.

@rhmdnd
Copy link
Collaborator Author

rhmdnd commented Mar 18, 2025

/test e2e-aws-ocp4-cis-node
/test e2e-aws-ocp4-cis-node-arm

@rhmdnd
Copy link
Collaborator Author

rhmdnd commented Mar 19, 2025

Both of the following rules pass on arm64 but that shouldn't be happening:

helpers.go:872: Result - Name: e2e-cis-node-master-file-groupowner-ovs-conf-db - Status: PASS - Severity: medium
helpers.go:1060: Rule e2e-cis-node-master-file-groupowner-ovs-conf-db matched expected result
helpers.go:872: Result - Name: e2e-cis-node-master-file-groupowner-ovs-conf-db-lock - Status: PASS - Severity: medium
helpers.go:1060: Rule e2e-cis-node-master-file-groupowner-ovs-conf-db-lock matched expected result 

Specifically the file-groupowner-ovs-conf-db rule since it doesn't have a condition for aarch64_arch.

https://github.com/ComplianceAsCode/content/blob/master/applications/openshift/master/file_groupowner_ovs_conf_db/oval/shared.xml#L6-L7

@jan-cerny jan-cerny added the OpenShift OpenShift product related. label Mar 25, 2025
@rhmdnd rhmdnd force-pushed the OCPBUGS-53041 branch 3 times, most recently from c504136 to b69553d Compare March 25, 2025 18:37
@rhmdnd
Copy link
Collaborator Author

rhmdnd commented Mar 25, 2025

/test e2e-aws-ocp4-cis-node
/test e2e-aws-ocp4-cis-node-arm

@@ -0,0 +1,37 @@
documentation_complete: true

platform: ocp4-node and aarch64_arch
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Grab the html report from the ARF results and see why this failed.

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
platform: ocp4-node and aarch64_arch
platforms:
- ocp4-node
- aarch64_arch

There is an issue with the filter_rules where when the platforms is defined within a single line the comparison will fail thinking that ocp4-node is not part of the platforms, like this:

>>> platforms = {'ocp4-node and aarch64_arch'}
>>> "ocp4-node" in platforms
False

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

😮‍💨 thanks for the help, that worked!

Copy link
Collaborator Author

@rhmdnd rhmdnd Mar 28, 2025

Choose a reason for hiding this comment

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

One thing I noticed with this is that it works for running the rule on aarch64. But, if I apply the same technique to other rules intended for x86 or s390x, they will still get selected and run in the profile:

$ oc get ccr | grep ovs-conf-db-
upstream-ocp4-cis-node-master-file-groupowner-ovs-conf-db-aarch64                      PASS     medium
upstream-ocp4-cis-node-master-file-groupowner-ovs-conf-db-s390x                        PASS     medium
upstream-ocp4-cis-node-master-file-groupowner-ovs-conf-db-x86-64                       FAIL     medium
upstream-ocp4-cis-node-worker-file-groupowner-ovs-conf-db-aarch64                      PASS     medium
upstream-ocp4-cis-node-worker-file-groupowner-ovs-conf-db-s390x                        PASS     medium
upstream-ocp4-cis-node-worker-file-groupowner-ovs-conf-db-x86-64                       FAIL     medium

It appears the x86 and s390x rules are not filtered out at run time, which is interesting because I think we do something similar with ocp4-node-on-sdn and ocp4-node-on-ovs for example.

Copy link
Collaborator Author

@rhmdnd rhmdnd Mar 28, 2025

Choose a reason for hiding this comment

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

@@ -143,7 +143,7 @@ def build_container_image():
REPO_PATH, '/Dockerfiles/compliance_operator_content.Dockerfile')
command = [
'podman', 'build', '-f', dockerfile_path, '-t',
'localcontentbuild:latest', '.']
'localcontentbuild:latest', '--platform', 'linux/arm64', '.']
Copy link
Collaborator Author

@rhmdnd rhmdnd Mar 28, 2025

Choose a reason for hiding this comment

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

Should pull this out into its own change.

@Vincent056
Copy link
Contributor

unique-cces is failing

@rhmdnd
Copy link
Collaborator Author

rhmdnd commented Mar 28, 2025

/test e2e-aws-ocp4-cis-node
/test e2e-aws-ocp4-cis-node-arm

@rhmdnd rhmdnd added this to the 0.1.77 milestone Mar 31, 2025
@rhmdnd
Copy link
Collaborator Author

rhmdnd commented Mar 31, 2025

Latest testing shows the current PR is pulling in rules it shouldn't be on aarch64:

helpers.go:879: E2E-Error: e2e-cis-node-worker-file-groupowner-ovs-conf-db-s390x: Rule assertion missing
helpers.go:872: Result - Name: e2e-cis-node-worker-file-groupowner-ovs-conf-db-x86-64 - Status: FAIL - Severity: medium
helpers.go:879: E2E-Error: e2e-cis-node-worker-file-groupowner-ovs-conf-db-x86-64: Rule assertion missing
helpers.go:872: Result - Name: e2e-cis-node-worker-file-groupowner-ovs-pid - Status: PASS - Severity: medium 

@rhmdnd
Copy link
Collaborator Author

rhmdnd commented Mar 31, 2025

/test e2e-aws-ocp4-cis-node
/test e2e-aws-ocp4-cis-node-arm

1 similar comment
@rhmdnd
Copy link
Collaborator Author

rhmdnd commented Mar 31, 2025

/test e2e-aws-ocp4-cis-node
/test e2e-aws-ocp4-cis-node-arm

@Vincent056
Copy link
Contributor

Vincent056 commented Apr 1, 2025

ci/prow/e2e-aws-ocp4-cis-node

    helpers.go:907: Missing rule assertion entries:
        e2e-cis-node-master-file-groupowner-ovs-conf-db-x86-64:
          default_result: PASS
        e2e-cis-node-worker-file-groupowner-ovs-conf-db-x86-64:
          default_result: PASS
    helpers.go:932: Scan e2e-cis-node-mas

ci/prow/e2e-aws-ocp4-cis-node-arm

    helpers.go:907: Missing rule assertion entries:
        e2e-cis-node-master-file-groupowner-ovs-conf-db-x86-64:
          default_result: NOT-APPLICABLE
        e2e-cis-node-worker-file-groupowner-ovs-conf-db-x86-64:
          default_result: NOT-APPLICABLE

it looks like the test is working as expected

@rhmdnd
Copy link
Collaborator Author

rhmdnd commented Apr 1, 2025

/test e2e-aws-ocp4-cis-node
/test e2e-aws-ocp4-cis-node-arm

@@ -1092,14 +1092,14 @@ controls:
- id: AC-6(8)
status: supported
notes: |-
Red Hat OpenShift provides security context constraints (SCC) [1] that control permissions for actions that a pod can perform and what resources a pod can access.
Red Hat OpenShift provides security context constraints (SCC) [1] that control permissions for actions that a pod can perform and what resources a pod can access.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixing all these random whitespace issues in #13261

@rhmdnd
Copy link
Collaborator Author

rhmdnd commented Apr 1, 2025

/test

Copy link

openshift-ci bot commented Apr 1, 2025

@rhmdnd: The /test command needs one or more targets.
The following commands are available to trigger required jobs:

/test 4.12-e2e-aws-ocp4-cis
/test 4.12-e2e-aws-ocp4-cis-node
/test 4.12-e2e-aws-ocp4-e8
/test 4.12-e2e-aws-ocp4-high
/test 4.12-e2e-aws-ocp4-high-node
/test 4.12-e2e-aws-ocp4-moderate
/test 4.12-e2e-aws-ocp4-moderate-node
/test 4.12-e2e-aws-ocp4-pci-dss
/test 4.12-e2e-aws-ocp4-pci-dss-4-0
/test 4.12-e2e-aws-ocp4-pci-dss-node
/test 4.12-e2e-aws-ocp4-pci-dss-node-4-0
/test 4.12-e2e-aws-ocp4-stig
/test 4.12-e2e-aws-ocp4-stig-node
/test 4.12-e2e-aws-rhcos4-e8
/test 4.12-e2e-aws-rhcos4-high
/test 4.12-e2e-aws-rhcos4-moderate
/test 4.12-e2e-aws-rhcos4-stig
/test 4.12-images
/test 4.13-e2e-aws-ocp4-bsi
/test 4.13-e2e-aws-ocp4-bsi-node
/test 4.13-e2e-aws-ocp4-cis
/test 4.13-e2e-aws-ocp4-cis-node
/test 4.13-e2e-aws-ocp4-e8
/test 4.13-e2e-aws-ocp4-high
/test 4.13-e2e-aws-ocp4-high-node
/test 4.13-e2e-aws-ocp4-moderate
/test 4.13-e2e-aws-ocp4-moderate-node
/test 4.13-e2e-aws-ocp4-pci-dss
/test 4.13-e2e-aws-ocp4-pci-dss-4-0
/test 4.13-e2e-aws-ocp4-pci-dss-node
/test 4.13-e2e-aws-ocp4-pci-dss-node-4-0
/test 4.13-e2e-aws-ocp4-stig
/test 4.13-e2e-aws-ocp4-stig-node
/test 4.13-e2e-aws-rhcos4-bsi
/test 4.13-e2e-aws-rhcos4-e8
/test 4.13-e2e-aws-rhcos4-high
/test 4.13-e2e-aws-rhcos4-moderate
/test 4.13-e2e-aws-rhcos4-stig
/test 4.13-images
/test 4.14-e2e-aws-ocp4-bsi
/test 4.14-e2e-aws-ocp4-bsi-node
/test 4.14-e2e-aws-ocp4-pci-dss-4-0
/test 4.14-e2e-aws-ocp4-pci-dss-node-4-0
/test 4.14-e2e-aws-rhcos4-bsi
/test 4.14-images
/test 4.15-e2e-aws-ocp4-bsi
/test 4.15-e2e-aws-ocp4-bsi-node
/test 4.15-e2e-aws-ocp4-cis
/test 4.15-e2e-aws-ocp4-cis-node
/test 4.15-e2e-aws-ocp4-e8
/test 4.15-e2e-aws-ocp4-high
/test 4.15-e2e-aws-ocp4-high-node
/test 4.15-e2e-aws-ocp4-moderate
/test 4.15-e2e-aws-ocp4-moderate-node
/test 4.15-e2e-aws-ocp4-pci-dss
/test 4.15-e2e-aws-ocp4-pci-dss-4-0
/test 4.15-e2e-aws-ocp4-pci-dss-node
/test 4.15-e2e-aws-ocp4-pci-dss-node-4-0
/test 4.15-e2e-aws-ocp4-stig
/test 4.15-e2e-aws-ocp4-stig-node
/test 4.15-e2e-aws-rhcos4-bsi
/test 4.15-e2e-aws-rhcos4-e8
/test 4.15-e2e-aws-rhcos4-high
/test 4.15-e2e-aws-rhcos4-moderate
/test 4.15-e2e-aws-rhcos4-stig
/test 4.15-e2e-rosa-ocp4-cis-node
/test 4.15-e2e-rosa-ocp4-pci-dss-node
/test 4.15-images
/test 4.16-e2e-aws-ocp4-bsi
/test 4.16-e2e-aws-ocp4-bsi-node
/test 4.16-e2e-aws-ocp4-cis
/test 4.16-e2e-aws-ocp4-cis-node
/test 4.16-e2e-aws-ocp4-e8
/test 4.16-e2e-aws-ocp4-high
/test 4.16-e2e-aws-ocp4-high-node
/test 4.16-e2e-aws-ocp4-moderate
/test 4.16-e2e-aws-ocp4-moderate-node
/test 4.16-e2e-aws-ocp4-pci-dss
/test 4.16-e2e-aws-ocp4-pci-dss-4-0
/test 4.16-e2e-aws-ocp4-pci-dss-node
/test 4.16-e2e-aws-ocp4-pci-dss-node-4-0
/test 4.16-e2e-aws-ocp4-stig
/test 4.16-e2e-aws-ocp4-stig-node
/test 4.16-e2e-aws-rhcos4-bsi
/test 4.16-e2e-aws-rhcos4-e8
/test 4.16-e2e-aws-rhcos4-high
/test 4.16-e2e-aws-rhcos4-moderate
/test 4.16-e2e-aws-rhcos4-stig
/test 4.16-images
/test 4.17-e2e-aws-ocp4-bsi
/test 4.17-e2e-aws-ocp4-bsi-node
/test 4.17-e2e-aws-ocp4-cis
/test 4.17-e2e-aws-ocp4-cis-node
/test 4.17-e2e-aws-ocp4-e8
/test 4.17-e2e-aws-ocp4-high
/test 4.17-e2e-aws-ocp4-high-node
/test 4.17-e2e-aws-ocp4-moderate
/test 4.17-e2e-aws-ocp4-moderate-node
/test 4.17-e2e-aws-ocp4-pci-dss
/test 4.17-e2e-aws-ocp4-pci-dss-4-0
/test 4.17-e2e-aws-ocp4-pci-dss-node
/test 4.17-e2e-aws-ocp4-pci-dss-node-4-0
/test 4.17-e2e-aws-ocp4-stig
/test 4.17-e2e-aws-ocp4-stig-node
/test 4.17-e2e-aws-rhcos4-bsi
/test 4.17-e2e-aws-rhcos4-e8
/test 4.17-e2e-aws-rhcos4-high
/test 4.17-e2e-aws-rhcos4-moderate
/test 4.17-e2e-aws-rhcos4-stig
/test 4.17-images
/test 4.18-e2e-aws-ocp4-bsi
/test 4.18-e2e-aws-ocp4-bsi-node
/test 4.18-e2e-aws-ocp4-cis
/test 4.18-e2e-aws-ocp4-cis-node
/test 4.18-e2e-aws-ocp4-e8
/test 4.18-e2e-aws-ocp4-high
/test 4.18-e2e-aws-ocp4-high-node
/test 4.18-e2e-aws-ocp4-moderate
/test 4.18-e2e-aws-ocp4-moderate-node
/test 4.18-e2e-aws-ocp4-pci-dss
/test 4.18-e2e-aws-ocp4-pci-dss-4-0
/test 4.18-e2e-aws-ocp4-pci-dss-node
/test 4.18-e2e-aws-ocp4-pci-dss-node-4-0
/test 4.18-e2e-aws-ocp4-stig
/test 4.18-e2e-aws-ocp4-stig-node
/test 4.18-e2e-aws-rhcos4-bsi
/test 4.18-e2e-aws-rhcos4-e8
/test 4.18-e2e-aws-rhcos4-high
/test 4.18-e2e-aws-rhcos4-moderate
/test 4.18-e2e-aws-rhcos4-stig
/test 4.18-images
/test e2e-aws-ocp4-bsi
/test e2e-aws-ocp4-bsi-node
/test e2e-aws-ocp4-cis
/test e2e-aws-ocp4-cis-arm
/test e2e-aws-ocp4-cis-node
/test e2e-aws-ocp4-cis-node-arm
/test e2e-aws-ocp4-e8
/test e2e-aws-ocp4-high
/test e2e-aws-ocp4-high-node
/test e2e-aws-ocp4-moderate
/test e2e-aws-ocp4-moderate-arm
/test e2e-aws-ocp4-moderate-node
/test e2e-aws-ocp4-moderate-node-arm
/test e2e-aws-ocp4-pci-dss
/test e2e-aws-ocp4-pci-dss-4-0
/test e2e-aws-ocp4-pci-dss-node
/test e2e-aws-ocp4-pci-dss-node-4-0
/test e2e-aws-ocp4-stig
/test e2e-aws-ocp4-stig-node
/test e2e-aws-rhcos4-bsi
/test e2e-aws-rhcos4-e8
/test e2e-aws-rhcos4-high
/test e2e-aws-rhcos4-moderate
/test e2e-aws-rhcos4-moderate-arm
/test e2e-aws-rhcos4-stig
/test images

Use /test all to run the following jobs that were automatically triggered:

pull-ci-ComplianceAsCode-content-master-4.12-images
pull-ci-ComplianceAsCode-content-master-4.13-images
pull-ci-ComplianceAsCode-content-master-4.14-images
pull-ci-ComplianceAsCode-content-master-4.15-images
pull-ci-ComplianceAsCode-content-master-4.16-images
pull-ci-ComplianceAsCode-content-master-4.17-images
pull-ci-ComplianceAsCode-content-master-4.18-images
pull-ci-ComplianceAsCode-content-master-images

In response to this:

/test

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.

@rhmdnd
Copy link
Collaborator Author

rhmdnd commented Apr 1, 2025

/test e2e-aws-ocp4-moderate-node-arm

@rhmdnd rhmdnd changed the title OCPBUGS-53041: Use platforms instead of platform for ovs rules OCPBUGS-53041: Fix multi-platform support for OVS rules Apr 1, 2025
@rhmdnd
Copy link
Collaborator Author

rhmdnd commented Apr 1, 2025

/test e2e-aws-ocp4-cis-node
/test e2e-aws-ocp4-cis-node-arm
/test e2e-aws-ocp4-moderate-node
/test e2e-aws-ocp4-moderate-node-arm
/test 4.15-e2e-aws-ocp4-pci-dss-node

The approach we're using with OVAL to select rules based on conditions
doesn't work for multi-arch checks. Instead, the rule always passes
even when it's checking a platform that has `openvswitch` for the group
owner instead of `hugetlbfs`.

This commit attempts to simplify the rule by removing the complexity of
OVAL and relying on individual rules, one for checking group ownership
for openvswitch and the other for hugetlbfs. It also uses the platform
consistently, instead of using platforms, which expects a list of
conditions. Using platform is more straightforward, and incorporates the
architecture CPE into the evaluation at runtime.
Copy link

codeclimate bot commented Apr 1, 2025

Code Climate has analyzed commit 8e54261 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 61.9% (0.0% change).

View more on Code Climate.

@rhmdnd
Copy link
Collaborator Author

rhmdnd commented Apr 1, 2025

/test e2e-aws-ocp4-cis-node
/test e2e-aws-ocp4-cis-node-arm
/test e2e-aws-ocp4-moderate-node
/test e2e-aws-ocp4-moderate-node-arm
/test 4.15-e2e-aws-ocp4-pci-dss-node

@rhmdnd
Copy link
Collaborator Author

rhmdnd commented Apr 2, 2025

Rerunning testing farm because of the following timeouts:

2025-04-01 21:17:49 test.py:52: lib.waive.collect_waivers:150: using /var/ARTIFACTS/work-anssi_bp28_highd2k_qsbf/hardening/host-os/oscap/anssi_bp28_high/discover/default-0/tests/conf/waivers for waiving
2025-04-01 21:17:49 test.py:52: lib.results.report_plain:186: ERROR / (timed out: test exceeded duration time)
Connection to 18.219.58.56 closed.

Which seems unrelated to this change. @Mab879 are you seeing this crop up in other patches?

@xiaojiey
Copy link
Collaborator

xiaojiey commented Apr 2, 2025

Verified on a x86 clsuter + 4.19.0-0.nightly-2025-03-31-174812 + content from #13201:

% oc debug node/ip-10-0-27-125.us-east-2.compute.internal  -- chroot /host ls -lL /etc/openvswitch/system-id.conf
Starting pod/ip-10-0-27-125us-east-2computeinternal-debug-jwc96 ...
To use host binaries, run `chroot /host`
-rw-r--r--. 1 openvswitch hugetlbfs 37 Apr  2 01:31 /etc/openvswitch/system-id.conf

Removing debug pod ...
% oc get ccr | grep -i file-groupowner-ovs-sys-id-conf            
upstream-ocp4-cis-node-master-file-groupowner-ovs-sys-id-conf-hugetlbfs                PASS     medium
upstream-ocp4-cis-node-worker-file-groupowner-ovs-sys-id-conf-hugetlbfs                PASS     medium
##The test result align with the test result in e2e-aws-ocp4-cis-node job:
    helpers.go:872: Result - Name: e2e-cis-node-master-file-groupowner-ovs-sys-id-conf-hugetlbfs - Status: PASS - Severity: medium
    helpers.go:1060: Rule e2e-cis-node-master-file-groupowner-ovs-sys-id-conf-hugetlbfs matched expected result
    helpers.go:872: Result - Name: e2e-cis-node-master-file-groupowner-ovs-sys-id-conf-openvswitch - Status: NOT-APPLICABLE - Severity: medium
    helpers.go:1060: Rule e2e-cis-node-master-file-groupowner-ovs-sys-id-conf-openvswitch matched expected result
    helpers.go:872: Result - Name: e2e-cis-node-master-file-groupowner-ovs-sys-id-conf-hugetlbfs - Status: PASS - Severity: medium
    helpers.go:1060: Rule e2e-cis-node-master-file-groupowner-ovs-sys-id-conf-hugetlbfs matched expected result
    helpers.go:872: Result - Name: e2e-cis-node-master-file-groupowner-ovs-sys-id-conf-openvswitch - Status: NOT-APPLICABLE - Severity: medium
    helpers.go:1060: Rule e2e-cis-node-master-file-groupowner-ovs-sys-id-conf-openvswitch matched expected result

For ARM, checked below test result form e2e-aws-ocp4-cis-node-arm job, which is expected:

    helpers.go:872: Result - Name: e2e-cis-node-master-file-groupowner-ovs-sys-id-conf-hugetlbfs - Status: NOT-APPLICABLE - Severity: medium
    helpers.go:1060: Rule e2e-cis-node-master-file-groupowner-ovs-sys-id-conf-hugetlbfs matched expected result
    helpers.go:872: Result - Name: e2e-cis-node-master-file-groupowner-ovs-sys-id-conf-openvswitch - Status: PASS - Severity: medium
    helpers.go:1060: Rule e2e-cis-node-master-file-groupowner-ovs-sys-id-conf-openvswitch matched expected result
    helpers.go:872: Result - Name: e2e-cis-node-worker-file-groupowner-ovs-sys-id-conf-hugetlbfs - Status: NOT-APPLICABLE - Severity: medium
    helpers.go:1060: Rule e2e-cis-node-worker-file-groupowner-ovs-sys-id-conf-hugetlbfs matched expected result
    helpers.go:872: Result - Name: e2e-cis-node-worker-file-groupowner-ovs-sys-id-conf-openvswitch - Status: PASS - Severity: medium
    helpers.go:1060: Rule e2e-cis-node-worker-file-groupowner-ovs-sys-id-conf-openvswitch matched expected result

@Vincent056
Copy link
Contributor

/lgtm

@rhmdnd rhmdnd merged commit 7cc7437 into ComplianceAsCode:master Apr 2, 2025
108 of 115 checks passed
rhmdnd added a commit to rhmdnd/content that referenced this pull request Apr 3, 2025
There were added initially in
ComplianceAsCode#13201 but were added
for the platform profiles in addition to the node profiles.
rhmdnd added a commit to rhmdnd/content that referenced this pull request Apr 3, 2025
There were added initially in
ComplianceAsCode#13201 but were added
for the platform profiles in addition to the node profiles.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OpenShift OpenShift product related.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants