Skip to content

Commit

Permalink
Merge pull request #464 from cPholloway/RE-500
Browse files Browse the repository at this point in the history
Remove support for CloudLinux
  • Loading branch information
toddr authored Jul 3, 2024
2 parents 29b7258 + 993f5d2 commit 1f2cca9
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 5 deletions.
18 changes: 16 additions & 2 deletions elevate-cpanel
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,12 @@ EOS
}

sub _blocker_os_is_not_supported ($self) {
Elevate::OS::is_supported(); # dies
my $is_supported = Elevate::OS::is_supported(); # dies
unless ($is_supported) {
return $self->has_blocker( <<~'EOS' );
elevate-cpanel for CloudLinux 7 has been disabled due to problems with the upstream leapp package. See https://go.cpanel.net/elevate-cloudlinux-disabled for more information. The stability of your upgrade is our highest priority. We will re-enable it when this has been resolved.
EOS
}
return 0;
}

Expand Down Expand Up @@ -954,7 +959,15 @@ EOS

sub bail_out_on_inappropriate_distro () {
Elevate::OS::clear_cache();
Elevate::OS::is_supported(); # dies
my $is_supported = Elevate::OS::is_supported(); # dies

unless ($is_supported) {
FATAL( <<~'EOS' );
elevate-cpanel for CloudLinux 7 has been disabled due to problems with the upstream leapp package. See https://go.cpanel.net/elevate-cloudlinux-disabled for more information. The stability of your upgrade is our highest priority. We will re-enable it when this has been resolved.
EOS
exit 1; ## no critic(Cpanel::NoExitsFromSubroutines)
}

return;
}

Expand Down Expand Up @@ -5591,6 +5604,7 @@ EOS
our @ISA;
BEGIN { push @ISA, qw(Elevate::OS::RHEL); }

use constant is_supported => 0;
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';
Expand Down
17 changes: 15 additions & 2 deletions lib/Elevate/Blockers/Distros.pm
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,12 @@ sub check ($self) {
}

sub _blocker_os_is_not_supported ($self) {
Elevate::OS::is_supported(); # dies
my $is_supported = Elevate::OS::is_supported(); # dies
unless ($is_supported) {
return $self->has_blocker( <<~'EOS' );
elevate-cpanel for CloudLinux 7 has been disabled due to problems with the upstream leapp package. See https://go.cpanel.net/elevate-cloudlinux-disabled for more information. The stability of your upgrade is our highest priority. We will re-enable it when this has been resolved.
EOS
}
return 0;
}

Expand Down Expand Up @@ -75,7 +80,15 @@ upgrade via this script. Never allow a cache to be used here.

sub bail_out_on_inappropriate_distro () {
Elevate::OS::clear_cache();
Elevate::OS::is_supported(); # dies
my $is_supported = Elevate::OS::is_supported(); # dies

unless ($is_supported) {
FATAL( <<~'EOS' );
elevate-cpanel for CloudLinux 7 has been disabled due to problems with the upstream leapp package. See https://go.cpanel.net/elevate-cloudlinux-disabled for more information. The stability of your upgrade is our highest priority. We will re-enable it when this has been resolved.
EOS
exit 1; ## no critic(Cpanel::NoExitsFromSubroutines)
}

return;
}

Expand Down
2 changes: 2 additions & 0 deletions lib/Elevate/OS/CloudLinux7.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ use Log::Log4perl qw(:easy);

use parent 'Elevate::OS::RHEL';

# RE-500: temporarily disable until upstream leapp bug is resolved
use constant is_supported => 0;
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';
Expand Down
9 changes: 8 additions & 1 deletion t/blocker-Distros.t
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,14 @@ my $distros = $cpev->get_blocker('Distros');
Cpanel::OS::clear_cache_after_cloudlinux_update();
unmock_os();
$f = Test::MockFile->symlink( 'linux|cloudlinux|7|9|2009', '/var/cpanel/caches/Cpanel-OS' );
is( $distros->check(), 0, 'CL7 is supported.' );
like(
$distros->check(),
{
id => 'Elevate::Blockers::Distros::_blocker_os_is_not_supported',
msg => qr/elevate-cpanel for CloudLinux 7 has been disabled due to problems with the upstream leapp package/,
},
'CL7 is supported.',
);

undef $f;
Cpanel::OS::clear_cache_after_cloudlinux_update();
Expand Down

0 comments on commit 1f2cca9

Please sign in to comment.