Uploaded image for project: 'OpenShift Pipelines'
  1. OpenShift Pipelines
  2. SRVKP-2645

Getting permission error while executing the 2 tasks using the same workspace in tekton pipeline

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Critical Critical
    • None
    • Pipelines 1.7.3
    • Tekton Catalog
    • None
    • 3
    • False
    • None
    • False
    • Show
      nov-16-tt-plr-pvc-1.yaml  
    • Pipelines Sprint 229, Pipelines Sprint 230, Pipelines Sprint 231
    • Important
    • Customer Facing
    • Red Hat OpenShift Container Platform

      Description of problem:

      **

      I am trying to run Tekton in OpenShift v4.10 cluster

      I have a pipeline that does these steps

      step 1 - uses tekton git-clone task to pull down my repo, saves repo into a workspace

      step 2 - run my task, which uses an image I created which runs ansible, runs 1st ansible playbook, uses ansible files and playbook from the workspace from step 1

      step 3 - runs same ansible task, but runs a 2nd ansible playbook, uses ansible files and playbook from the workspace from step 1

      I changed the ansible task to have a script to list the directory where the workspace is mounted.

      When I run the above pipeline in a pipelinerun where all the steps run one after the other, all runs ok, the two ansible steps show this

      rw-rr- 1 65532 65532 475 Nov 8 07:06 zos-verify.yaml
      rw-rr- 1 65532 65532 3419 Nov 8 07:06 ansible-dbbDemo.playbook
      rw-rr- 1 65532 65532 484 Nov 8 07:06 ansible-dbbDemo-parms-cicsIvp.yaml

      I then changed the pipelinerun so that steps 2 and 3 run at the same time

      When I run that, step 1 runs ok, one of the ansible steps runs ok and I get the above output, the other one fails with

      ls: /workspace/source/playbooks: Permission denied

      It seems that because one of the ansible tasks has got the workspace, the other ansible task that is running at the same time, cannot access the workspace

      Reproducibility (Always/Intermittent/Only Once):

      Build Details:

      Additional info (Such as Logs, Screenshots, etc):

       

        1. list-pipeilne.yaml
          1 kB
          Veeresh Aradhya
        2. list-pipeline-new.yaml
          1 kB
          Veeresh Aradhya
        3. list-pipelinerun.yaml
          0.8 kB
          Veeresh Aradhya
        4. list-pipelinerun-new.yaml
          1.0 kB
          Veeresh Aradhya
        5. list-task.yaml
          0.4 kB
          Veeresh Aradhya
        6. list-task-new.yaml
          0.4 kB
          Veeresh Aradhya
        7. nov-15-pod-ansible-failed.yaml
          13 kB
          Vimal Solanki
        8. nov-15-pod-ansible-ok.yaml
          12 kB
          Vimal Solanki
        9. nov-15-pod-fetch-ok.yaml
          25 kB
          Vimal Solanki
        10. nov-16-tt-plr-pvc-1.yaml
          0.9 kB
          Vimal Solanki
        11. pod-write-pipeline-ze5em6-example-task-pod.yaml
          19 kB
          Veeresh Aradhya
        12. pod-write-pipeline-ze5em6-example-task-teu-pod.yaml
          19 kB
          Veeresh Aradhya
        13. pod-write-pipeline-ze5em6-git-clone-pod.yaml
          35 kB
          Veeresh Aradhya
        14. Screencast from 2023-02-01 10-49-07.webm
          6.63 MB
          Veeresh Aradhya
        15. tt-ansible-pipeLine (1).yaml
          1 kB
          Vimal Solanki
        16. tt-ansible-pipeLineRun (1).yaml
          1 kB
          Vimal Solanki
        17. tt-runAnsible (1).yaml
          1.0 kB
          Vimal Solanki

              varadhya Veeresh Aradhya (Inactive)
              rhn-support-vsolanki Vimal Solanki
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: