Skip to content

Commit

Permalink
Merge pull request #438 from cPholloway/revert_RE-306
Browse files Browse the repository at this point in the history
Remove blocker for when /usr is a separate private mount point
  • Loading branch information
toddr authored May 15, 2024
2 parents eaa2b25 + 54336b9 commit 496f0bb
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 75 deletions.
18 changes: 0 additions & 18 deletions elevate-cpanel
Original file line number Diff line number Diff line change
Expand Up @@ -1527,7 +1527,6 @@ EOS
INIT { Log::Log4perl->import(qw{:easy}); }

sub check ($self) {
$self->_check_for_rhel_23449();
$self->_ensure_mount_dash_a_succeeds();
return;
}
Expand Down Expand Up @@ -1566,23 +1565,6 @@ EOS
return;
}

sub _check_for_rhel_23449 ($self) {

my $out = $self->ssystem_capture_output( FINDMNT_BIN, '-no', 'PROPAGATION', '/usr' );

return unless $out->{status} == 0;
return unless grep { $_ =~ m/private/ } @{ $out->{stdout} };

return $self->has_blocker( <<~'EOS');
The current filesystem setup on your server will prevent 'leapp' from being
able to load these packages which will result in 'leapp' failing which will
lead to a broken system. This is being addressed by CloudLinux in
CLOS-2492. A potential fix is currently in testing as of May 6th 2024.
Once the fix is released to the public, this blocker will be removed.
EOS
}

1;

} # --- END lib/Elevate/Blockers/MountPoints.pm
Expand Down
19 changes: 0 additions & 19 deletions lib/Elevate/Blockers/MountPoints.pm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ use constant MOUNT_BIN => '/usr/bin/mount';
use Log::Log4perl qw(:easy);

sub check ($self) {
$self->_check_for_rhel_23449();
$self->_ensure_mount_dash_a_succeeds();
return;
}
Expand Down Expand Up @@ -61,22 +60,4 @@ sub _ensure_mount_dash_a_succeeds ($self) {
return;
}

sub _check_for_rhel_23449 ($self) {

my $out = $self->ssystem_capture_output( FINDMNT_BIN, '-no', 'PROPAGATION', '/usr' );

# This will return 1 if '/usr' is not a separate mount point
return unless $out->{status} == 0;
return unless grep { $_ =~ m/private/ } @{ $out->{stdout} };

return $self->has_blocker( <<~'EOS');
The current filesystem setup on your server will prevent 'leapp' from being
able to load these packages which will result in 'leapp' failing which will
lead to a broken system. This is being addressed by CloudLinux in
CLOS-2492. A potential fix is currently in testing as of May 6th 2024.
Once the fix is released to the public, this blocker will be removed.
EOS
}

1;
38 changes: 0 additions & 38 deletions t/blocker-MountPoints.t
Original file line number Diff line number Diff line change
Expand Up @@ -38,44 +38,6 @@ $cpev_mock->redefine(
},
);

{
note 'Test _check_for_rhel_23449';

$capture_output_status = 1;
is( $mp->_check_for_rhel_23449(), undef, 'No blockers are returned when /usr is NOT a separate mount point' );
is(
\@cmds,
[
[
'/usr/bin/findmnt',
'-no',
'PROPAGATION',
'/usr',
],
],
'The expected command is called',
) or diag explain \@cmds;

$capture_output_status = 0;
$stdout[0] = 'shared';
is( $mp->_check_for_rhel_23449(), undef, 'No blockers are returned when /usr is a separate shared mount point' );

$stdout[0] = 'private';
my $blocker = $mp->_check_for_rhel_23449();
like(
$blocker,
{
id => 'Elevate::Blockers::MountPoints::_check_for_rhel_23449',
msg => qr/The current filesystem setup on your server will prevent/,
},
'A blocker is returned when /usr is a separate private mount point',
);

message_seen( WARN => qr/The current filesystem setup on your server will prevent/ );

no_messages_seen();
}

{
note 'Test _ensure_mount_dash_a_succeeds';

Expand Down

0 comments on commit 496f0bb

Please sign in to comment.