Skip to content

Conversation

d1nuc0m
Copy link
Contributor

@d1nuc0m d1nuc0m commented Jul 15, 2025

Kickstart default template, remove conditions related to EOL OSes:

  • EL5 - EOL 30 Nov 2020
  • EL6 - EOL 30 Jun 2024
  • Fedora <= 28 - EOL 28 May 2019
  • Fedora <= 19 - EOL 06 Jan 2015
  • Fedora <= 16 - EOL 12 Feb 2013
  • OracleLinux 7 supports only latest (still supported)

@d1nuc0m d1nuc0m changed the title [WIP] Draft: remove EOL OS conditions from kickstart default Draft: remove EOL OS conditions from kickstart default Aug 7, 2025
@d1nuc0m d1nuc0m force-pushed the kickstart-default-cleanup branch from 9fa1daa to 64bf0dd Compare August 7, 2025 14:27
Copy link
Member

@ekohl ekohl left a 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
Copy link
Member

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

Suggested change
realm_compatible = (@host.operatingsystem.name == 'Fedora' && os_major >= 20) || rhel_compatible
realm_compatible = is_fedora || rhel_compatible

That is effectively:

Suggested change
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

Suggested change
realm_compatible = (@host.operatingsystem.name == 'Fedora' && os_major >= 20) || rhel_compatible
realm_compatible = true

Copy link
Contributor Author

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'
Copy link
Member

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.

Copy link
Contributor Author

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?

Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right

@d1nuc0m d1nuc0m force-pushed the kickstart-default-cleanup branch from 64bf0dd to 831cc8b Compare August 7, 2025 16:20
@d1nuc0m d1nuc0m force-pushed the kickstart-default-cleanup branch from 831cc8b to 2d7392f Compare August 7, 2025 16:31
@d1nuc0m d1nuc0m changed the title Draft: remove EOL OS conditions from kickstart default Remove EOL OS conditions from kickstart default Aug 7, 2025
@d1nuc0m d1nuc0m changed the title Remove EOL OS conditions from kickstart default Fixes #38647: kickstart default drop EOL conditions Aug 7, 2025
@d1nuc0m d1nuc0m force-pushed the kickstart-default-cleanup branch from 2d7392f to 0e26516 Compare August 8, 2025 06:45
@evgeni evgeni marked this pull request as draft August 8, 2025 07:12
@evgeni evgeni marked this pull request as ready for review August 8, 2025 07:12
@d1nuc0m
Copy link
Contributor Author

d1nuc0m commented Aug 8, 2025

Ok, I can't understand why it's complaining about section ends, tried to change tags and nothing

Edit: fixed

Remove conditions related to EOL OSes (EL5/6, Fedora < 16/19/28)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants