Bug #21703

allow system registrations to happen without waiting on tasks to complete

Added by Chris Duryee almost 4 years ago. Updated about 3 years ago.

Target version:


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

Revision cd11688a (diff)
Added by Chris Duryee over 3 years ago

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.

Revision f113791d (diff)
Added by Chris Duryee over 3 years ago

Refs #21703 - remove registration tasks

`Host::Register` tasks have been removed as part of

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.


#1 Updated by The Foreman Bot almost 4 years ago

  • Status changed from New to Ready For Testing
  • Pull request added

#2 Updated by Justin Sherrill almost 4 years ago

  • Legacy Backlogs Release (now unused) set to 284

#3 Updated by The Foreman Bot over 3 years ago

  • Pull request added

#4 Updated by Chris Duryee over 3 years ago

  • % Done changed from 0 to 100
  • Status changed from Ready For Testing to Closed

#5 Updated by The Foreman Bot over 3 years ago

  • Pull request added

Also available in: Atom PDF