Content view not updating

Problem:

Switching the Lifecycle environment and Content View is not updated on the host.

# hammer host show --name <hostname> --fields ‘Content Information’
Content Information:
Content View:
Id: 5
Name: Base_RHEL8.4_CV <<<<<<<<
Lifecycle Environment:
Id: 10
Name: BUILD <<<<<<<<
Content Source:
Id: 1
Name:
Kickstart Repository:
Id:
Name:
Applicable Packages: 0
Upgradable Packages: 0
Applicable Errata:
Enhancement: 0
Bug Fix: 0
Security: 0

# grep baseurl /etc/yum.repos.d/redhat.repo
baseurl = https://<hostname>/pulp/content/CTSL/BUILD/Base_RHEL8_4_CV/content/dist/rhel8/8.4/x86_64/baseos/os
baseurl = https://<hostname>/pulp/content/CTSL/BUILD/Base_RHEL8_4_CV/content/dist/rhel8/8.4/x86_64/appstream/os

# hammer host show --name <hostname> --fields ‘Content Information’
Content Information:
Content View:
Id: 2
Name: Base_RHEL8.5_CV <<<<<<<<
Lifecycle Environment:
Id: 4
Name: TEST <<<<<<<<
Content Source:
Id: 1
Name: <hostname>
Kickstart Repository:
Id:
Name:
Applicable Packages: 0
Upgradable Packages: 0
Applicable Errata:
Enhancement: 0
Bug Fix: 0
Security: 0

# subscription-manager refresh
All local data refreshed

# grep baseurl /etc/yum.repos.d/redhat.repo
baseurl = https://<hostname>/pulp/content/CTSL/BUILD/Base_RHEL8_4_CV/content/dist/rhel8/8.5/x86_64/baseos/os
baseurl = https://<hostname>/pulp/content/CTSL/BUILD/Base_RHEL8_4_CV/content/dist/rhel8/8.5/x86_64/appstream/os

Expected outcome:

host should point at updated content view

Foreman and Proxy versions:

Foreman 3.4
Katello 4.6

Other relevant data:

This issue was found after upgrading foreman and katello from 3.1.3/4.3.1 thru 3.2/4.4, 3.3/4.5 to 3.4/4.6

1 Like

Also found that if i delete and re-register the host using the TEST lifecycle and Base_RHEL8.5_CV content view instead of BUILD and Base RHEL8.4_CV this works OK and the host has access to the 8.5 content view but again it cannot be changed successfully after registration.
The only thing that changes in the redhat.repo is the releasever field ie 8.4 or 8.5.

3.4/4.6 haven’t been released yet, thus, you’ll need to give a more precise version list. Is it nightly or a specific RC?

I assumed 3.4/4.6 was released as per the docs info…

# dnf list foreman katello
Updating Subscription Management repositories.
Last metadata expiration check: 2:09:29 ago on Thu 25 Aug 2022 12:02:37 BST.
Installed Packages
foreman.noarch 3.4.0-0.6.rc1.el8 @foreman
katello.noarch 4.6.0-0.5.rc1.el8 @katello

image

So it seems I have mistaken the release status of 3.4/4.6 and I guess the answer is to revert to 3.3/4.5?

Well, docs seems to be ahead of reality. I would also check Release Announcements - TheForeman

If you need the system and have a snapshot to revert to, you could do that.

If the issue isn’t affecting you too badly you could stick with the rc1 version and later upgrade to the release version.

Possibly, you have found an issue with the rc1. On the other hand, there were some issues with candlepin lately, so it may all be sort of the same problems.

Either way, your problem maybe of interest for the devs. I hope they’ll pick it up…

1 Like

OK thanks for your help I will test reverting to the previous release in the short term and no doubt these issues will be resolved by the time 3.4/4.6 is formally released. :slight_smile:

At least this was an issue of my own making and I have good backout option.

Katello 4.6 has a new version of Candlepin, 4.2, so it could be related. I’ve made an issue: Bug #35458: User report: host repo files are not updating when switching lifecycle environments or content views - Katello - Foreman

Thanks iballou, in the meantime i have reverted to 3.3/4.5 with no issue