Description of problem: When host gets assigned different lifecycle environment or content view, via hammer or webui, values in hosts table of foreman db are not updated. Values gets updated properly in cp_pool and in katello_systems, but than there are different values for tested host in hosts and katello_systems and cp_pool (in candlepin db) tables Version-Release number of selected component (if applicable): 6.2.10 How reproducible: 100% Steps to Reproduce: 1. provision a host 2. check values in foreman database foreman=# select content_view_id,lifecycle_environment_id from hosts where name='snemeth-hosttable-test.sysmgmt.lan'; -[ RECORD 1 ]------------+-- content_view_id | 1 lifecycle_environment_id | 1 3.change lifecycle environment and content view in webui or using hammer 4. verify hosts table entry in db. Actual results: hosts table not updated katello_systems and cp_pool updated as expected. Expected results: update hosts table as well. Additional info:
Created redmine issue http://projects.theforeman.org/issues/20581 from this bug
Upstream bug assigned to bbuckingham
This appears to be working properly on internal Satellite 6.3 SNAP 14 : satellite-6.3.0-17.0.beta.el7sat.noarch, tfm-rubygem-katello-3.4.5-1.el7sat.noarch For a content host, changed the lifecycle environment and content view several times using the UI and in each case, it was updated correctly in the database. With satellite 6.3, the database table and attributes to monitor are: select content_view_id,lifecycle_environment_id from katello_content_facets; Moving the bugzilla forward for inclusion in next round of ON_QA.
VERIFIED Version Tested: Satellite-6.3 Snap 15 # rpm -qa| grep tfm-rubygem-katello tfm-rubygem-katello_ostree-3.4.5.1-1.el7sat.noarch tfm-rubygem-katello-3.4.5.1-1.el7sat.noarch steps: # hammer lifecycle-environment list ---|---------|-------- ID | NAME | PRIOR ---|---------|-------- 2 | DEV | Library 1 | Library | 4 | PROD | QE 3 | QE | DEV ---|---------|-------- # hammer content-view list ----------------|---------------------------|---------------------------|-----------|---------------------|--------------- CONTENT VIEW ID | NAME | LABEL | COMPOSITE | LAST PUBLISHED | REPOSITORY IDS ----------------|---------------------------|---------------------------|-----------|---------------------|--------------- 4 | Capsule RHEL 7 CV | Capsule_RHEL_7_CV | | 2017/09/10 07:58:21 | 6, 3, 7 1 | Default Organization View | Default_Organization_View | | 2017/09/10 06:11:00 | 3 | RHEL 6 CV | RHEL_6_CV | | 2017/09/10 07:46:36 | 2, 4, 5 2 | RHEL 7 CV | RHEL_7_CV | | 2017/09/10 07:39:35 | 6, 1, 3 ----------------|---------------------------|---------------------------|-----------|---------------------|------------ # hammer host info --id 2 | grep "Lifecycle Environment\|Content View" Content View: RHEL 7 CV Lifecycle Environment: DEV foreman=# select content_view_id,lifecycle_environment_id from katello_content_facets; content_view_id | lifecycle_environment_id -----------------+-------------------------- 2 | 2 (1 row) # hammer host update --id=2 --content-view="RHEL 6 CV" Host updated foreman=# select content_view_id,lifecycle_environment_id from katello_content_facets; content_view_id | lifecycle_environment_id -----------------+-------------------------- 3 | 2 (1 row) # hammer host update --id=2 --lifecycle-environment="QE" Host updated foreman=# select content_view_id,lifecycle_environment_id from katello_content_facets; content_view_id | lifecycle_environment_id -----------------+-------------------------- 3 | 3 # hammer host update --id=2 --lifecycle-environment="DEV" --content-view="RHEL 7 CV" Host updated foreman=# select content_view_id,lifecycle_environment_id from katello_content_facets; content_view_id | lifecycle_environment_id -----------------+-------------------------- 2 | 2 (1 row) Successfully updates entries in database.
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/RHSA-2018:0336