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

Unable to use cache-workspace #1107

Closed
ragnaros2046 opened this issue Nov 8, 2022 · 2 comments
Closed

Unable to use cache-workspace #1107

ragnaros2046 opened this issue Nov 8, 2022 · 2 comments

Comments

@ragnaros2046
Copy link

ragnaros2046 commented Nov 8, 2022

Expected Behavior

work as sample

Actual Behavior

I am trying to run sample from https://github.com/tektoncd/catalog/blob/main/pipeline/buildpacks/0.2/samples/cache-volume.yaml

When I add a persistentVolumeClaim(same claim as source-ws) for cache workspace.
It always stuck at 'pod status "Initialized":"False"; message: "containers with incomplete status: [prepare place-scripts]"' . When I leave cache-ws as emptyDir: {}. It works fine.

Beginning, It deploys three Pods, affinity-assistant-4dc6699468-0, affinity-assistant-a577dc71dd-0 and env-var-pipeliner1uns-fetch-from-git-pod. Then I got errors as below:

env-var-pipeliner1uns-fetch-from-git-pod.1725cd50beafb500
FailedAttachVolume
Multi-Attach error for volume "pvc-fb80016f-3f91-4592-938e-8fef951800d9" Volume is already used by pod(s) affinity-assistant-a577dc71dd-0

Unable to attach or mount volumes: unmounted volumes=[ws-bhn87], unattached volumes=[tekton-internal-home tekton-internal-workspace tekton-internal-bin kube-api-access-4rb6r tekton-internal-downward tekton-internal-steps tekton-internal-run-0 tekton-internal-scripts ws-bhn87 tekton-internal-results tekton-creds-init-home-0]: timed out waiting for the condition

Is this an expected Behaviour?

Tekton version: 0.40.2
buildpacks Task version: 0.5 https://hub.tekton.dev/tekton/task/buildpacks
git clone version: 0.9 https://hub.tekton.dev/tekton/task/git-clone
Pipeline: https://hub.tekton.dev/tekton/pipeline/buildpacks

Steps to Reproduce the Problem

Additional Info

@ragnaros2046
Copy link
Author

OK. Add Node Affinity for TaskRuns that share PVC workspace( tektoncd/pipeline#2630 ) shows that it is a normal and expected behavior without setting disable-affinity-assistant: "false" in config feature-flags.

Therefore, there are two options left:
1, set it to false,
2, edit sample's task and pipeline

I saw some project set it to false under their usage scenario. (epinio/epinio@ef6d457)
I chose 2 by delete cache workspace and hardcode the cache directory , cause 1 change tekton's strategy a lot.

Repository owner moved this from Todo to Done in Tekton Community Roadmap Nov 10, 2022
@ragnaros2046
Copy link
Author

https://github.com/tektoncd/pipeline/blob/release-v0.42.x/examples/v1beta1/pipelineruns/pipelinerun-using-different-subpaths-of-workspace.yaml is a better workable example. Just declare different subpath in Pipeline, Not in PipelineRun.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

1 participant