Created attachment 1878965 [details] PipelineYAML Description of problem: The StorageClass assigned to the VolumeClaimTemplates on PipelineRuns created using the GUI pick GP2 storageclass starting from the second workspace. Version-Release number of selected component (if applicable): * OpenShift 4.9.25 * OpenShift Pipelines 1.7.0 How reproducible: Always Steps to Reproduce: 1. Apply the attached YAML to create a Pipeline ~~~ oc new-project bz-pipelinerun-issue oc apply -f pipeline.yaml -n ~~~ 2. Go to "Developer Console > Pipelines > new-pipeline" and click on "Actions" and select **Start** 3. Select "VolumeClaimTemplate" for all the 4 workspaces. 4. Start the Pipeline 5. After the PipelineRun fails, click on YAML to check its definition Actual results: Even if all the workspaces are showing the default SC as the one to create the claim in: The workspace1 gets assigned your default StorageClass Workspaces from 2 to 4 get assigned GP2 StorageClass even if that SC does not exist on the cluster. If you click on "Show VolumeClaimTemplate options" and select the expected StorageClass multiple times, it eventually picks the right one. Expected results: The Workspaces should be picking the StorageClass showing on the dropdown by default without human intervention. GP2 storageclass should not be hardcoded to Workspaces 2+ Additional info: It has been tested in vSphere with Thin storage and a different environment with Trident storage.
Comment on attachment 1878965 [details] PipelineYAML >apiVersion: tekton.dev/v1beta1 >kind: Pipeline >metadata: > name: new-pipeline > namespace: bz-pipelinerun-issue >spec: > params: [] > resources: [] > workspaces: > - name: workspace1 > optional: false > - name: workspace2 > optional: false > - name: workspace3 > optional: false > - name: workspace4 > optional: false > tasks: > - name: git-cli > taskRef: > kind: Task > name: git-cli > finally: [] >
I've reproduced this issue on 4.8 on a cluster that has GP2 as the default storageclass. I was expecting to get GP2 on all the 4 workspaces but I got GP2 for the first workspace and "Gi" for the rest of them: ~~~ workspaces: - name: workspace1 volumeClaimTemplate: metadata: creationTimestamp: null spec: accessModes: - ReadWriteOnce resources: requests: storage: 1Gi storageClassName: gp2 volumeMode: Filesystem status: {} - name: workspace2 volumeClaimTemplate: metadata: creationTimestamp: null spec: accessModes: - ReadWriteOnce resources: requests: storage: 1Gi storageClassName: Gi volumeMode: Filesystem status: {} - name: workspace3 volumeClaimTemplate: metadata: creationTimestamp: null spec: accessModes: - ReadWriteOnce resources: requests: storage: 1Gi storageClassName: Gi volumeMode: Filesystem status: {} - name: workspace4 volumeClaimTemplate: metadata: creationTimestamp: null spec: accessModes: - ReadWriteOnce resources: requests: storage: 1Gi storageClassName: Gi volumeMode: Filesystem status: {} ~~~
Verified on 4.11.0-0.nightly-2022-06-06-201913 works, storage class was picked based on default one present on Cluster and user can change it if needed
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Important: OpenShift Container Platform 4.11.0 bug fix and security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:5069