What’s happening
Katello has a number of APIs which perform actions against content hosts using the katello agent exclusively. Knowing that the agent will be removed in just a few release (3-5) after the REX equivalent is in production it’s time to consider the best path forward for our existing agent-focused APIs and hammer commands that use them.
Katello APIs affected
- /api/v2/hosts/:host_id/packages/{install,upgrade,upgrade_all,remove}
- /api/v2/hosts/:host_id/errata/apply
- /api/v2/hosts/bulk/{install_content, update_content, remove_content}
Hammer commands affected
- hammer host package {install,remove,upgrade,upgrade-all}
- hammer host package-group {install,remove}
- hammer host errata apply
- hammer host-collection erratum install
- hammer host-collection package {install,remove,update}
- hammer host-collection package-group {install,remove,update}
Options
There may be other options but these are some of the obvious ones the team discussed.
Option 1: Formally deprecate the existing agent-specific APIs and Hammer commands
This implies that users will fully migrate away from the above APIs/commands and choose their preferred REX method to update hosts content.
Pros
- a lot less code to maintain and update to support both REX and Agent in short and long term
Cons
- Potential user pain in migrating (ie “How do I translate the old command into a
hammer job-invocation
?”). Perhaps an opportunity to rename the job-invocation command or improve the UX around using job-invocations from the CLI.
Option 2: Deprecate APIs, Preserve Hammer commands and proxy to REX
Simplify our API by removing the server side of the existing hammer commands and re-implement them to use REX.
Pros
- Commands remain consistent from today through to a future when the agent is removed and REX is the only option
Cons
- Multiple interfaces to perform REX actions.
- Supporting n REX mechanisms implies updating a number of APIs and hammer commands into the future
- sprawl of package / errata related commands in general
Option 3: Keep existing APIs and Hammer commands, re-implement Katello APIs to use REX
Pros
- Virtually no change as far as the user is concerned
Cons
- Basically the same as Option 2
Let us know what you think about these options not limited to: technical hurdles, how the user experience might be affected, long term vs short term considerations, and feel free to share tweaks and entirely new options not listed! Thanks for taking the time to read and provide feedback.
Redmine Tracker
Tracker has been created with respect to Option 1
and the actions mentioned in this thread: Tracker #32155: Deprecate agent-based APIs and Hammer commands - Katello - Foreman