Project

General

Profile

Actions

Bug #38546

closed

Async Repository::CapsuleSync tasks that don't find any relevant proxies to sync sometimes end up in failing state

Added by Quirin Pamp about 1 year ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:

Description

This is not systematically reproducible, but we have seen it happen on different systems using various Katello versions.

It only appears to affect the Repository::CapsuleSync action when the following conditions are met:

  1. The action is planned as an async task (using ForemanTasks.async_task)
  2. The repo in question is associated with an environment not used by any proxy (the action is essentially a noop).

The symptoms are:

  • The dynflow task reports success on all steps almost instantly.
  • The foreman task does not update to result=success, it stays in pending for ages and eventually (at latest after restarting Foreman) reports result=error.

Since the task was not actually meant to do anything, nothing is actually broken, but users are confused by the failed tasks.

I have no idea what exactly is causing this, some possible ideas:

  • Starting several Repository::CapsuleSync tasks in close proximity.
  • Perhaps something with resource locks?
  • Perhaps it is a problem that the task does almost nothing and finishes to quickly?

Proposed fix:

It is relatively simple to check if there are any smart proxies using the relevant environment and making the ForemanTasks.async_task call conditional on this.
This way we don't run the unneeded noop async tasks at all.
This fixes the issue regardless of the underlying cause and has the added benefit of having less useless tasks in the task list.


Related issues 1 (0 open1 closed)

Related to Katello - Feature #38477: Extend rolling content views to arbitrary lifecycle environmentsClosedQuirin PampActions
Actions #1

Updated by The Foreman Bot about 1 year ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/11433 added
Actions #2

Updated by The Foreman Bot about 1 year ago

  • Pull request https://github.com/Katello/katello/pull/11407 added
Actions #3

Updated by Sam Bible about 1 year ago

  • Triaged changed from No to Yes
  • Red Hat JIRA set to SAT-35661
Actions #4

Updated by Quirin Pamp 12 months ago

  • Related to Feature #38477: Extend rolling content views to arbitrary lifecycle environments added
Actions #5

Updated by The Foreman Bot 11 months ago

  • Fixed in Releases Katello 4.18.0 added
Actions #6

Updated by Quirin Pamp 11 months ago

  • Status changed from Ready For Testing to Closed
Actions #7

Updated by Ian Ballou 8 months ago

  • Target version changed from Katello 4.19.0 to Katello 4.17.2
Actions #8

Updated by The Foreman Bot 8 months ago

  • Pull request https://github.com/Katello/katello/pull/11582 added
Actions

Also available in: Atom PDF