-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrades using kairos-agent with a local file source fails #1509
Comments
Digging a little, in the case of file:<source_file>, source_file is expected to be a disk-image? Can we extract the tar.gz file from the |
moving to kairos main repo so it gets visibility |
any progress? still encounter the same issue with kairos-agent version v2.1.3 |
I use a workaround for now. If I use the tar file generated as part of the osbuilder process (I created a custom build after looking at how osbuilder works) to upgrade, it works. The tar file generated contains the /build/rootfs directory.
Then I use the myproj.tar to perform an upgrade:
This is not ideal, but works for now. I believe the change to support upgrade from a local oci image shouldn't be hard, but I haven't got time yet to explore the kairos-agent code on how to do it. |
actually a feature :D As we now support different sources for the upgrade, the underlying --file was in there but never tested. This seems like a good feature to have. |
I found a |
I had a look at the source for this and could find what this is about. File source is meant to install/upgrade from a system image file, so an image built like our active/passive/recovery |
Ah, reset uses this file source to reset the active and passive using the recovery image, so it just copies over them, so we cannot rework this as its being used. I propose a new source called ocitar or something similar (oh god, Im no good with names) that its for an extracted tar file from an OCI source, so its clear that its meant for that exactly. |
I suggest to follow CONTAINERS-TRANSPORTS(5) schemas. |
Good link, seems the original implementation was based on that, should be ok to keep expanding it with the other entries |
I am trying to use kairos-agent to upgrade an air-gapped system. The command I use is (2544.tar is an image archive generated using
docker save
):sudo ./kairos-agent upgrade --source file:/home/rancher/2544.tar
warning: skipping /oem/.userdata_load because it has no valid header
warning: skipping /oem/grubenv (extension).
INFO[2023-06-06T12:33:08Z] kairos-agent version v2.1.0-rc6
INFO[2023-06-06T12:33:08Z] Applying 'before-upgrade' hook
INFO[2023-06-06T12:33:08Z] Running before-upgrade hook
INFO[2023-06-06T12:33:08Z] deploying image /home/rancher/2544.tar to /run/initramfs/cos-state/cOS/transition.img
INFO[2023-06-06T12:33:08Z] Copying /home/rancher/2544.tar source...
INFO[2023-06-06T12:33:12Z] Finished copying /home/rancher/2544.tar into /run/initramfs/cos-state/cOS/transition.img
ERRO[2023-06-06T12:33:27Z] Failed to apply label COS_ACTIVE to $s%!(EXTRA string=/run/initramfs/cos-state/cOS/transition.img)
ERRO[2023-06-06T12:33:27Z] Failed deploying image to file '/run/initramfs/cos-state/cOS/transition.img': exit status 1
1 error occurred:
* exit status 1
The text was updated successfully, but these errors were encountered: