1
0
mirror of https://github.com/kairos-io/kairos-agent.git synced 2025-05-12 10:24:23 +00:00

warning: 🎨 Use immucore 🦔 ()

* ⚠️ 🎨  Use immucore

Build kairos with immmucore instead of cos-immutable-rootfs

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>

* 🐛 Fix state sdk

State sdk is using ghw to identify the state of the disks, but
unfortunately ghw only works with devices and not with labels

This patch adds a workaround by checking deeper for partitions that
migth not have mountpoints reported by ghw but are indeed mounted

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>

* 🐛 Fix state not catching netboot properly

This worked with the old cos-immutable-rootfs due to the rd.cos.disable
stanza in cmdline making the livecd cloud config file trigger, which
created the livecd sentinel file.

With immucore, the sentinel is being created during initramfs directly
so we need to rely on the cmdline to identify it.

State sdk should know that having the netboot stanza should identify the
boot as cdlive

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>

* Fix custom binds set as RW_PATHS

RW_PATHS are meant for overlay dirs which go away after a reboot.
Custom binds/binds are mounted under COS_PERSISTENT, so they persist
after reboot AND are RW by default.

This patch removes adding the custom binds into the RW_PATHS on the
cos-layout file as that can lead to unintended consequences

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>

* Dont run custom mounts on livecd and recovery

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>

* Rework writing custom ephemeral/binds

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>

* Maybe fix tests

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>

* Add missing sgdisk to ubuntu images

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>

* 🐛 Backport dracut patch for ubuntu 20 iscsi

There was an issue with dracut 48 in which the iscsid.socket required fs
targets to be ready. On an iso this could lead to a dependency cycle
between the dmsquash module setting up the livecd rootfs and the iscsi
socket required the initrd-fs to be ready.

This was fixed on dracut 50 and its what this patch brings, dropping the
socket dependency on the fs target so it can break the dependency cycle.

This only affect ubuntu 20 lts, and only affects booting from the iso.
Alos the issue is random as systemd will decide to break the dependency
in a non predictable way by disabling one of the services that conflict,
so sometimes it would be the iscsi serviec, which would make the iso
boot but sometimes it could be other more important services liek teh
local fs or the dracut pre-mount services.

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
(cherry picked from commit 63f0c75d69ab3adca143f917c2e31b75ca3d96c7)

* Bump immucore

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>

---------

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
Co-authored-by: Ettore Di Giacinto <mudler@users.noreply.github.com>
This commit is contained in:
Itxaka 2023-03-01 00:02:10 +01:00
parent d51a9f3470
commit 5bfceade0f

2
go.sum
View File

@ -154,6 +154,8 @@ github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa02
github.com/klauspost/cpuid/v2 v2.0.10/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c=
github.com/klauspost/cpuid/v2 v2.0.12/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c=
github.com/klauspost/cpuid/v2 v2.2.0 h1:4ZexSFt8agMNzNisrsilL6RClWDC5YJnLHNIfTy4iuc=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=