Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix uki mode detection #198

Merged
merged 4 commits into from
Jan 10, 2024
Merged

Fix uki mode detection #198

merged 4 commits into from
Jan 10, 2024

Conversation

Itxaka
Copy link
Member

@Itxaka Itxaka commented Jan 10, 2024

No description provided.

Itxaka added 3 commits January 9, 2024 18:10
woops

Signed-off-by: Itxaka <[email protected]>
so we dont fail to copy it properly. Its on the temp dir so it will be
autoremoved by the system on reboot

Signed-off-by: Itxaka <[email protected]>
Otherwise you end up with a broken half encrypted system with no OEM and
cant troubleshoot it.

Good for testing in devices that dont have TPM

Signed-off-by: Itxaka <[email protected]>
@Itxaka Itxaka requested a review from a team January 10, 2024 08:50
if internalutils.UkiBootMode() == internalutils.UkiRemovableMedia {
return runInstallUki(c)
if internalutils.IsUki() {
c.Logger.Debugf("UKI mode: %s\n", internalutils.UkiBootMode())
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bit more of logging to be able to check what mode are we in, in case we broke it like I already did :D

Signed-off-by: Itxaka <[email protected]>
@@ -520,7 +520,7 @@ const (
func UkiBootMode() state.Boot {
if IsUki() {
_, err := os.Stat("/run/cos/uki_boot_mode")
if err != nil {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wops, I broke it on the first iteration by mixing the check :D

Copy link

codecov bot commented Jan 10, 2024

Codecov Report

Attention: 11 lines in your changes are missing coverage. Please review.

Comparison is base (174d69c) 58.22% compared to head (fe31d4e) 58.15%.

Files Patch % Lines
internal/agent/install.go 0.00% 10 Missing ⚠️
pkg/utils/common.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #198      +/-   ##
==========================================
- Coverage   58.22%   58.15%   -0.08%     
==========================================
  Files          38       38              
  Lines        4778     4784       +6     
==========================================
  Hits         2782     2782              
- Misses       1759     1765       +6     
  Partials      237      237              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Itxaka Itxaka merged commit 53f4916 into main Jan 10, 2024
5 checks passed
@Itxaka Itxaka deleted the fixes_uki branch January 10, 2024 09:38
@Itxaka Itxaka linked an issue Jan 10, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UKI: (kairos-agent) install
2 participants