create ctr symlink after installation #1916
Open
+13
−13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change description
This is an attempt at fixing an error that occurs when the
urltask is called before a symbolic link to/usr/local/bin/ctris created. This task tries to execute/usr/bin/ctrbefore it is available in the path and it fails to build the image.The issue was identified in the job
periodic-cluster-api-provider-gcp-make-conformance-main-ci-artifacts(Prow job history), which is one of the recently reported jobs in the Kubernetes organization that have been failing for a long time.When building the image for
cluster-api-provider-gcpwithkubernetes_source_type == "http"andkubernetes_cni_source_type == "http", the job outputs the following error:"/bin/sh: 1: /usr/bin/ctr: not found"A full log can be found here.
The proposed fix places the creation of the symlink right after
containerdis installed. If this is not considered the correct approach, we can look for other alternatives to avoid calling tasks that invoke/usr/bin/ctrbefore it is available.cc @justinsb @damdo @cpanato
Related issues
Additional context
This originated from @justinsb's investigation kubernetes-sigs/cluster-api-provider-gcp#1529 (comment)