cpanel / elevate

elevate your cPanel&WHM CentOS 7 server to Almalinux 8
https://cpanel.github.io/elevate/
BSD 2-Clause "Simplified" License
43 stars 29 forks source link

[BUG] unable to elevate from centos 7 to alma 8 #466

Open celesteking opened 2 weeks ago

celesteking commented 2 weeks ago

Describe the bug

* 2024-07-09 10:05:48 [INFO] Checking EasyApache profile compatibility with AlmaLinux 8.
* 2024-07-09 10:05:50 [INFO] Running: /usr/local/bin/ea_current_to_profile --target-os=CloudLinux_8 --output=/tmp/59cAtEmn2X/ea_profile.json
* 2024-07-09 10:05:50 [WARN] Unknown error while checking blockers: Unable to backup EA4 profile. Failure from /usr/local/bin/ea_current_to_profile --target-os=CloudLinux_8 --output=/tmp/59cAtEmn2X/ea_profile.json at /scripts/elevate-cpanel line 5945.
* 2024-07-09 10:05:50 [WARN] Please fix the detected issues before performing the elevation process.

# /usr/local/bin/ea_current_to_profile --target-os=CloudLinux_8 --output=/tmp/59cAtEmn2X/ea_profile.json
Not a valid OS (CloudLinux_8) at /usr/local/bin/ea_current_to_profile line 100.
# /scripts/elevate-cpanel --version
45

Expected behavior Somehow I'm sure it used to work before, I just don't know what happened. The resulting OS was supposed to be Alma, not CloudLinux.

/usr/local/bin/ea_current_to_profile --target-os=AlmaLinux_8 works, btw.

annes449 commented 2 weeks ago

Hi. Did this server have Imunify 360 installed?

cPholloway commented 2 weeks ago

Thank you for this report, we have filed case RE-535 to address this issue.

CloudLinux_8 is the correct target when Imunify 360 is installed and provides hardened PHP as that essentially converts the system over to use CloudLinux's version of EA4. However, in this case, I believe the package ea-cpanel-tools had not been updated or that the system wasn't actually using hardened PHP even though it was reporting that it was.

celesteking commented 2 weeks ago

Yes, it has IM installed. ea-cpanel-tools-1.0-94.96.1.cpanel.x86_64 over here, so pretty recent. cpanel 110.0 (build 36)

And yes, hardened PHP is semi-installed, I apologize for that, but there was no other way to keep it along our PHP packages, so we had to improvise. It wasn't installed via group shortcut but rather per specific version.

So far, the solution is to use older version of this tool:

wget -O /scripts/elevate-cpanel https://raw.githubusercontent.com/cpanel/elevate/v42/elevate-cpanel && chmod 700 /scripts/elevate-cpanel
/scripts/elevate-cpanel --check
cPholloway commented 2 weeks ago

You could probably work around it by updating ea-cpanel-tools as well. Since the version of ea-cpanel-tools is coming from cPanel's version of EA4, the script does not know about the CloudLinux_8 target which is the reason that things are failing. An updated ea-cpanel-tools from CloudLinux's version of EA4 should resolve this

celesteking commented 2 weeks ago

dnf install --disablerepo=EA4 ea-cpanel-tools nailed it (it's the repo bearing EA4 - mirrorlist=http://httpupdate.cpanel.net/ea4-c$releasever-$basearch-mirrorlist).

Another small thing, I'm not sure I understand why is leapp removal and consequent install during stage 3 needed at all? We're using mv /var/lib/leapp /home/ && ln -s /home/leapp /var/lib/ to direct it to /home but [re]install removes the link as it's not marked as config dir in leapp RPM package.