Commit Graph

369 Commits

Author SHA1 Message Date
Itxaka
56632ca277
Add extra files needed for dracut (#36)
* Add extra files needed for dracut

If we are dropping cos-immutable-rootfs then we have to include the
missing files that the package already added.

For example, the several dracut configs of modules for the initramfs
stage, or the general config for the dracut file.

We also need to install and link the initramfs elemental stage service
as that its no longer provided by the cos-immutable-rootfs package and
not integrated into immucore yet

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

* Minor improvements

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

---------

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-02-13 14:34:51 +01:00
mudler
5122a57cc1 📖 Add LICENSE
Signed-off-by: mudler <mudler@c3os.io>
2023-02-13 09:47:58 +01:00
renovate[bot]
2dca980891
fix(deps): update module github.com/containerd/containerd to v1.6.17 (#35)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-11 09:00:15 +01:00
Itxaka
7430d6d9a9 Fix mount tests
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-09 16:43:12 +01:00
Itxaka
c1ddd58377 Fix iso build artifact upload
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-09 16:24:34 +01:00
Itxaka
c40e1f97f1 Add build iso job
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-09 15:33:41 +01:00
Itxaka
08c66d99a7
Merge pull request #31 from kairos-io/changes_v6 2023-02-09 15:22:24 +01:00
Itxaka
109c1c745f Several fixes
- Set global debug log
 - Set caller in the log if debug
 - Fatal if cannot get target image
 - clean up slices from cos-layoout.env
 - Add generic log with more context info
 - dump runtime to log on start
 - Set proper default paths if overlay is empty (fixes recovery)
 - Fix ErrAlreadyMounted to not trigger failures

Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-09 15:16:53 +01:00
Itxaka
7a9e574c21
Merge pull request #30 from kairos-io/renovate/github.com-spectrocloud-labs-herd-0.x 2023-02-09 14:25:51 +01:00
Itxaka
3078111c1d Leaving checking the mount status to the op.run
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-09 13:48:35 +01:00
Itxaka
b764634331 more error handling
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-09 13:24:45 +01:00
Itxaka
aee2bbde84 Deal nicely with already mounted errors
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-09 12:35:45 +01:00
renovate[bot]
b0d222ad45
fix(deps): update module github.com/spectrocloud-labs/herd to v0.4.0 2023-02-09 11:32:50 +00:00
Itxaka
645d0a428a Mount oem by label
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-09 10:50:30 +01:00
Itxaka
d0816bb7e3 Fix tmpfs fstab entry
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-09 10:34:43 +01:00
Itxaka
61e6607285 Properly clean the sysroot string from fstab
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-09 10:29:26 +01:00
Itxaka
0807fe08f5 Refactor
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-09 10:12:11 +01:00
Itxaka
ed6614b6c7 Remove cos-immutable-rootfs by default when building the iso
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-09 08:56:26 +01:00
Itxaka
cf69cffa4b Drop isrecovery from state struct
Only needed in one place, can be made into a function

Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-09 08:54:16 +01:00
Itxaka
8cd3520311
Merge pull request #29 from kairos-io/changes_v5 2023-02-08 23:44:59 +01:00
Itxaka
c5e686883e Significantly drop logging
It was nice when things break all over but its much more stable now.
Lets add logging with head and with proper enrichment of the data being
sent

Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-08 23:27:53 +01:00
Itxaka
f490b08587 Several fixes
- set debug level via cmdline
 - set default RW paths needed ALWAYS to boot a working system, even
   with no config files(recovery)
 - Check for loop device before mounting it to avoid duplicated mounts
 - Force overlay and bind arrays to uniqueness
 - Rename OverlayDir to OverlayDirs to better represent the content

Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-08 22:54:17 +01:00
Itxaka
accaa2a114 Fix log if error is nil
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-08 22:03:45 +01:00
Itxaka
b2b870973c Return from cos-layout if recovery
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-08 21:19:57 +01:00
Itxaka
0ea1650838 fix auto fstype
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-08 19:35:13 +01:00
Itxaka
0323c5ab5f Fix recovery label
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-08 19:11:00 +01:00
Itxaka
0bf7b5f760 Check cdboot the first thing
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-08 18:58:02 +01:00
Itxaka
99cd455ce8 Fixes recovery
- Add isRecovery to state
 - Get the TargetImage from cmdline
 - Add isrecovery to conditions

Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-08 18:51:53 +01:00
Itxaka
441c4d17a3 Fix wrong recovery-img
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-08 18:31:05 +01:00
Itxaka
1381041b7d switch state to recovery if we are on recovery
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-08 18:24:28 +01:00
Itxaka
23b4b8f69f Set sentinel file during generator
Some cloud init scripts may need it ASAP

Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-08 18:24:02 +01:00
Itxaka
7416a49e21
Merge pull request #27 from kairos-io/changes_v4 2023-02-08 16:50:06 +01:00
Itxaka
c533ab825a bind: only add to fstab if we have no errors
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-08 16:36:12 +01:00
Itxaka
0939929821 drop empty binds, more logging
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-08 16:23:13 +01:00
Itxaka
3f4b782fe9 Add missing module rsync to initramfs
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-08 15:59:04 +01:00
Itxaka
2a62ff5dac Persistent should be RW
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-08 15:51:21 +01:00
Itxaka
4407bef252 return proper multierror or nil, print dag after execution
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-08 15:40:18 +01:00
Itxaka
98a2506859 check mount status in mountoperation.run not on bind mountpoint
preparation

Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-08 14:43:58 +01:00
Itxaka
bfc337b499 sdfasd
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-08 14:14:37 +01:00
Itxaka
45c69d24fa Remove defaults from bind and extra logging
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-08 13:49:26 +01:00
Itxaka
6fedeef4ea Replace /sysroot on fstab
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-08 11:53:08 +01:00
Itxaka
b67c89c593 Translate auto fstype to actual type
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-08 11:33:11 +01:00
Itxaka
b628f959d3 Translate persistent to runtime device
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-08 11:01:21 +01:00
Itxaka
c2deb76192 Check symlink before creating it
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-08 10:32:11 +01:00
Itxaka
9aee940e64 more debug
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-08 10:09:21 +01:00
Itxaka
8366045036 drop defaults
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-08 08:45:52 +01:00
Itxaka
4ae267cec0
Merge pull request #26 from kairos-io/changes_v4 2023-02-07 22:35:22 +01:00
Itxaka
306d5c3e66 fix not initialized map and check for already mounted mounts instead of
failing

Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-07 22:25:28 +01:00
Itxaka
856b01c540 i dunno lol
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-07 22:12:37 +01:00
Itxaka
9dcf453764 Add a note to the generator sysroot.mount
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-07 21:58:53 +01:00