Closed cPholloway closed 5 months ago
Is the mistake that we shouldn’t cache it until leapp runs?
Is the mistake that we shouldn’t cache it until leapp runs?
No, there are two mistakes here:
Elevate::Blockers::Distros::bail_out_on_inappropriate_distro()
. Since that sub is our primary gateway to determine if an OS is eligible to be upgraded, we should never allow a cache to be used there.I have now reworked this PR to add Elevate::OS::clear_cache()
and have bail_out_on_inappropriate_distro()
use that instead so that it does not need intimate knowledge of how Elevate::OS
works.
Case RE-249: Elevate did not detect the correct OS on a server that had been elevated and still had the staging file in place. This was due to the cached OS value still being present in the staging file. Due to this, elevate did not bail out as expected on an OS that was not eligible to be elevated.
Changelog: Ensure proper OS detection on servers that have been previously elevated
By submitting pull requests to this repo, I agree to the Contributor License Agreement which can be found at: https://github.com/cpanel/elevate/blob/main/docs/cPanel-CLA.pdf