-
Notifications
You must be signed in to change notification settings - Fork 170
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
Default to UEFI (non-SB) on x86_64 #3159
Conversation
d908fa3
to
f4e920c
Compare
This would need related changes in https://github.com/coreos/coreos-ci-lib to keep the status quo with what we have today. We'd also probably need to make that code stop relying on the cosa default at all because for some time we'll be using older cosa while using latest coreos-ci-lib. |
Well maybe not. Does this affect the defaults for |
Yes, looks like most of the testiso scenarios will flip over to being UEFI by default on x86_64. I'll test that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm okay with the premise, subject to Dusty's concerns about ratcheting. The change itself is too complex: it makes an empty Firmware
value have three different behaviors at different points in the code. One of those is redundant and another one is too implicit. Let's simplify this.
mantle/cmd/kola/options.go
Outdated
@@ -210,8 +210,6 @@ func syncOptionsImpl(useCosa bool) error { | |||
kola.QEMUOptions.Firmware = "uefi" | |||
} else if kola.Options.CosaBuildArch == "x86_64" && kola.QEMUOptions.Native4k { | |||
kola.QEMUOptions.Firmware = "uefi" | |||
} else { | |||
kola.QEMUOptions.Firmware = "bios" | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conversely, if the QEMU code treats the empty string as uefi
on platforms where UEFI is supported, the remaining part of this conditional serves no purpose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So yes...you're right but this also serves as a marker that this functionality actually requires uefi.
For example, one thing I can imagine us doing in the future is auto-generating a test matrix that e.g. runs some tests in BIOS, some in UEFI.
Hmm, perhaps what we want is kola.QEMUOptions.RequireUEFI
- and hence it could also run in uefi-secure
(which is a 3rd option in this matrix, that arguably instead should actually be the default...).
f4e920c
to
ef61465
Compare
@cgwalters: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
This still seems much more complex than it needs to be. I agree that For the |
There's some momentum around e.g. UKI https://github.com/uapi-group/specifications/blob/main/specs/unified_kernel_image.md I think it's about time to flip our default to be UEFI instead of BIOS. (But, we obviously still do need to care about bios...and we should e.g. be running at least a subset of our tests acrosss that too) Also while we're here, make the implementation here have the default for firmware be the empty string `""` instead of `bios`, which doesn't really apply on e.g. ppc64le/s390x.
ef61465
to
53c7f68
Compare
My motivation here is that - perhaps we actually want to change the default in qemu to OK, though we can fix this another way - by exporting the default value and using it here. Done.
Yeah, totally agreed. I started to do as you suggested but digging further we can actually do things a lot better by having it be right in the structure initialization. |
To be clear, I should have originally marked this as draft because it was a quick drive-by thing I was investigating while looking at UEFI things. I should have made more clear it was more of a RFC. We don't need to merge this right away. But that said I think the PR is a lot nicer now, the main blocker left seems to be
and what seems messy here is that ISTM we effectively need to "invert" the control here - instead of doing |
I was initially proposing keeping the assignments in |
One major downside of this right now is that every boot starts off with "Boot option restoration" and a 5 second timer... |
Right, that'll be fixed by the fix for coreos/fedora-coreos-tracker#946. I'm hoping to have some time to work on that early next year. |
Prep for switching the default to UEFI on x86_64 in coreos#3159 - Move the logic for default firmware into the constructor - Fix various places that were overriding it with the empty string - Return errors instead of panic on unknown firmware
Split out the cleanups here into #3200 |
Prep for switching the default to UEFI on x86_64 in coreos#3159 - Move the logic for default firmware into the constructor - Fix various places that were overriding it with the empty string - Return errors instead of panic on unknown firmware
@cgwalters: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Prep for switching the default to UEFI on x86_64 in #3159 - Move the logic for default firmware into the constructor - Fix various places that were overriding it with the empty string - Return errors instead of panic on unknown firmware
This is still nice to have, but not a priority right now. We may (re)consider it during work on UKIs |
There's some momentum around e.g. UKI
https://github.com/uapi-group/specifications/blob/main/specs/unified_kernel_image.md
I think it's about time to flip our default to be UEFI instead of BIOS.
(But, we obviously still do need to care about bios...and
we should e.g. be running at least a subset of our tests
acrosss that too)
Also while we're here, make the implementation here have the default for firmware be the empty string
""
instead ofbios
, which doesn't really apply on e.g. ppc64le/s390x.