Commit Graph

20 Commits

Author SHA1 Message Date
Itxaka
076bba95dc Set the sentinel file from immucore directly
Also add a missing livecd sentinel file

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-02-13 21:42:45 +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
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
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
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
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
f98954367f several improvements
- drop vfs
 - less hardcoded stuff, use the runtime status
 - Remove things that syscalls dont understand (defaults, auto)

Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-06 16:20:18 +01:00
mudler
13e11fca24 Use SDK to get machine state 2023-02-06 14:49:35 +01:00
Itxaka
4ade174057 dont do anything if booting from CD
We leave dracut to do its own thing and mount the CD properly

Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-06 11:31:46 +01:00
Itxaka
73b3f56af5 move to cli v2
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-06 09:43:54 +01:00
Itxaka
459f9bf349 Add dry-run flag
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-06 09:37:38 +01:00
Itxaka
8a916f4999 Error handling on dag creation
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-04 11:18:13 +01:00
Itxaka
93ceae89a2 Give a logger to State and add debug logs
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-04 10:33:58 +01:00
mudler
d767523565 Add simple test suite 2023-02-02 15:12:33 +01:00
mudler
74fbe7bae2 reorder deps 2023-02-02 14:00:44 +01:00
mudler
de01370653 Reorg flow 2023-02-01 18:01:58 +01:00
mudler
2b6de44b9d Initial import 2023-01-12 19:10:10 +01:00