Bug 2084635 - PipelineRun creation from the GUI for a Pipeline with 2 workspaces hardcode the PVC storageclass
Summary: PipelineRun creation from the GUI for a Pipeline with 2 workspaces hardcode t...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Dev Console
Version: 4.9
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: 4.11.0
Assignee: Mohammed Saud
QA Contact: spathak@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 2092140
TreeView+ depends on / blocked
 
Reported: 2022-05-12 14:46 UTC by Pablo Rodriguez Guillamon
Modified: 2022-08-10 11:11 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Pipeline start form was always using a hardcoded value (gp2) as the default storageclass. Consequence: The gp2 storageclass was always used, even if it did not exist on the cluster. Fix: Use the default specified storageclass name instead of a hardcoded value. Result: Starting a pipeline with VolumeClaimTemplate uses the correct default storageclass.
Clone Of:
Environment:
Last Closed: 2022-08-10 11:11:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
PipelineYAML (437 bytes, text/plain)
2022-05-12 14:46 UTC, Pablo Rodriguez Guillamon
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 11603 0 None open Bug 2084635: Avoid using 'gp2' hardcoded storage class 2022-05-30 13:30:03 UTC
Red Hat Knowledge Base (Solution) 6958474 0 None None None 2022-05-17 11:04:23 UTC
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 11:11:42 UTC

Description Pablo Rodriguez Guillamon 2022-05-12 14:46:16 UTC
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 1 Pablo Rodriguez Guillamon 2022-05-12 14:48:43 UTC
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: []
>

Comment 2 Pablo Rodriguez Guillamon 2022-05-12 14:48:46 UTC
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: []
>

Comment 3 Pablo Rodriguez Guillamon 2022-05-12 14:49:31 UTC
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: []
>

Comment 5 Pablo Rodriguez Guillamon 2022-05-17 10:41:06 UTC
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: {}
~~~

Comment 8 Jaivardhan Kumar 2022-06-13 09:22:38 UTC
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

Comment 10 errata-xmlrpc 2022-08-10 11:11:30 UTC
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


Note You need to log in before you can comment on or make changes to this bug.