kairos icon indicating copy to clipboard operation
kairos copied to clipboard

:bug: Improve error message when upgrading with a wrong image

Open mauromorales opened this issue 5 months ago • 1 comments

If I do an upgrade with the wrong image source, I see a map error on the logs. Ideally, the check to access the resource could even happen before starting the process, to avoid running a hook in a pre-stage if the image will anyhow not be present

kairos-agent upgrade --source oci:quay.io/kairos/ubuntu:22.04-core-amd64-generic-v2.5.0 --recovery
....
INFO[2024-01-17T18:36:57Z] Copying quay.io/kairos/22.04-core-amd64-generic-v2.5.0:latest source to /run/cos/transition 
ERRO[2024-01-17T18:36:58Z] Failed deploying image to file '/run/cos/recovery/cOS/transition.img': GET https://quay.io/v2/kairos/22.04-core-amd64-generic-v2.5.0/manifests/latest: UNAUTHORIZED: access to the requested resource is not authorized; map[] 
1 error occurred:
	* GET https://quay.io/v2/kairos/22.04-core-amd64-generic-v2.5.0/manifests/latest: UNAUTHORIZED: access to the requested resource is not authorized; map[]

mauromorales avatar Jan 17 '24 18:01 mauromorales