spinnaker: Unable to retrieve tags for ECR docker registry

Issue Summary:

Unable to retrieve tags for ECR repository when using /master (1.24.x pre-release candidate).

  • Same pipeline works fine on 1.23.4 - appears to be a regression in 1.24.x.

Cloud Provider(s):

clouddriver-docker?

Environment:

Spinnaker on Kubernetes running master-latest-unvalidated

Feature Area:

Docker registry

Description:

When manually triggering a pipeline w/ an ECR image trigger, modal for tag selection is unable to find tags. Looking in clouddriver.log, I see this:

2020-12-10 19:03:59.616  WARN 1 --- [ecutionAction-8] c.n.s.c.d.r.a.v.c.DockerRegistryClient   : Registry https://111111111111.dkr.ecr.us-west-1.amazonaws.com returned status 400 for request '_catalog' without a WWW-Authenticate header
2020-12-10 19:03:59.620  WARN 1 --- [ecutionAction-8] c.n.s.c.d.r.a.v.c.DockerRegistryClient   : Error encountered during catalog of null

retrofit.RetrofitError: 400 Bad Request
	at retrofit.RetrofitError.httpError(RetrofitError.java:40) ~[retrofit-1.9.0.jar:na]
	at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:388) ~[retrofit-1.9.0.jar:na]
	at retrofit.RestAdapter$RestHandler.invoke(RestAdapter.java:240) ~[retrofit-1.9.0.jar:na]
	at com.sun.proxy.$Proxy172.getCatalog(Unknown Source) ~[na:na]
	at com.netflix.spinnaker.clouddriver.docker.registry.api.v2.client.DockerRegistryClient$DockerRegistryService$getCatalog$0.call(Unknown Source) ~[na:na]
...

Steps to Reproduce:

  1. upgrade to master-latest-unvalidated, run hal deploy apply
  2. try to manually trigger a pipeline with a docker trigger. will say “No tags found” image

Additional details

I’m working on reproducing this on a developer stack and with a dockerhub registry, will update as I have more info.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 2
  • Comments: 19 (3 by maintainers)

Most upvoted comments

I faced the same issue.

It looks like the “aws” command in clouddriver version 7.1.0 and 7.2.0 does not work, so we cannot access ECR docker registry.

# 7.0.2 ->  OK
❯ docker run -it us-docker.pkg.dev/spinnaker-community/docker/clouddriver:7.0.2-20201116113324 bash -c 'aws --version'
aws-cli/1.18.152 Python/2.7.18 Linux/4.19.121-linuxkit botocore/1.18.11

# 7.1.0 -> FAIL
❯ docker run -it us-docker.pkg.dev/spinnaker-community/docker/clouddriver:7.1.0-20201212030017 bash -c 'aws --version'
bash: /usr/bin/aws: /usr/bin/python3: bad interpreter: No such file or directory

# 7.2.0 -> FAIL
❯ docker run -it us-docker.pkg.dev/spinnaker-community/docker/clouddriver:7.2.0-20201221174548  bash -c 'aws --version'
bash: /usr/bin/aws: /usr/bin/python3: bad interpreter: No such file or directory