Bug 1958674

Summary: Satellite upgrade to version 6.9 affects the host group configuration
Product: Red Hat Satellite Reporter: Dhananjay Pramod Mule <dmule>
Component: Hosts - ContentAssignee: Partha Aji <paji>
Status: CLOSED ERRATA QA Contact: Omkar Khatavkar <okhatavk>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.9.0CC: ahumbe, ajambhul, aperotti, egolov, inecas, kgaikwad, ktordeur, ldelouw, mmccune, momran, mschibli, paji, pmendezh, vijsingh, zhunting
Target Milestone: 6.9.2Keywords: PrioBumpGSS, Regression, Upgrades
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-3.18.1.29-1.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-14 20:50:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1399395    
Attachments:
Description Flags
tfm-rubygem-katello-3.18.1.29-1.2.el7sat.noarch.rpm none

Description Dhananjay Pramod Mule 2021-05-09 17:39:59 UTC
Description of problem:
upgrading the satellite to version 6.9.1  hostgroups configuration is affected.


Version-Release number of selected component (if applicable): satellite 6.9.1


How reproducible:
every-time


Steps to Reproduce:
1. Install satellite 6.8
2. Configure hostgroup which should have content view and lifecycle-environment 
3. upgrade satellite to version 6.9

Actual results:

Step                    results 
--------------------------------------------------------
2                      # hammer hostgroup info --id 1 
                       ....
                           ID:   1
                           Name: Default Organization View
                       Lifecycle Environment: 
                           ID:   1
                           Name: Library
                       Content Source:        
                           ID:   1
                           Name: dhcp130-213.gsslab.pnq2.redhat.com
                       Kickstart Repository:  
                           ID:   6
                           Name: 6
                       .....
--------------------------------------------------------
3                      # hammer hostgroup info --id 1 
                       ....
                           ID:   
                           Name: 
                       Lifecycle Environment: 
                           ID:   
                           Name: 
                       Content Source:        
                           ID:   
                           Name: 
                       Kickstart Repository:  
                           ID:   
                       .....
--------------------------------------------------------


Expected results:

At step 3 correct satellite should not affect the content view lifecycle environment for hostgroup 


Additional info:


Below error is reported in the /var/log/foreman/production.log on satellite server
~~~
/var/log/foreman/production.log:2021-05-08T15:01:11 [W|app|] Unable to save content facet hostgroup for #<Katello::Hostgroup::ContentFacet id: 1, hostgroup_id: 1, kickstart_repository_id: 6, content_source_id: 1, content_view_id: 1, lifecycle_environment_id: 1> 
/var/log/foreman/production.log-2021-05-08T15:01:11 [W|app|] The selected kickstart repository is not part of the assigned content view, lifecycle environment,
/var/log/foreman/production.log- |                   content source, operating system, and architecture
~~~

Comment 2 Partha Aji 2021-05-20 18:49:32 UTC
This looks like a duplicate of -> https://bugzilla.redhat.com/show_bug.cgi?id=1914014

Comment 3 Partha Aji 2021-05-20 19:05:42 UTC
Needs more investigation https://bugzilla.redhat.com/show_bug.cgi?id=1914014 was fixed in 6.9.0 and this issue is opened against 6.9.1.

Comment 6 Kenny Tordeurs 2021-05-21 13:34:12 UTC
*** Bug 1962127 has been marked as a duplicate of this bug. ***

Comment 10 Partha Aji 2021-05-26 00:42:31 UTC
Connecting redmine issue https://projects.theforeman.org/issues/32661 from this bug

Comment 12 Bryan Kearney 2021-05-28 10:19:57 UTC
Upstream bug assigned to paji

Comment 13 Bryan Kearney 2021-05-28 10:20:01 UTC
Upstream bug assigned to paji

Comment 14 Mike McCune 2021-05-29 15:11:27 UTC
not sure why this didn't get moved to POST, moving

Comment 18 Mike McCune 2021-06-04 22:07:49 UTC
*** Satellite 6.9.0, 6.9.1, 6.9.2 Hotfix Available ***

1) Download tfm-rubygem-katello-3.18.1.29-1.2.el7sat.noarch.rpm from this bugzilla to your Satellite

2) stop services:

satellite-maintain service stop

3) Install:

rpm -Uvh tfm-rubygem-katello-3.18.1.29-1.2.el7sat.noarch.rpm

4) restart:

satellite-maintain service start

5) Follow the KCS article here to restore Hostgroup Configurations:

https://access.redhat.com/solutions/6094551

Comment 19 Mike McCune 2021-06-04 22:08:58 UTC
Created attachment 1789029 [details]
tfm-rubygem-katello-3.18.1.29-1.2.el7sat.noarch.rpm

Comment 21 Omkar Khatavkar 2021-06-07 12:25:47 UTC
after upgrade in satellite to 6.9 from 6.8, able to fetch the satellite hostgroup info correctly     

[root@dhcp-2-44 ~]# rpm -q satellite --queryformat "%{VERSION}"
6.9.2.1


[root@dhcp-2-44 ~]# hammer hostgroup info --id 1 
Id:                    1
Name:                  basic-host-group
Title:                 basic-host-group
Puppet Environment:    production
Description:           
  basic-host-group
Network:               

Operating system:      
    Architecture:     x86_64
    Operating System: RedHat 7.9
    PXE Loader:       None
Puppetclasses:         

Parameters:            
    kt_activation_keys => activation_key1
Locations:             
    Default Location
Organizations:         
    Default Organization
OpenSCAP Proxy:        
Content View:          
    ID:   2
    Name: basic_content_view
Lifecycle Environment: 
    ID:   1
    Name: Library
Content Source:        
    ID:   1
    Name: <satellite >
Kickstart Repository:  
    ID:

Comment 25 errata-xmlrpc 2021-06-08 15:30:01 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 (Satellite 6.9.2.1 Async Bug Fix Update), 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-2021:2296

Comment 34 Bryan Kearney 2021-07-01 16:04:10 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/32661 has been resolved.