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


#1

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

#2

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


#3

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.


#4

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


#5

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.


#6

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


#7

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


#8

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.


#9

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.