-
Notifications
You must be signed in to change notification settings - Fork 993
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
Fixes #36741 - Check Ubuntu version more explicitly #9831
Fixes #36741 - Check Ubuntu version more explicitly #9831
Conversation
Issues: #36741 |
If no minor version is defined, the function minor.to_i makes it a "0". Accordingly, Ubuntu 20.04 is interpreted as "no subiquity/Autoinstall" - but, if no minor version is given, Foreman should implicitly assume "latest" (which supports Autoinstall in fact).
c1da492
to
d4dbb9f
Compare
@sbernhard I've just rebased to latest develop. Tests seem fine. |
When is there ever not a minor? |
Currently the official foreman documentation states, that if you create an Ubuntu operating system you should assign a major version (e.g. But there are cases where one might want to create an Ubuntu operating system without minor version. For example this is currently required for Host Registration of Ubuntu hosts, because the Fact parsers only provide information about the major version of Ubuntu to foreman (see my issue and the corresponding PR for reference). So for Host Registration to work, I have to create an Ubuntu operating system with major version This would be fixed by this change introduced by @bastian-src. |
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.
LGTM. Thank you.
If no minor version is defined, the function
minor.to_i
makes it a "0". Accordingly, Ubuntu 20.04 is interpreted as "no subiquity/Autoinstall" - but, it should not assume a specific version here.Therefore,
is_subiquity
should return ´true` in this case (especially, since all 20.04.x versions support subiquity/Autoinstall provisioning, but only specific ones allow Preseed/debian-installer still).