Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2070808

Summary: Better document REX APIs for package actions, since katello-agent is going away
Product: Red Hat Satellite Reporter: Ganesh Payelkar <gpayelka>
Component: Remote ExecutionAssignee: Adam Lazik <alazik>
Status: CLOSED CURRENTRELEASE QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.10.4CC: ahumbe, alazik, apatel, aruzicka, fabian.seelbach, jlenz, thadzhie
Target Milestone: UnspecifiedKeywords: Documentation, Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-10-03 12:58:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ganesh Payelkar 2022-04-01 03:47:08 UTC
Description of problem:

Improve or add new API endpoints to use the REX functionality instead of katello-agent 


Version-Release number of selected component (if applicable):
satellite-6.10

How reproducible:
When using /api/hosts/:host_id/packages/

Steps to Reproduce:
1. Modify setting  remote_execution_by_default    | true
2. Use the "Curl" command to install package/errata  
3. This process use katello-agent 

Actual results:

PUT /api/hosts/:host_id/errata/apply DEPRECATED    Schedule errata for installation using katello-agent. NOTE: Katello-agent is deprecated and will be removed in a future release. Consider using remote execution instead.

PUT /api/hosts/:host_id/packages/install DEPRECATED    Install packages remotely using katello-agent. NOTE: Katello-agent is deprecated and will be removed in a future release. Consider using remote execution instead.

PUT /api/hosts/:host_id/packages/upgrade DEPRECATED    Update packages remotely using katello-agent. NOTE: Katello-agent is deprecated and will be removed in a future release. Consider using remote execution instead.

PUT /api/hosts/:host_id/packages/upgrade_all DEPRECATED    Update packages remotely using katello-agent. NOTE: Katello-agent is deprecated and will be removed in a future release. Consider using remote execution instead.

PUT /api/hosts/:host_id/packages/remove DEPRECATED    Uninstall packages remotely using katello-agent. NOTE: Katello-agent is deprecated and will be removed in a future release. Consider using remote execution instead.

PUT /api/hosts/bulk/install_content DEPRECATED    Install content on one or more hosts using katello-agent. NOTE: Katello-agent is deprecated and will be removed in a future release. Consider using remote execution instead.

PUT /api/hosts/bulk/update_content DEPRECATED    Update content on one or more hosts using katello-agent. NOTE: Katello-agent is deprecated and will be removed in a future release. Consider using remote execution instead.

PUT /api/hosts/bulk/remove_content DEPRECATED    Remove content on one or more hosts using katello-agent. NOTE: Katello-agent is deprecated and will be removed in a future release. Consider using remote execution instead.


Expected results:
either keep those Endpoints and migrate them to REX or introduce new Endpoints for REX like "/api/v2/katello/remote_execution".

Additional info:

Comment 2 Adam Ruzicka 2023-01-05 10:54:22 UTC
Do we need to really do anything here? There is the regular REX api (and hammer) which can be used to install/update/remove packages on one or many hosts

If we do anything about this, the changes should probably land in Katello.

Comment 3 Jeremy Lenz 2023-03-17 14:23:53 UTC
The REX job invocation API covers all of the use cases of these endpoints.

The corresponding hammer commands for remote execution are documented here: https://access.redhat.com/documentation/en-us/red_hat_satellite/6.12/html-single/managing_hosts/index#Migrating_From_Katello_Agent_to_Remote_Execution_managing-hosts

But the corresponding API endpoints and job templates aren't documented.

I can see improving the documentation. Each of these tasks can be accomplished with hammer CLI, API, or web UI (and also sometimes Ansible!), but the documentation is in several places and doesn't cover everything. (For instance, https://access.redhat.com/documentation/en-us/red_hat_satellite/6.12/html-single/managing_hosts/index#managing-packages_managing-hosts describes the web UI for managing packages on a single host, but doesn't cover CLI or API and doesn't cover bulk hosts.)  Perhaps organizing a doc section around accomplishing tasks would help.

Changing BZ title and component to reflect this.

Comment 5 Adam Lazik 2023-08-07 11:24:00 UTC
Hi! Currently preparing PR to include REX APIs in the docs.

Comment 6 Adam Lazik 2023-09-14 01:48:32 UTC
Link to PR: https://github.com/theforeman/foreman-documentation/pull/2430