Description of problem: As a user of Red Hat Satellite, there are times when a newer release (either a .y or .z release) is available which doesn't contain an errata for which the user has applied a hotfix for. If the user applies the latest erratum, the hotfix may be overwritten. This RFE requests an installer check to prevent the user from upgrading if there are hotfixes applied. Example Current Scenario: - user has version 6.2.7 applied. - due to a bug, user was issued a hotfix, with the proper errata slated for 6.2.9 - 6.2.8 is released. - If user upgrades to 6.2.8, they may inadvertently negate the effects of their hotfix. Example Ideal Scenario: - user has version 6.2.7 applied. - due to a bug, user was issued a hotfix, with the proper errata slated for 6.2.9 - 6.2.8 is released. - When user attempts upgrade to 6.2.8, the installer will check the installed RPMs and stop if any hotfix packages are installed. - The user would be presented with an option to override the installer (with a switch similar to --disable-system-checks) if needed
Note (and these are suggestions) - the upstream installer has the '--disable-system-checks This option will skip the system checks for memory. (default: false)' option, which could be leveraged for this. - this _could_ be implemented via foreman-maintain or the installer. 1) foreman-maintain health check --label hotfix-check 2) yum update 3) satellite-installer --upgrade.
Created redmine issue http://projects.theforeman.org/issues/25186 from this bug
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25186 has been resolved.
Verified @Satellite 6.6.0 snap 4 @rubygem-foreman_maintain-0.4.1-1.el7sat.noarch Steps: - applied a hotfix on satellite - modified file related to foreman - Run # foreman-maintain health check --label check-hotfix-installed Observation: - Foreman-maintain was able to detect modified files and installed hotfix on system # foreman-maintain health check --label check-hotfix-installed Running ForemanMaintain::Scenario::FilteredScenario ================================================================================ Check to verify if any hotfix installed on system: - Checking for presence of hotfix(es). It may take some time to verify. [WARNING] HOTFIX rpm(s) applied on this system: utils-1.0.0-1.HOTFIX.noarch Found 1 file(s) modified on this system. /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman_remote_execution-0.1.0/lib/hammer_cli_foreman_remote_execution/options/normalizers.rb *** WARNING: Before update make sure the updated packages contain the listed modifications *** otherwise these fixes will be lost. *** It is also recommended to backup the modified files prior update. -------------------------------------------------------------------------------- Scenario [ForemanMaintain::Scenario::FilteredScenario] failed. The following steps ended up in warning state: [check-hotfix-installed] The steps in warning state itself might not mean there is an error, but it should be reviews to ensure the behavior is expected Additional info: - The check 'check-hotfix-installed' only gives warning to user. - The installed hotfix package should have "HOTFIX" mentioned in it's release otherwise check won't work.(e.g. utils-1.0.0-1.HOTFIX.noarch)
Additional info: - If the system is subscribed using custom activation key, then 'check-hotfix-installed' will be skipped. # foreman-maintain health check --label check-hotfix-installed Running ForemanMaintain::Scenario::FilteredScenario ================================================================================ Check to verify if any hotfix installed on system: [SKIPPED] Your system is subscribed using custom activation key. Hotfixes can't be detected. --------------------------------------------------------------------------------
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:3181