Commit Graph

17 Commits

Author SHA1 Message Date
Itxaka
4975b9b914
Bump yip and diskfs (#717)
* Bump yip and diskfs

---------

Signed-off-by: Itxaka <itxaka@kairos.io>
2025-03-26 11:57:29 +01:00
Itxaka
db703db5e5
Try to fix hooks (#718)
* fix hooks


---------

Signed-off-by: Itxaka <itxaka@kairos.io>
2025-03-24 16:05:39 +01:00
Itxaka
b5869b4017
Fix hooks under encrypted partitions (#702)
* Fix hooks under encrypted partitions

We had a mess of mounting and unmounting things around when we try to
copy things to persistent.

Part of the changes (using the by-label to mount the persistent) are due
to the change in kcrypt. As we set the same label to the encrypted fs
and unencrypted fs, our utils.Mount could get mistaken and return the
first hit, which usually its the encrypted one, and we cannot mount that
one.

This patch brings it up to date.

 - Makes bundles and logs hooks work when we have encrypted persistent.
   It didnt work before.
 - Makes both workflows the same.
 - Locks everything once its over, to not leave encrypted parts around
 - Mounts OEM so kcrypt can read the config if we are using a remote
   server for encryption
 - Mounts by label so there is not a change of getting the wrong device
 - Uses the mount syscall directly. The util can mistake and return the
   actual encrypted part if they both have the same label and finds it
   first

---------

Signed-off-by: Itxaka <itxaka@kairos.io>
2025-03-13 11:22:26 +01:00
Itxaka
488841ebf2
Use extensions dir path as source (#660)
Otherwise it will copy the dir itself and we just want to copy the
contents of the dir

Signed-off-by: Itxaka <itxaka@kairos.io>
2025-01-14 10:59:45 +01:00
Itxaka
0ae9c04eb4
Make sure kcrypt hook umounts persistent (#244) 2024-03-07 15:11:51 +01:00
Dimitris Karakasilis
c98c791f60
Call exec.Command properly, splitting the cmd and args
This was failing but wasn't visible because it needs

`fail_on_bundles_errors: true` to be set in the Kairos config.

We need to find whether we need a new test or an existing one can be
adapted to catch this.

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-11-20 13:54:05 +02:00
Itxaka
3e4693d697
Workaround for bundle install in new /var/lib/extensions directory (#147) 2023-09-15 15:40:27 +02:00
Dimitris Karakasilis
51ca8a8589
Revert "debug extension"
This reverts commit 98ccb57799.
2023-09-15 15:36:42 +03:00
Itxaka
98ccb57799 debug extension
Signed-off-by: Itxaka <itxaka@kairos.io>
2023-09-15 14:33:41 +02:00
Itxaka
956f86f99c
Rework reboot/shutdown to use the hooks (#96) 2023-07-24 12:28:59 +02:00
Itxaka
9c5731baa2
Rename go module kairos-agent (#81) 2023-07-10 14:39:48 +02:00
Dimitris Karakasilis
e7807dd66c Change module path according to Go docs (#1220)
https://go.dev/doc/modules/major-version

This way we can bump the kairos dependency on the provider-kairos repo

which otherwise produced the error:

```
~/workspace/kairos/provider-kairos (main)*$ go get -u github.com/kairos-io/kairos@v2.0.0-alpha3
go: github.com/kairos-io/kairos@v2.0.0-alpha3: invalid version: module contains a go.mod file, so module path must match major version ("github.com/kairos-io/kairos/v2")
```

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Co-authored-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-03-30 14:18:53 +03:00
Itxaka
75c52f520f Bump to newer sdk (#1166) 2023-03-18 10:27:18 +01:00
Itxaka
b5cfab06a7 sparkles: Use kairos-sdk module (#1140) 2023-03-15 15:45:00 +01:00
Ettore Di Giacinto
0af13f655f sparkles: enhancements (#263)
* 🎨 Do not need to prefix '.' on queries

*  Add recovery to stateapi

*  Add cloudconfig SDK

*  Unify post-install/firstboot hooks

This also adds capabilities to add grub option at first boot rather than
after installation as for bundles.

* 🤖 Optimize tests to wait for state to change
2022-10-24 08:34:49 +02:00
Ettore Di Giacinto
5893294c54 sparkles: state api sdk (#262)
*  Add state api

This is related to https://github.com/kairos-io/kairos/issues/34.

Starts to unify the API to retrieve the state in the sdk to have a common place to query system status information.

* 🤖 Add test

* Update go.mod

* ⚙️ Fine-tune detection of partitions

* 🤖 Add more fine-grained tests

* 🎨 Add /dev/ to partition name

* 🤖 Fixup tests

* ⚙️ Remount accessors

*  Add state partition to cloud-init paths

* 📝 Upper case Kairos in motd

* 🎨 Add mounts sdk

* 🎨 Set grub options via SDK

* 🎨 Make it more idiomatic
2022-10-23 20:22:32 +02:00
Ettore Di Giacinto
a8875f6b4f sparkles: Add bundles to post-install hooks (#171)
* 🤖 Add bundles and sysext test

*  Exec bundles also after install

* 🤖 Adapt tests

* 🎨 Create dir only if doesn't exist

* 🎨 Return err on mount

* 🎨 Make bundle errors failure as an option

* 🎨 Minor fixups

* debug

* 🤖 Fix spec

* 🤖 Get correct version for bundle test

* 🎨 Fixups

* 🤖 systemd-sysext is available only on opensuse for now
2022-10-03 00:16:01 +02:00