Bug 2157869

Summary: Satellite is not able to pick settings which transitioned from a non-default to default value
Product: Red Hat Satellite Reporter: Adam Ruzicka <aruzicka>
Component: SettingsAssignee: Adam Ruzicka <aruzicka>
Status: CLOSED ERRATA QA Contact: Ron Lavi <rlavi>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.11.4CC: apatel, jrichards2, jsenkyri, mhulan, pcreech, rlavi, torkil, visawant, wclark, zhunting
Target Milestone: 6.13.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: foreman-3.5.1.4-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-03 13:24:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Adam Ruzicka 2023-01-03 10:26:42 UTC
This bug was initially created as a copy of Bug #2154184

Satellite is not able to detect when a setting changes from a non-default to
default value and if such a change happens, it continues using the non-default
one until services are restarted. This affects all releases from 6.11 onwards.

Steps to reproduce:
1) Run rails console
2) Pick a $setting without custom value
3) Read a value of $setting with Setting[$setting]
4) In another process, change the value of $setting to a non-default one
5) Reload the settings with Foreman.settings.load_values
6) Repeat 3, notice the value is what was set in 4
6) In another process, change the value of $setting to the default one
7) Repeat 5
8) Repeat 3

Actual results:
The value in 8 is the same as in 6

Expected results:
The value in 8 is the same as in 3

Comment 1 Bryan Kearney 2023-01-04 16:03:35 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/35894 has been resolved.

Comment 8 Ron Lavi 2023-02-27 14:40:28 UTC
Verified.
Version Tested: Satellite 6.13 Snap 11.0

Verification steps:
1) Run rails console
2) Pick a $setting without custom value                                        ==> picked 'allow_auto_inventory_upload'
3) Read a value of $setting with Setting[$setting]                             ==> true
4) In another process, change the value of $setting to a non-default one       ==> setting to false
5) Reload the settings with Foreman.settings.load_values                       ==> running Foreman.settings.load_values
6a) Repeat 3, notice the value is what was set in 4                            ==> it is false indeed
6b) In another process, change the value of $setting to the default one        ==> moved it back to true
7) Repeat 5                                                                    ==> running Foreman.settings.load_values
8) Repeat 3                                                                    ==> true

and got the expected result: The value in 8 is the same as in 3 (true)

Comment 10 nalfassi 2023-03-05 13:02:38 UTC
*** Bug 2142803 has been marked as a duplicate of this bug. ***

Comment 11 Adam Ruzicka 2023-04-12 08:08:50 UTC
*** Bug 2185964 has been marked as a duplicate of this bug. ***

Comment 14 errata-xmlrpc 2023-05-03 13:24:04 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 (Important: Satellite 6.13 Release), 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/RHSA-2023:2097

Comment 16 wclark 2023-06-20 13:04:50 UTC
A hotfix RPM is available for Satellite 6.12.4. It is too large to be provided as a bugzilla attachment; please open a case with Red Hat Support to request the hotfix RPM if you require it.