-
Notifications
You must be signed in to change notification settings - Fork 4.8k
STOR-2560: Add testcase for readonlyrootfilesystem #30647
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
base: main
Are you sure you want to change the base?
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: automatic mode |
|
@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. DetailsIn response to this:
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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: chao007 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/test okd-scos-images |
|
/test e2e-vsphere-ovn |
|
Risk analysis has seen new tests most likely introduced by this PR. New Test Risks for sha: 101385b
New tests seen in this PR at sha: 101385b
|
| 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)) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same above.
| // AWS EBS | ||
| { | ||
| WorkloadType: WorkloadTypeDeployment, | ||
| Namespace: CSINamespace, |
There was a problem hiding this comment.
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") | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| } | |
| } | |
| // 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() { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No specific reason, just because there are two epics for controller and worker node.
| 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)) |
There was a problem hiding this comment.
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?
|
@chao007: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
Test with gcp pd csi driver