Skip to content

Commit

Permalink
Make CloudLinux 7 an experimental OS
Browse files Browse the repository at this point in the history
Case RE-208:  This change makes CloudLinux 7 an experimental OS and will
give the user a warning before proceeding with the elevation if the
server they are upgrading is considered experimental.

Changelog:
  • Loading branch information
cPholloway committed Feb 19, 2024
1 parent 2b103bb commit bc0e616
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions elevate-cpanel
Original file line number Diff line number Diff line change
Expand Up @@ -4201,6 +4201,7 @@ EOS
'disable_mysql_yum_repos', # This is a list of mysql repo files to disable
'ea_alias', # This is the value for the --target-os flag used when backing up an EA4 profile
'elevate_rpm_url', # This is the URL used to install the leapp RPM/repo
'is_experimental', # This is used to determine if the OS is experimental or not
'is_supported', # This is used to determine if the OS is supported or not
'leapp_can_handle_epel', # This is used to determine if we can skip removing the EPEL repo pre_leapp or not
'leapp_can_handle_imunify', # This is used to determine if we can skip the Imunify component or not
Expand Down Expand Up @@ -4303,6 +4304,7 @@ EOS
use constant default_upgrade_to => 'CloudLinux';
use constant ea_alias => 'CloudLinux_8';
use constant elevate_rpm_url => 'https://repo.cloudlinux.com/elevate/elevate-release-latest-el7.noarch.rpm';
use constant is_experimental => 1;
use constant leapp_can_handle_epel => 1;
use constant leapp_can_handle_imunify => 1;
use constant leapp_can_handle_kernelcare => 1;
Expand Down Expand Up @@ -4393,6 +4395,7 @@ EOS
use constant default_upgrade_to => undef;
use constant ea_alias => undef;
use constant elevate_rpm_url => undef;
use constant is_experimental => 0;
use constant is_supported => 1;
use constant leapp_can_handle_epel => 0;
use constant leapp_can_handle_imunify => 0;
Expand Down Expand Up @@ -6241,6 +6244,13 @@ It is *highly* recommended that you have a full backup or snapshot
of your server before proceeding.
EOS

if ( Elevate::OS::is_experimental() ) {
say <<EOS;
*Warning*: ELevate for CloudLinux 7 to CloudLinux 8 is experimental software
and is not recommended for production environments.
EOS
}

if ( !$self->getopt('non-interactive') ) {
if (
!IO::Prompt::prompt(
Expand Down
1 change: 1 addition & 0 deletions lib/Elevate/OS.pm
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ BEGIN {
'disable_mysql_yum_repos', # This is a list of mysql repo files to disable
'ea_alias', # This is the value for the --target-os flag used when backing up an EA4 profile
'elevate_rpm_url', # This is the URL used to install the leapp RPM/repo
'is_experimental', # This is used to determine if the OS is experimental or not
'is_supported', # This is used to determine if the OS is supported or not
'leapp_can_handle_epel', # This is used to determine if we can skip removing the EPEL repo pre_leapp or not
'leapp_can_handle_imunify', # This is used to determine if we can skip the Imunify component or not
Expand Down
1 change: 1 addition & 0 deletions lib/Elevate/OS/CloudLinux7.pm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ use constant available_upgrade_paths => (
use constant default_upgrade_to => 'CloudLinux';
use constant ea_alias => 'CloudLinux_8';
use constant elevate_rpm_url => 'https://repo.cloudlinux.com/elevate/elevate-release-latest-el7.noarch.rpm';
use constant is_experimental => 1;
use constant leapp_can_handle_epel => 1;
use constant leapp_can_handle_imunify => 1;
use constant leapp_can_handle_kernelcare => 1;
Expand Down
1 change: 1 addition & 0 deletions lib/Elevate/OS/RHEL.pm
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ use constant available_upgrade_paths => undef;
use constant default_upgrade_to => undef;
use constant ea_alias => undef;
use constant elevate_rpm_url => undef;
use constant is_experimental => 0;
use constant is_supported => 1;
use constant leapp_can_handle_epel => 0;
use constant leapp_can_handle_imunify => 0;
Expand Down
7 changes: 7 additions & 0 deletions script/elevate-cpanel.PL
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,13 @@ It is *highly* recommended that you have a full backup or snapshot
of your server before proceeding.
EOS

if ( Elevate::OS::is_experimental() ) {
say <<EOS;
*Warning*: ELevate for CloudLinux 7 to CloudLinux 8 is experimental software
and is not recommended for production environments.
EOS
}

if ( !$self->getopt('non-interactive') ) {
if (
!IO::Prompt::prompt(
Expand Down

0 comments on commit bc0e616

Please sign in to comment.