Bug #21703
allow system registrations to happen without waiting on tasks to complete
Description
Currently, system registrations will create a task and then wait for that task to complete before the API call returns. This works in most circumstances, but there is no task completion time guarantee. If a system is heavily loaded with tasks, system registrations may fail since subscription-manager may time out.
The parts of system registration that need to be done before the API call returns should not be done via a task. Unregistrations will need to be handled in the same way, since users may expect a subscription to be freed immediately upon unregistration.
Associated revisions
Refs #21703 - remove registration tasks
`Host::Register` tasks have been removed as part of
https://github.com/Katello/katello/pull/7082.
This change adds a step to remove all tasks with label
`Actions::Katello::Host::Register`. Without this, already-executed tasks will
show as blank in the web UI.
History
#1
Updated by The Foreman Bot over 4 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/Katello/katello/pull/7082 added
#2
Updated by Justin Sherrill over 4 years ago
- Legacy Backlogs Release (now unused) set to 284
#3
Updated by The Foreman Bot over 4 years ago
- Pull request https://github.com/Katello/katello-installer/pull/578 added
#4
Updated by Chris Duryee over 4 years ago
- % Done changed from 0 to 100
- Status changed from Ready For Testing to Closed
Applied in changeset katello|cd11688ac6acc70b18a87c112ad7604997de9b4c.
#5
Updated by The Foreman Bot over 4 years ago
- Pull request https://github.com/Katello/katello-installer/pull/596 added
Fixes #21703 - register systems immediately
Previously, when a system registration API call came in, a task would
be created. Once the task was complete, the API call would return.
This caused issues when there were lots of tasks in the task queue.
There is no guarantee that a task will be complete by a certain time,
but the API call is holding a passenger process and waiting for the
task to complete.
Instead, perform the registration immediately and do not create a
registration task. Unregister has also been refactored to execute
immediately, since users may expect subscriptions to be immediately
available if they do an unregister and then register.