Hi all,
I am using foreman 1.16 with katello 3.5.0 to manage centos7 hosts.
I have deployed this script to insert the CentOS errata information into katello and this is working ok. I can see the available errata, apply it…etc
The problem I have is that for each new deployed server when the server appears in hosts >> all hosts
it says:
Errata Could not calculate errata status, ensure host is registered and katello-agent is installed
For the same server, when I go to hosts >> content hosts
it says
Subscription Status Fully entitled
Katello Agent Installed
I have double checked that goferd daemon is running in the machine and I can use the foreman webui to install new rpms to the centos server.
The only way I found to workaround the issue is going in the webui to hosts >> content hosts >> hostname >> errata >> recalculate
. After I trigger the errata recalculate from the webui the issue is fixed but this doesn’t seem a proper solution for all our hosts.
Trying to find a solution which allows me to trigger the errata recalculation in an automated way I have tried to execute katello-tracer-upload
, katello-package-upload
and subscription-manager refresh
in the centos server running the katello agent but this doesn’t fix the problem.
This is what I get in /var/log/foreman/production.log
in the foreman server when I execute katello-tracer-upload
in the client:
2018-03-02 20:00:10 ac35f9c3 [app] [I] Started GET "/rhsm/" for 10.41.229.54 at 2018-03-02 20:00:10 +0100
2018-03-02 20:00:10 ac35f9c3 [app] [I] Processing by Katello::Api::V2::RootController#rhsm_resource_list as JSON
2018-03-02 20:00:10 ac35f9c3 [app] [I] Parameters: {"root"=>{}}
2018-03-02 20:00:10 ac35f9c3 [app] [I] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.5.0.1/app/views/katello/api/v2/root/resource_list.json.rabl within katello/api/v2/layouts/collection (1.6ms)
2018-03-02 20:00:10 ac35f9c3 [app] [I] Completed 200 OK in 18ms (Views: 9.7ms | ActiveRecord: 0.0ms)
This is what I get in /var/log/foreman/production.log
in the foreman server when I execute katello-package-upload
in the client:
2018-03-02 20:01:32 0781717c [app] [I] Started GET "/rhsm/" for 10.41.229.54 at 2018-03-02 20:01:32 +0100
2018-03-02 20:01:32 0781717c [app] [I] Processing by Katello::Api::V2::RootController#rhsm_resource_list as JSON
2018-03-02 20:01:32 0781717c [app] [I] Parameters: {"root"=>{}}
2018-03-02 20:01:32 0781717c [app] [I] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.5.0.1/app/views/katello/api/v2/root/resource_list.json.rabl within katello/api/v2/layouts/collection (1.4ms)
2018-03-02 20:01:32 0781717c [app] [I] Completed 200 OK in 10ms (Views: 2.2ms | ActiveRecord: 0.0ms)
This is what I get in /var/log/foreman/production.log
in the foreman server when I execute subscription-manager refresh
in the client:
2018-03-02 20:03:54 c0760d2c [app] [I] Started PUT "/rhsm/consumers/9ea34f57-8c2d-4f0d-8fbe-583f157fb316/certificates?lazy_regen=true" for 10.41.229.54 at 2018-03-02 20:03:54 +0100
2018-03-02 20:03:54 c0760d2c [app] [I] Processing by Katello::Api::Rhsm::CandlepinProxiesController#put as JSON
2018-03-02 20:03:54 c0760d2c [app] [I] Parameters: {"lazy_regen"=>"true", "id"=>"9ea34f57-8c2d-4f0d-8fbe-583f157fb316"}
2018-03-02 20:03:54 c0760d2c [app] [I] Current user: 9ea34f57-8c2d-4f0d-8fbe-583f157fb316 (regular user)
2018-03-02 20:03:54 c0760d2c [app] [I] Completed 200 OK in 50ms (Views: 0.3ms | ActiveRecord: 0.8ms)
None of these solves the issue. I have checked in monitor >> tasks
in the foreman webui that there are no pending or failed tasks.
I have also checked if the hammer cli provides any option to trigger the errata recalculation but it only allows hammer erratum info
and hammer erratum list
Is there any way I can automate the errata recalculation in a regular basis for all my content hosts without going to the webui?
Thanks in advance for any help or suggestion.