Bug 1463383 - [RFE] Satellite installer should not run on systems which have hotfixes applied
Summary: [RFE] Satellite installer should not run on systems which have hotfixes applied
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Satellite Maintain
Version: 6.2.9
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 6.6.0
Assignee: Kavita
QA Contact: Jameer Pathan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-20 17:47 UTC by Rich Jerrido
Modified: 2020-09-10 10:44 UTC (History)
10 users (show)

Fixed In Version: rubygem-foreman_maintain-0.4.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-22 16:36:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 25186 0 Normal Closed Satellite installer should not run on systems which have hotfixes applied 2021-02-10 21:45:59 UTC
Red Hat Product Errata RHBA-2019:3181 0 None None None 2019-10-22 16:37:00 UTC

Description Rich Jerrido 2017-06-20 17:47:32 UTC
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

Comment 1 Rich Jerrido 2017-06-20 17:58:10 UTC
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.

Comment 2 Kavita 2018-10-12 07:11:58 UTC
Created redmine issue http://projects.theforeman.org/issues/25186 from this bug

Comment 3 Bryan Kearney 2019-01-15 09:08:32 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25186 has been resolved.

Comment 4 Bryan Kearney 2019-01-15 09:09:20 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25186 has been resolved.

Comment 5 Bryan Kearney 2019-01-15 09:10:26 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25186 has been resolved.

Comment 6 Bryan Kearney 2019-01-15 09:11:23 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25186 has been resolved.

Comment 7 Bryan Kearney 2019-01-15 09:12:20 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25186 has been resolved.

Comment 8 Bryan Kearney 2019-01-15 09:13:29 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25186 has been resolved.

Comment 9 Bryan Kearney 2019-01-15 09:14:22 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25186 has been resolved.

Comment 10 Bryan Kearney 2019-01-15 09:15:31 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25186 has been resolved.

Comment 11 Bryan Kearney 2019-01-15 09:16:43 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25186 has been resolved.

Comment 13 Jameer Pathan 2019-05-30 10:13:59 UTC
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)

Comment 14 Jameer Pathan 2019-05-30 10:19:38 UTC
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.
--------------------------------------------------------------------------------

Comment 17 errata-xmlrpc 2019-10-22 16:36:54 UTC
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


Note You need to log in before you can comment on or make changes to this bug.