Migration from katello agent to Remote Execution (still no packages/errata)

Problem:
I originally installed foreman/katello without remote execution plugin but then found that for CentOS8 clients there was not agent one could install after subscribing. I then installed the remote execution plugin using “foreman-installer --enable-foreman-plugin-remote-execution --enable-foreman-proxy-plugin-remote-execution-ssh” and setting up ~foreman-proxy/.ssh and enabling in Infrastructure -> Smart Proxies so SSH shows

I can run remote jobs on the clients just fine. But the work usually done by katello agent does not appear to be done now by remote execution. If you go to a hosts page its status is “Warning”, configuration is “No reports” and Errata says “Could not calculate errata status, ensure host is registered and the katello-host-tools package is installed”

If I go into Content -> Packages -> Installed for the host, it says:

Katello-agent is deprecated and will be removed in Katello 4.0. Consider migrating to Remote Execution.

If you are not using Remote Execution to manage content on this host, ensure that it has the katello-agent package installed.

The host has not reported any installed packages, registering with subscription-manager should cause these to be reported.

Expected outcome:
Katello should be using Remote Execution to get reports and packages status

Foreman and Proxy versions:
foreman-2.0.0-2.el7.noarch
katello-3.15.0.1-1.el7.noarch
tfm-rubygem-smart_proxy_remote_execution_ssh-0.2.1-4.fm2_0.el7.noarch
tfm-rubygem-smart_proxy_pulp-2.0.0-2.fm2_0.el7.noarch
tfm-rubygem-smart_proxy_dynflow_core-0.2.4-2.fm2_0.el7.noarch
tfm-rubygem-smart_proxy_dynflow-0.2.4-3.fm2_0.el7.noarch

Foreman and Proxy plugin versions:

Distribution and version:
Server on CentOS Linux release 7.8.2003

Package upload has nothing to do with remote execution. It happens with dnf/yum plugins.

Run dnf uploadprofile. That should force an upload.

I ran that on the client. It changed nothing.

But you did install katello-host-tools and maybe also katello-host-tools-tracer?

Yes, both are installed
# rpm -qa | grep katello
katello-ca-consumer-foreman.nmr.mgh.harvard.edu-1.0-1.noarch
katello-host-tools-3.5.3-1.el8.noarch
katello-host-tools-tracer-3.5.3-1.el8.noarch

The tracer seems happy. Registration seems fine or maybe not

# subscription-manager register --force --org=MyOrg --activationkey=centos8_dev
Unregistering from: foreman.my.org:443/rhsm
The system with UUID 3eb7d97f-5b4c-4834-83d7-a33fc860991b has been unregistered
All local data removed
The system has been registered with ID: ad1f864a-c270-42ec-a566-763d95766f40
The registered system name is: c8test.my.org
No products installed.

Why does it say “No products installed”? Running ‘dnf clean all’ and then ‘dnf update’ definite shows it going to the repos on foreman.

What is the exact output of dnf uploadprofile. Do you see a matching task running in foreman?

If you (re)install a package, is it “Uploading Tracer Profile”?

# dnf uploadprofile
Updating Subscription Management repositories.
Package profile updates
        status: 1
        updates: []
        exceptions:

Yes, I see a line saying “Uploading Tracer Profile” when I do a dnf reinstall

Is the foreman task running for the uploadprofile?

Yes, on foreman during the ‘dnf uploadprofile’ I see:

`   # hammer task list --search "state = running and result = pending"
    -------------------------------------|---------------------------------------------------------|---------|---------|---------------------|----------|---------------|------------
    ID                                   | ACTION                                                  | STATE   | RESULT  | STARTED AT          | ENDED AT | OWNER         | TASK ERRORS
    -------------------------------------|---------------------------------------------------------|---------|---------|---------------------|----------|---------------|------------

    2a4d34eb-4253-4fdf-a118-b6565e0fb9a1 | Combined Profile Update for c8test.nmr.mgh.harvard.edu  | running | pending | 2020/06/02 15:25:17 |          | foreman_admin |
    -------------------------------------|---------------------------------------------------------|---------|---------|---------------------|----------|---------------|------------`

@Jonathon_Turel can provide more clarity here

I believe on EL8 that subscription-manager provides the necessary pieces to handle the two aspects of errata and package listing that are needed:

  • package profile upload
  • enabled repositories upload

The former should be all that is needed to see installed packages. The latter, with attached repositories through subscriptions, allows calculation of applicable errata.

That’s right! I recently talked about these finer details with the most relevant aspect being:

If you’re running the latest subscription-manager on your CentOS 7 (or 8) hosts then katello-host-tools is not required at all unless you are using katello-agent instead of REX. (or Tracer)

All of this said, we’re aware of some issues around errata applicability:
One was fixed in 3.15.1: (https://projects.theforeman.org/issues/2948
Another fix is coming in 3.15.2 and later: Bug #29961: Actions::Katello::Host::UploadProfiles failing at upload_modules_to_pulp - Katello - Foreman.

I think @paulraines68 experiencing the former, so I recommend updating to 3.15.1 and checking. Let us know how it goes.

By the look (and age) of issue 2948 I think you’ve mentioned the wrong issue? I tried 29948 and 28948 and neither of those looked to be it…

I updated to 3.15.1 then ran “foreman-installer” and restarted httpd. On the client I did another 'dnf uploadprofile".

On the main page for the client host the Errata status now says “All errata applied”. Configuration still says “No reports” so the overal status is still “Warning”.

If I go to Content->Packages->Installed it does list the packages installed now but at the top of the page it still gives the warning “Katello-agent is deprecated and will be removed in Katello 4.0. Consider migrating to Remote Execution.”

That’s just a message telling that katello-agent is deprecated. It’s not a warning and it doesn’t mean anything if you don’t use katello-agent…

Now that you’ve got the installed packages showing and errata status shown as ‘All errata applied’ I think you’re in good shape - upgrading fixed that issue.

Sorry. Copy+Paste fail. I meant to link this one: Bug #29488: Applicable errata not showing up for module stream errata - Katello - Foreman and accidentally dropped the final ‘8’

I’ve read a few posts on this topic and I need some clarity as I’m new to this. I’m performing a fresh install of Foreman.

  1. I do not need the katello-agent on the content hosts. Remote execution can be used for everything that the katello-agent used to provide. Is this correct?

  2. Do I still need the katello-host-tools on the content hosts?

  3. Do I need to install the Katello plugin on the Foreman server itself? Or do I just install the Remote Execution plugin?

Saurabh

Yes. Both are ways to execute scripts or commands on the remote host. katello-agent is deprecated.

katello-host-tools contains the applications and yum plugins to upload the enabled repositories and the currently installed packages to the katello/foreman server. Thus, for central content management from the katello/foreman server you’ll want that.

The katello plugin is the plugin which adds the whole content management to the foreman server. Unless you want to do content management in other ways you’ll need the plugin.

Thank you so much for the clarification and quick response.

Saurabh