Skip to content
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

Kabanero Pipelinerun pod in Tekton Dashboard does not show log error of pv.yaml missing which is pre-requisite of Kabanero #560

Closed
aadeshpa opened this issue Sep 25, 2019 · 5 comments

Comments

@aadeshpa
Copy link
Contributor

aadeshpa commented Sep 25, 2019

Expected Behavior

Kabanero Pipelinerun requires pv.yaml to be applied before pipelinerun happens.
If end user has not applied this resource and if webhook triggers the pipelinerun , in Tekton dashboard user should see error message for missing pv.yaml resource in that cluster.

Hence expected behavior is to see some error message for pv.yaml missing.

Actual Behavior

In Tekton dashboard pipelinerun shows the build task pod keeps on loading infinetly without showing any logs, because the pod itself is not started correctly due to the missing pv.yaml.
pv-yaml-missing

Steps to Reproduce the Problem

  1. Do not apply pv.yaml file to the cluster
    2.Create a Webhook in the GitHub repository of the application
  2. Create a pull request in Github repository used in step 1
  3. Observe the logs of build task pod in Tekton Dashboard for the selected pipeline to be run.

Additional Info

#Possible Solution

  1. We found that in the cluster by running the below command we get the details of the pv.yaml is missing:-

kubectl describe pod build-task-pod-xxx

sample output:-

Events:
  Type     Reason            Age                 From               Message
  ----     ------            ----                ----               -------
  Warning  FailedScheduling  3m (x716 over 38m)  default-scheduler  pod has unbound PersistentVolumeClaims (repeated 2 times)
  1. Or we also found that if you describe the pipelinerun as per below command you get the status and error message

kubectl get pipelineruns/pipelinerun-name -o yaml

Sample output:

status:
  conditions:
  - lastTransitionTime: 2019-09-25T18:13:08Z
    message: Not all Tasks in the Pipeline have finished executing
    reason: Running
    status: Unknown
    type: Succeeded
  startTime: 2019-09-25T18:13:12Z
  taskRuns:
    kab-nodejs-express-wbh-2-1569435188-build-task-zxpn2:
      pipelineTaskName: build-task
      status:
        conditions:
        - lastTransitionTime: 2019-09-25T18:13:12Z
          message: 'pod status "PodScheduled":"False"; message: "pod has unbound PersistentVolumeClaims
            (repeated 2 times)"'
          reason: Pending
          status: Unknown
          type: Succeeded
        podName: kab-nodejs-express-wbh-2-1569435188-build-task-zxpn2-pod-100978
        startTime: 2019-09-25T18:13:12Z
@aadeshpa
Copy link
Contributor Author

aadeshpa commented Sep 25, 2019

Somehow the above Possible solutions mentioned should be utilized to surface the error message to the end user in the Tekton Dashboard instead of just infinite loading of the pod without any log message.

@aadeshpa
Copy link
Contributor Author

This issue was created as a result of the issue : kabanero-io/kabanero-pipelines#63
which was created under Kabanero-pipelines team by SVT team.

@mnuttall
Copy link
Contributor

The problem here isn't so much 'failure to apply pv.yaml' - Tekton provides no such file. The general failure is to configure https://kubernetes.io/docs/concepts/storage/dynamic-provisioning/ or in its absence, to create a set of PersistentVolumes adequate for Tekton's PersistentVolumeClaims to pick up. One suggestion in conversation with the team raising this was to

in Pipelines repo, create a Troubleshooting.md. On that page say : My pipeline failed with `Unable to fetch log", what is wrong? A: Check the following things in your config ... dynamic storage provider configured, suitable RoleBindings on the ServiceAccount in question, PodSecurityPolicies ... perhaps a link to https://kubernetes.io/docs/tasks/debug-application-cluster/troubleshooting/ or https://kubernetes.io/docs/tasks/debug-application-cluster/debug-pod-replication-controller/.

@mnuttall
Copy link
Contributor

@aadeshpa the need for persistent storage is covered in https://github.com/tektoncd/pipeline/blob/master/docs/install.md#configuring-tekton-pipelines. Does this meet your needs?

@aadeshpa
Copy link
Contributor Author

@mnuttall : as discussed with @kvijai82 @tseelbach we have created a Troubleshooting guide in pipelines repository to show how to find the possible error of pv.yaml persistent volume missing in the cluster.

Please find the pull request created for Troubleshooting guide in our pipelines repo kabanero-io/kabanero-pipelines#68

@kvijai82 @tseelbach : can you confirm if that would be enough.

barthy1 pushed a commit to barthy1/dashboard that referenced this issue Apr 14, 2021
This make sures
- image has fully qualified name eg. docker.io/abc/xyz:1.0
- image is tagged with a specific version and not latest
- if images has digest it validates it and prefer digest over tag
- It skips the image if there is a variables refered in image name

Closes: tektoncd#560

Signed-off-by: Shivam Mukhade <smukhade@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants