-
Notifications
You must be signed in to change notification settings - Fork 1k
Fixes #38647: kickstart default drop EOL conditions #10610
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
base: develop
Are you sure you want to change the base?
Conversation
9fa1daa
to
64bf0dd
Compare
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 not 100% sure if we can drop EL6. Within Red Hat RHEL 6 is in a weird state. @stejskalleos do you know where we landed with this?
@@ -63,15 +63,15 @@ description: | | |||
is_fedora = @host.operatingsystem.name == 'Fedora' | |||
os_major = @host.operatingsystem.major.to_i | |||
os_minor = @host.operatingsystem.minor.to_i | |||
realm_compatible = (@host.operatingsystem.name == 'Fedora' && os_major >= 20) || (rhel_compatible && os_major >= 7) | |||
realm_compatible = (@host.operatingsystem.name == 'Fedora' && os_major >= 20) || rhel_compatible |
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 think we can assume Fedora is also newer than 20 so this would be simplified to
realm_compatible = (@host.operatingsystem.name == 'Fedora' && os_major >= 20) || rhel_compatible | |
realm_compatible = is_fedora || rhel_compatible |
That is effectively:
realm_compatible = (@host.operatingsystem.name == 'Fedora' && os_major >= 20) || rhel_compatible | |
realm_compatible = @host.operatingsystem.family == 'Redhat' |
And we can assume that's the case for kickstart, so really it's
realm_compatible = (@host.operatingsystem.name == 'Fedora' && os_major >= 20) || rhel_compatible | |
realm_compatible = true |
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.
Ok, so realm_compatible can be removed at all, as it's used only in one check together with other params, but it would always be true
# safemode renderer does not support unary negation | ||
proxy_uri = host_param('http-proxy') ? "http://#{host_param('http-proxy')}:#{host_param('http-proxy-port')}" : nil | ||
proxy_string = proxy_uri ? " --proxy=#{proxy_uri}" : '' | ||
puppet_enabled = !host_param_true?('skip-puppet-setup') && (host_puppet_server.present? || host_param_true?('force-puppet')) | ||
salt_enabled = host_param('salt_master') ? true : false | ||
chef_enabled = @host.respond_to?(:chef_proxy) && @host.chef_proxy | ||
section_end = (rhel_compatible && os_major <= 5) ? '' : '%end' | ||
use_ntp = host_param_true?('use-ntp', (is_fedora && os_major < 16) || (rhel_compatible && os_major <= 6)) | ||
section_end = '%end' |
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'd suggest to get rid of this variable altogether and always use %end
where needed.
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.
Done, why was it implemented at all if it has always the same value?
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.
Before when it had EL5 support it wasn't printed. You're dropping that so the variable becomes redundant
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.
You're right
app/views/unattended/provisioning_templates/provision/kickstart_default.erb
Outdated
Show resolved
Hide resolved
64bf0dd
to
831cc8b
Compare
831cc8b
to
2d7392f
Compare
2d7392f
to
0e26516
Compare
Edit: fixed |
Remove conditions related to EOL OSes (EL5/6, Fedora < 16/19/28)
0e26516
to
e355af5
Compare
Kickstart default template, remove conditions related to EOL OSes:
OracleLinux 7 supports only latest(still supported)