Skip to content

Conversation

@chao007
Copy link

@chao007 chao007 commented Jan 4, 2026

Test with gcp pd csi driver

passed: (12.2s) 2026-01-04T11:54:52 "[sig-storage][OCPFeature:CSIReadOnlyRootFilesystem] CSI Driver ReadOnly Root Filesystem should verify CSI node containers have readOnlyRootFilesystem set to true [Suite:openshift/conformance/parallel]"

passed: (12.7s) 2026-01-04T11:54:53 "[sig-storage][OCPFeature:CSIReadOnlyRootFilesystem] CSI Driver ReadOnly Root Filesystem should verify CSI controller containers have readOnlyRootFilesystem set to true [Suite:openshift/conformance/parallel]"

passed: (13.2s) 2026-01-04T11:54:53 "[sig-storage][OCPFeature:CSIReadOnlyRootFilesystem] CSI Driver ReadOnly Root Filesystem should verify CSI controller and node pods are running and ready [Suite:openshift/conformance/parallel]"

@openshift-ci-robot
Copy link

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: automatic mode

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 4, 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 Jan 4, 2026
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 4, 2026

@chao007: This pull request references STOR-2560 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the epic to target either version "4.22." or "openshift-4.22.", but it targets "openshift-4.21" instead.

Details

In response to this:

Test with gcp pd csi driver

passed: (12.2s) 2026-01-04T11:54:52 "[sig-storage][OCPFeature:CSIReadOnlyRootFilesystem] CSI Driver ReadOnly Root Filesystem should verify CSI node containers have readOnlyRootFilesystem set to true [Suite:openshift/conformance/parallel]"

passed: (12.7s) 2026-01-04T11:54:53 "[sig-storage][OCPFeature:CSIReadOnlyRootFilesystem] CSI Driver ReadOnly Root Filesystem should verify CSI controller containers have readOnlyRootFilesystem set to true [Suite:openshift/conformance/parallel]"

passed: (13.2s) 2026-01-04T11:54:53 "[sig-storage][OCPFeature:CSIReadOnlyRootFilesystem] CSI Driver ReadOnly Root Filesystem should verify CSI controller and node pods are running and ready [Suite:openshift/conformance/parallel]"

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.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 4, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: chao007
Once this PR has been reviewed and has the lgtm label, please assign dobsonj 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

@openshift-ci openshift-ci bot requested review from dobsonj and tsmetana January 4, 2026 12:34
@chao007
Copy link
Author

chao007 commented Jan 12, 2026

/test okd-scos-images

@chao007
Copy link
Author

chao007 commented Jan 12, 2026

/test e2e-vsphere-ovn

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 12, 2026

@chao007: 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-vsphere-ovn 101385b link true /test e2e-vsphere-ovn

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.

@openshift-trt
Copy link

openshift-trt bot commented Jan 12, 2026

Risk analysis has seen new tests most likely introduced by this PR.
Please ensure that new tests meet guidelines for naming and stability.

New Test Risks for sha: 101385b

Job Name New Test Risk
pull-ci-openshift-origin-main-e2e-vsphere-ovn Medium - "[sig-storage][OCPFeature:CSIReadOnlyRootFilesystem] CSI Driver ReadOnly Root Filesystem should verify CSI controller and node pods are running and ready [Suite:openshift/conformance/parallel]" is a new test, and was only seen in one job.
pull-ci-openshift-origin-main-e2e-vsphere-ovn Medium - "[sig-storage][OCPFeature:CSIReadOnlyRootFilesystem] CSI Driver ReadOnly Root Filesystem should verify CSI controller containers have readOnlyRootFilesystem set to true [Suite:openshift/conformance/parallel]" is a new test, and was only seen in one job.
pull-ci-openshift-origin-main-e2e-vsphere-ovn Medium - "[sig-storage][OCPFeature:CSIReadOnlyRootFilesystem] CSI Driver ReadOnly Root Filesystem should verify CSI node containers have readOnlyRootFilesystem set to true [Suite:openshift/conformance/parallel]" is a new test, and was only seen in one job.

New tests seen in this PR at sha: 101385b

  • "[sig-storage][OCPFeature:CSIReadOnlyRootFilesystem] CSI Driver ReadOnly Root Filesystem should verify CSI controller and node pods are running and ready [Suite:openshift/conformance/parallel]" [Total: 1, Pass: 1, Fail: 0, Flake: 0]
  • "[sig-storage][OCPFeature:CSIReadOnlyRootFilesystem] CSI Driver ReadOnly Root Filesystem should verify CSI controller containers have readOnlyRootFilesystem set to true [Suite:openshift/conformance/parallel]" [Total: 1, Pass: 1, Fail: 0, Flake: 0]
  • "[sig-storage][OCPFeature:CSIReadOnlyRootFilesystem] CSI Driver ReadOnly Root Filesystem should verify CSI node containers have readOnlyRootFilesystem set to true [Suite:openshift/conformance/parallel]" [Total: 1, Pass: 1, Fail: 0, Flake: 0]

@chao007 chao007 changed the title [wip]STOR-2560: Add testcase for readonlyrootfilesystem STOR-2560: Add testcase for readonlyrootfilesystem Jan 14, 2026
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 14, 2026
runReadOnlyRootFsChecks(oc, nodeWorkloads, currentPlatform, true)
})

g.It("should verify CSI controller and node pods are running and ready", func() {
Copy link
Contributor

Choose a reason for hiding this comment

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

If either CSI controller or node pods unheadlthy our CSO should be degrade and installation will be failed, so it seems we do not need check these.

Copy link
Contributor

Choose a reason for hiding this comment

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

Agree it is not mandatory.

})

// runReadOnlyRootFsChecks verifies that all containers in the workload have readOnlyRootFilesystem set
func runReadOnlyRootFsChecks(oc *exutil.CLI, workloads []csiWorkloadCheck, currentPlatform string, checkRunning bool) {
Copy link
Contributor

Choose a reason for hiding this comment

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

checkRunning parameter sounds like unused.


for _, workload := range workloads {
// Skip if platform doesn't match
if workload.Platform != "" && workload.Platform != currentPlatform && workload.Platform != "all" {
Copy link
Contributor

Choose a reason for hiding this comment

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

The condition looks weird ..., from my understanding should be ->

Suggested change
if workload.Platform != "" && workload.Platform != currentPlatform && workload.Platform != "all" {
if workload.Platform != currentPlatform || workload.Platform != "all" {

,right?

deployment, err := oc.AdminKubeClient().AppsV1().Deployments(workload.Namespace).Get(context.TODO(), workload.Name, metav1.GetOptions{})
if err != nil {
if errors.IsNotFound(err) {
results = append(results, fmt.Sprintf("[SKIP] %s not found", resourceName))
Copy link
Contributor

Choose a reason for hiding this comment

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

We'd better be careful to use not found skips, since we expect it should exist and we should also consider for hypershift tests.

Copy link
Contributor

Choose a reason for hiding this comment

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

There might be some exceptions like Manila(it depends on the backend) or 3rd operators, can we first check if specific CSI Driver is installed and only check the related resource when CSI Driver is installed?

case WorkloadTypeDaemonSet:
daemonset, err := oc.AdminKubeClient().AppsV1().DaemonSets(workload.Namespace).Get(context.TODO(), workload.Name, metav1.GetOptions{})
if err != nil {
if errors.IsNotFound(err) {
Copy link
Contributor

Choose a reason for hiding this comment

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

The same above.

Comment on lines +29 to +30
WorkloadTypeDeployment WorkloadType = "Deployment"
WorkloadTypeDaemonSet WorkloadType = "DaemonSet"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
WorkloadTypeDeployment WorkloadType = "Deployment"
WorkloadTypeDaemonSet WorkloadType = "DaemonSet"
Deployment WorkloadType = "Deployment"
DaemonSet WorkloadType = "DaemonSet"

maybe better, WorkloadTypeDeployment looks a bit clunky.

WorkloadTypeDaemonSet WorkloadType = "DaemonSet"
)

var _ = g.Describe("[sig-storage][OCPFeature:CSIReadOnlyRootFilesystem] CSI Driver ReadOnly Root Filesystem", func() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
var _ = g.Describe("[sig-storage][OCPFeature:CSIReadOnlyRootFilesystem] CSI Driver ReadOnly Root Filesystem", func() {
var _ = g.Describe("[sig-storage][OCPFeature:CSIReadOnlyRootFilesystem][Jira:"Storage"] CSI Driver ReadOnly Root Filesystem", func() {

We also need [Jira:"Storage"], xref -> openshift-eng/ai-helpers#186

// AWS EBS
{
WorkloadType: WorkloadTypeDeployment,
Namespace: CSINamespace,
Copy link
Contributor

Choose a reason for hiding this comment

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

We'd better use a var instead of const since we also need to cover these tests for hcp.

o.Expect(err).NotTo(o.HaveOccurred())
if isMicroShift {
g.Skip("CSI ReadOnlyRootFilesystem tests are not supported on MicroShift")
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
}
}
// Check to see if we have Storage enabled
isStorageEnabled, err := exutil.IsCapabilityEnabled(oc, configv1.ClusterVersionCapabilityStorage)
if err != nil || !isStorageEnabled {
g.Skip("skipping, this test is only expected to work with storage enabled clusters")
}

Better also check storage capability is enabled.

runReadOnlyRootFsChecks(oc, controllerWorkloads, currentPlatform, true)
})

g.It("should verify CSI node containers have readOnlyRootFilesystem set to true", func() {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can combine the controller and node as the runReadOnlyRootFsChecks() can handle both deployment and daemonset. Or do we have any specific reason for dividing them?

runReadOnlyRootFsChecks(oc, nodeWorkloads, currentPlatform, true)
})

g.It("should verify CSI controller and node pods are running and ready", func() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Agree it is not mandatory.


// csiWorkloadCheck defines a check for CSI controller or node workloads
type csiWorkloadCheck struct {
WorkloadType WorkloadType
Copy link
Contributor

Choose a reason for hiding this comment

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

Will it be better to use "resource" instead of "workload" item in your entire cases?

deployment, err := oc.AdminKubeClient().AppsV1().Deployments(workload.Namespace).Get(context.TODO(), workload.Name, metav1.GetOptions{})
if err != nil {
if errors.IsNotFound(err) {
results = append(results, fmt.Sprintf("[SKIP] %s not found", resourceName))
Copy link
Contributor

Choose a reason for hiding this comment

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

There might be some exceptions like Manila(it depends on the backend) or 3rd operators, can we first check if specific CSI Driver is installed and only check the related resource when CSI Driver is installed?

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

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants