Warning, Could not calculate errata status, ensure host is registered and the katello-host-tools package is installed

Problem:
After going through the steps outlined in a registering a content host, these hosts all exist already and were not deployed with Foreman. When I click on the Hosts-All Hosts tab, I see that even though my systems registered okay they have this orange warning on them: Could not calculate errata status, ensure host is registered and the katello-host-tools package is installed

Expected outcome:
Expect to not see an error regarding the installation of the katello-host-tools, expect that it should show up green with no warning.

Foreman and Proxy versions:
Pulp, Dynflow, Ansible, SSH, Templates, TFTP, Puppet CA, Puppet, Logs, and HTTPBoot
1.22.0

Foreman and Proxy plugin versions:
foreman-tasks - 0.15.5
foreman_ansible - 3.0.2
foreman_remote_execution - 1.8.0
katello - 3.12.0

Other relevant data:
I only have these 2 hosts installed so far this is a new Foreman-Katello installation, before I roll this out to all my Linux hosts I need to get this cleared up.

I ran this command on the target hosts that are having issues. One host is a CentOS 6.9, the other is a CentOS 7.6.1810

rpm -qa | grep katello
katello-client-repos-3.8.1-1.el6.noarch
katello-agent-3.3.5-4.el6.noarch
katello-host-tools-3.3.5-4.el6.noarch
katello-host-tools-fact-plugin-3.3.5-4.el6.noarch
katello-ca-consumer-myservername.com-1.0-1.noarch

logs
1 Like

Hi,

is there any reason you opened a second thread for this topic after this one? As far as I can tell, this is the exact same problem (minus the mention of failing remote execution), just with some additional information.
In general, please do not open several topics for the same issue. This will likely cause confusion and lead to less efficient help. I would suggest though to keep this topic, since it is a little more focused and complete.

As I already asked in the other thread, can you please verify the following:

If the subscription information on the client are correct, it might be that Foreman is just missing a report.
Would you please try to check if a manual execution of katello-package-upload resolves the issue? Afaik, this should be done on a regular basis and on yum actions by itself, but please try triggering it manually.

Regards

Sorry about that, the topic had 2 different issues, want to keep them separate. Would like to keep this post, if you would be so kind as to remove the other.

So, when I do a subscription-manager status on the two hosts:

System Status Details
±------------------------------------------+
Overall Status: Current

But it does not show the organization.

I am using the content host bootstrap instructions within foreman, to add the hosts.

curl --insecure --output katello-ca-consumer-latest.noarch.rpm https://servername/pub/katello-ca-consumer-latest.noarch.rpmyum localinstall katello-ca-consumer-latest.noarch.rpm

subscription-manager register --org=“Default_Organization” --activationkey=“My Activation Key”

I see both of the servers in Content Hosts and they are green. In the All Hosts tab however they both have that warning.

Any help you could provide would be great. Thank you.

Ok, I understand. I cannot remove the other post, I am just a normal user like you :wink:

What you did looks correct to me.
Sorry if that has not been clear, but you should only see the Organisation and Lifecycle Information when calling subscription-manager identity. Sadly, the quote made that less obvious.
Have you tried running katello-package-upload? If so, what was the result?

Regards

Ooops, thought you were an admin in here. :wink:

Okay, so when I do subscription-manager identity it appears correct. These are the details for my organization.

system identity: cd4cdd07-d6e8-4aa4-acec-77649347fdb6
name: cd4cdd07-d6e8-4aa4-acec-77649347fdb6, QAIFAPPDEVEUM01
org name: Default Organization
org ID: Default_Organization
environment name: Non_Production/CentOS_6

When I run the katello-package-upload it just returns me to the prompt, it doesn’t display anything in my terminals, looks like it executes, and just returns me to a terminal prompt.

I understand, that is a typical mod/admin thing to say :wink:

Alright. katello-package-upload exiting without an error sounds good. But I assume it did not change the hosts status in Foreman, right?
If that changed the status: great :slight_smile:

If not, we have to search further:
In the subscription-manager identity output, the name looks off to me. I don’t know if this affects anything, but on our systems, there is always the FQDN.
I checked with our provisioning template, we call subscription-manager register with “–name=”<%= @host.name %>"" in the template.
This is just a wild guess, but could you try the following on one of your systems:

subscription-manager unregister
subscription-manager --org=“Default_Organization” --activationkey=“Your Activation Key” --name="Whatever your system is called in Foreman"
katello-package-upload

Then recheck the status in Foreman.

Regards

So when I un-register the system, and check my Foreman server, it does in fact un-register under content hosts, good.

And when I go into the all hosts tab that Warning disappears and turns green, no katello tools warning, etc…okay…

But after that when I run:

sudo subscription-manager register --org=Default_Organization --activationkey=CentOS_6_Non_Prod_Key --name=name.of.problem.host
The system has been registered with ID: 6d2c86b9-cce1-4261-8d3b-3ccb1d29a061

I am once again registered under content hosts and green…but then my status under ALL HOSTS is in a warning state with the same error:
Could not calculate errata status, ensure host is registered and the katello-host-tools package is installed

Have you tried running katello-package-upload afterwards once more?
Anyways, I’ll hopefully find time to setup a local test instance the next few days and see if I can replicate this.

Yes, I tried that and it does not change the status. Thanks for all of your help.

Since last we spoke, I have about 10 CentOS-7 and CentOS-6 VM’s added to the foreman-katello server, and even though they are all registered to the content host correctly, they all have the same error. It’s concerning because my company wants to add close to 700 CentOS VMs to Foreman…and I can’t seem to get this very crucial feature to work.

I wonder if I would have a similar problem with an older version of foreman-katello, like maybe go back one version to 3.11

Thank you in advance, for any help you can provide, I really appreciate it.

Hey,

just wanted to let you know I have not had the time to set up a working test environment and probably will not in the upcoming cuple of weeks.
As a last guess (if you have not solved this by yourself by now) I would guess that the solution to your other problem here might also solve this. Just found that thread and thought those toppics might be realted.

Regards

It looks like your clients are using a version of katello-host-tools from Katello 3.8

These pieces have since been moved to the foreman-client repository which for your Foreman version is https://yum.theforeman.org/client/1.22/

Can you try updating katello-host-tools on your client to use the above via the appropriate foreman-client-release RPM? That might fix the problem or at least make it easier to diagnose. See Foreman :: Plugin Manuals

Sorry for the late reply I was away for 2 weeks and just got back to work.

So I have about 150 CentOS 6, 6.5, and 7 hosts installed within Foreman and only 4 of them are actually not showing this error.

I ran some new katello client installs per the new Foreman Plugin client releases and I am still getting the same error. They show up as a content host but when I go to all hosts, 146 hosts say can’t calculate errata.

Here is the out put of one of my newly installed hosts of the katello host tools and agent.
rpm -qa | grep katello
katello-host-tools-fact-plugin-3.5.0-2.el7.noarch
katello-ca-consumer-somehost.com-1.0-1.noarch
katello-host-tools-3.5.0-2.el7.noarch
katello-agent-3.5.0-2.el7.noarch
katello-host-tools-tracer-3.5.0-2.el7.noarch

Can someone please give me some help with this? I have a demo of Foreman with my company in a week, and I would love for it to be actually connecting as it should.

What can I check on next? Please advice, thank you,

@lbetson It sounds like you don’t have any subscriptions and therefore no repositories available to your hosts. Have you synced any CentOS repositories into your Foreman/Katello and applied their subscriptions to your content hosts?

It looks like you registered with an Activation Key - so in your case you should have applied those subscriptions to your Activation Key before registering the client with it. You can always add subscriptions to your content hosts after registration.

1 Like

Yes, I have subscriptions. The problem I ran into was until I did a subscription-manager refresh on every host, it was not calculating the data. Working now. I just assumed after installing the katello host tools, agents, and subscribing to the proper content that it would do a check in that point. Thank you for your help.

1 Like