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

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

                Created:
                Updated:
                Resolved: