* [refactoring] simplify method and make it more efficient
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
* [WIP] Introduce `logs` command to collects logs from various places
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
* Handle globs properly and merge default logs with user provided ones
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
* Change default logs location to be the current directory
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
* Skip new field in the schema tests
TODO: Update the schema and re-enable
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
* Remove test focus
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
* Add more default services
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
* Don't try to run journactl on non systemd distros
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
* Add more files (for openrc)
c6fdf6ee67/pkg/bundled/cloudconfigs/09_openrc_services.yaml (L52)
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
* Use standard library for globbing
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
* Capture all files under `/var/log`
because there is also k3s.log (maybe also k0s) etc. Better have them all
than missing some.
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
---------
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
* 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>
* Run tests in parallel and output github formats on workflow
Signed-off-by: Itxaka <itxaka@kairos.io>
* Fix broken parallel tests
We were using a fixed file for the tests which several tests could be
accessing at the same time.
This fixes it by setting a temp random file at the test start
Signed-off-by: Itxaka <itxaka@kairos.io>
* Fix the tests logging to stdout
Signed-off-by: Itxaka <itxaka@kairos.io>
* Drop the verbose
Signed-off-by: Itxaka <itxaka@kairos.io>
* Fix agent test
Signed-off-by: Itxaka <itxaka@kairos.io>
* Let the event consumer create the logfile or whatever
Signed-off-by: Itxaka <itxaka@kairos.io>
* Drop Focus
Signed-off-by: Itxaka <itxaka@kairos.io>
---------
Signed-off-by: Itxaka <itxaka@kairos.io>