krustlet icon indicating copy to clipboard operation
krustlet copied to clipboard

Demos failing due to OCI authentication issues.

Open kflansburg opened this issue 6 years ago • 7 comments

When running greet, my Pod fails with this message:

OCI API error: authentication required, visit https://aka.ms/acr/authorization for more information. on https://webassembly.azurecr.io/v2/greet-wascc/manifests/v0.5

kflansburg avatar Jul 01 '20 14:07 kflansburg

If I revert to 03ede5c6812f9c4ef0a7bf087d7ee431404607b8 (one before the OCI Auth pull request) it works.

kflansburg avatar Jul 01 '20 14:07 kflansburg

cc @peterhuene

bacongobbler avatar Jul 02 '20 18:07 bacongobbler

I am seeing this on windows, but not all people appear to have this issue. We will keep investigating to see what is causing

thomastaylor312 avatar Jul 13 '20 16:07 thomastaylor312

I have also been able to reproduce this on WSL2 with krustlet-wascc on master. Logging in with az login on the host running krustlet does not appear to resolve this either, so it's not a matter of being logged into an account that has access to the webassembly registry or not.

Reverting back to 0.3.0 as @kflansburg pointed out works fine.

FWIW, pulling the module with wasm-to-oci without being logged in works as expected, too:

><> az logout
><> wasm-to-oci pull webassembly.azurecr.io/greet-wascc:v0.5
INFO[0001] Pulled: webassembly.azurecr.io/greet-wascc:v0.5
INFO[0001] Size: 2019029
INFO[0001] Digest: sha256:305aab7fe0f6ed67dbd816cc89dd3127dad617fd8ce7b03c5601a9d91ab5ae35

At this point I think we can call this as a regression we should try to address by the next release.

bacongobbler avatar Jul 20 '20 21:07 bacongobbler

assigning to myself to look into this regression further.

bacongobbler avatar Jul 23 '20 18:07 bacongobbler

Running into similar issue when running demo kubectl apply -f greet-wascc.yaml. kubectl describe pod greet failed when pulling

Events:
  Type     Reason     Age   From               Message
  ----     ------     ----  ----               -------
  Normal   Scheduled  15s   default-scheduler  Successfully assigned default/greet to minikube
  Normal   Pulling    15s   kubelet, minikube  Pulling image "webassembly.azurecr.io/greet-wascc:v0.5"
  Warning  Failed     4s    kubelet, minikube  Failed to pull image "webassembly.azurecr.io/greet-wascc:v0.5": rpc error: code = Unknown desc = unauthorized: authentication required, visit https://aka.ms/acr/authorization for more information.
  Warning  Failed     4s    kubelet, minikube  Error: ErrImagePull
  Normal   BackOff    3s    kubelet, minikube  Back-off pulling image "webassembly.azurecr.io/greet-wascc:v0.5"
  Warning  Failed     3s    kubelet, minikube  Error: ImagePullBackOff

While pulling with wasm-to-oci is okay

$ wasm-to-oci pull webassembly.azurecr.io/greet-wascc:v0.5
INFO[0015] Pulled: webassembly.azurecr.io/greet-wascc:v0.5
INFO[0015] Size: 2019029
INFO[0015] Digest: sha256:305aab7fe0f6ed67dbd816cc89dd3127dad617fd8ce7b03c5601a9d91ab5ae35

tianyi-ge avatar Aug 04 '20 09:08 tianyi-ge

@TimothyGe if you revert back to commit 03ede5c6812f9c4ef0a7bf087d7ee431404607b8 (or further back, like to krustlet 0.3.0), does that fix your issue?

bacongobbler avatar Aug 04 '20 15:08 bacongobbler