Centos 6 machines reporting issue

Problem: Our company has a list of sentos 6 hosts running legacy apps, We have a subscription to a repository where update packages are maintained. this repo is in foreman and synced and appear on the endpoint correctly when registration is completed.

However performing a refresh errata results in some cases results in execution failure. and in the case that it is successful you can see in the output that the repository has been added to the redhat.repo file on the endpoint.

in the content tab of the host under repository sets the repository is enabled. the repository itself shows over 2000 packages and 440 errata. when you perform a yum check-update you can see there are a number of packages that need updating. yet under the errata tab on the host entry it shows;

Unknown errata status

No installed packages and/or enabled repositories have been reported by subscription-manager.

this results in every centos 6 machine showing up in the interface with a yellow triangle.

Expected outcome:

Centos 6 machines should report back properly with errata data

Foreman and Proxy versions:

Foreman 3.18.1 & katello 4.20.1

Foreman and Proxy plugin versions:

foreman-tasks 11.1.1

foreman_ansible 17.0.5

foreman_puppet 9.1.0

foreman_remote_execution 16.5.3

katello 4.20.1

Distribution and version: Foreman Host is Oracle 9 and the endpoints with the issues are Centos 6

Other relevant data:

The centos 6 machines have to stay at the moment due to legacy applications.

1 Like

Hi,
CentOS 6 is EOL, and we no longer support it, so we can’t help you there.

Thanks and I have already raised that its end of life and not supported with the senior management and other team members but I have been told “well your going to have to find a way to make it just work” so I don’t really have any leigh way here.

Is there at least a way to stop it reporting these with the orange triangles?

Hi @btecpostmaster ,

It looks like your CentOS 6 host is not uploading a package profile to the Foreman server.

In your Foreman logs, shortly after you run a yum transaction, do you see something like:

Started PUT "/rhsm/consumers/71e302fd-9698-45fd-8828-130ab25b3459/profiles"

Or, are there errors in the logs?

Or, check if your host is configured to upload profiles. /etc/rhsm/rhsm.log should have items like:

   report_package_profile = [1]
   package_profile_on_trans = 1

I checked this on a CentOS 7 host, so perhaps double check in case the configuration options are different on CentOS 6’s version of subscription-manager.

Another thing to check is if you have a file for /var/lib/rhsm/cache/profile.json and if it’s up to date on the CentOS 6 machine.

Is there at least a way to stop it reporting these with the orange triangles?

We do have a feature in the host’s details UI to ignore certain host statuses, but it will likely come back when the host reports back in. Let’s try to debug why the package profile isn’t making it first.


By the way, I’m not certain it would be an issue here, but another thing to consider is that CentOS 6 relies on SHA-1 while CentOS 9 restricts its use by default.

If you just want the yellow triangle to go away just do a HTTP DELETE call against /api/hosts/:id/status/errata

Doc here:

or check /apidoc of your instance.

As @iballou said, it will come back next time the host send reports so you may need to do it regularly.

I think this is your issue, as @iballou points out.

You can use insecure crypto. See https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/security_hardening/using-the-system-wide-cryptographic-policies_security-hardening for more. You’ll want the LEGACY profile:

update-crypto-policies --set LEGACY

I am not sure that sub-man reports package profiles in EL6. You may need to install katello-host-tools on the hosts to get package profile uploads via katello-upload-profile (is that even still available!?)