I’m following this guide and when I try to import cert-manager images in my private ACR from command line I receive this error:
(InvalidParameters) Operation
registries-561d08e9-81e5-11ed-baec-f834415bade1 failed. Resource
/subscriptions/88ea9307-f11d-433e-88c5-7a48cbbfe2f4/resourceGroups/r0b0x/providers/Microsoft.ContainerRegistry/registries/r0b0x1
Error copying blobs. Error copying blobs. Error copying blobs.
Error copying blobs. Error copying blobs.
Seems that no one has encountered this error before. Using an azure account you can regenerate the same conditions starting from scratch:
az group create --name sandbox --location eastus
az acr create --resource-group sandbox --name test
# Declare few env variables to use after
ACR=test
REGISTRY=quay.io
IMAGE=jetstack/cert-manager-controller
TAG=v1.8.0
az acr import --name $ACR --source $REGISTRY/$IMAGE:$TAG --image $IMAGE:$TAG
Do you have any suggestion?
Even if fails, the last command (import) generate something inside my private ACR. If I try to list stored repositories I can see the previously created:
az acr repository list --output table
But if I try to use the image for a deployment or I try to delete it, Azure returns always a resource not found error message. I’m getting crazy with this issue!
What I’m doing wrong?
3
Answers
ACR Import needs authentication implicitly, provide username and password values as mentioned below.
Enable Admin User at Access Key level
Login ACR[destination]
az acr login -n <container registry name> --expose-token
Note: Need to provide the username and password values implecitly to acr import command along with image tag. Grab them from step1 screen.
refer
I too am having this issue. I am following the same Azure MSLearn guide at https://learn.microsoft.com/en-us/azure/aks/ingress-tls?tabs=azure-cli
I worked through this guide in September, and this was not a problem. In fact I ran through it 2 times in September, and this
az acr import
step did not fail at all.Note that HELM is not at all involved in this step – this is purely an AZ CLI operation.
I am executing
az acr import
while logged-in to AZ CLI as the Subscription OWNER, so I have necessary roles to import and delete images.My experience is that after receiving the error message, I find some or all of the images are in the repository, but something is corrupt. The images cannot be deleted, and they cannot be pulled. Using Azure Portal to attempt to delete the imported repositories results in this dialog:
I am using the same version of AZ CLI as I used in September: 2.38
Here is the import script:
running az acr import with –debug we can see some information
I found this Q&A from MSLearn which attributes this to quay.io not supporting range blob operations which are used by
acr import
. It goes on to suggest manually downloading and then pushing into ACR.But I will repeat, this worked in September, using the same versions of clients. Seems like something broke recently? Anyway this seems to be the answer.
https://learn.microsoft.com/en-us/answers/questions/1136080/unable-to-import-image-to-container-registry.html
There was an answer for this posted in learn.microsoft.com, acknowledging this is a recently evolved issue – perhaps quay recently stopped supporting range operations – and suggesting to import the packages into your own docker registry and deploying from there. Prior to Summer/Fall of 2022,
az acr import
was able to import from quay.It’s not an issue with Helm or wth permissions; the issue is that
az acr import
is not compatible with quay’s Api which does not support range operations thataz acr import
uses.https://learn.microsoft.com/en-us/answers/questions/1136080/unable-to-import-image-to-container-registry