concourse / concourse/docker-image-resource
Misleading errors when ca_certs config is incorrect for an image_resource
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 162
- Forks
- 250
- PR merge metrics
- No merged PRs in 30d
Description
(moved from concourse/concourse#4576)
Bug Report
When I had an incorrect configuration for the ca_certs key in my image_resource, Concourse returned the following:
resource script '/opt/resource/check []' failed: exit status 1
stderr:
failed to fetch digest for image '<my-registry>/alpine:latest': 503 Service Unavailable
does the image exist?
This is a misleading error, which I unfortunately lost a fair bit of time to trying to figure out.
Steps to Reproduce
- Create a pipeline using an
image_resourcewith a configuration like the following:
image_resource:
type: docker-image
source:
repository: <something>
ca_certs:
- cert: <a certificate that does not match the registry>
domain: <registry domain>
- Set the pipeline
- Try to run the pipeline
Expected Results
I expect to receive an error that says something about failing SSL verification.
Actual Results
resource script '/opt/resource/check []' failed: exit status 1
stderr:
failed to fetch digest for image '<my-registry>/alpine:latest': 503 Service Unavailable
does the image exist?
Version Info
- Concourse version: 5.6.0
- Deployment type (BOSH/Docker/binary): Docker
- Infrastructure/IaaS: Infrastructure
- Did this used to work? Unknown
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the pipeline described with an image_resource containing a mismatched ca_certs certificate, then trace how the docker-image resource reports the registry failure. Done means the malformed certificate produces an SSL-verification error rather than the misleading 503 and “does the image exist?” message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100