Bug 2027968

Summary: A failed CV promote during publish or repo sync causes ISE
Product: Red Hat Satellite Reporter: Stephen Wadeley <swadeley>
Component: RepositoriesAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: Stephen Wadeley <swadeley>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.10.1CC: ahumbe, ehelms, jsherril
Target Milestone: 6.11.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-4.3.0.15-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-07-05 14:30:33 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 Stephen Wadeley 2021-12-01 07:31:56 UTC
Description of problem:

While running a test, setting up tools repo failed because setup procedure did not wait for CV to be published before attempting to promote it:


ForemanTasks::Lock::LockConflict: Required lock is already taken by other running tasks.
Please inspect their state, fix their errors and resume them.

Conflicts with tasks:
- https://<test_host>.redhat.com/foreman_tasks/tasks/b75e5863-55f3-49b7-9c88-d27d459aef0e

this is understandable, its a side effect of recent changes in task info [1] , setup procedure no longer has a task ID to poll for completion,

but then this error was also seen:

500 Server Error: Internal Server Error for url <redacted>/katello/api/v2/repositories/177/sync


Version-Release number of selected component (if applicable):
~]# rpm -q satellite
satellite-6.10.1-2.el7sat.noarch


How reproducible:
Test fails every time but not sure about the ISE, I run again on new install to get cleaner logs if required.

Steps to Reproduce:
1. Run a test that use API to set up tools repo, but does not wait for Foreman Task completion between steps.


Actual results:
ISE

Expected results:
no ISE


Additional info:

[1]
Bug 2017533 - API call to generate applicability does not return task info

Comment 2 Justin Sherrill 2022-02-15 19:58:33 UTC
Stephen, to be clear, you'd expect a 400 Bad Request?

Comment 3 Stephen Wadeley 2022-02-15 20:30:43 UTC
(In reply to Justin Sherrill from comment #2)
> Stephen, to be clear, you'd expect a 400 Bad Request?

Hi Justin

that would be better than an ISE

Would it be possible to give some clue that the request is just invalid at that time rather than bad?

503 Service Unavailable ?

Most of the HTTP error codes seem to have very precise meanings.

For this bug 400 Bad Request is OK, 503 Service Unavailable with some clue as to the reason is RFE.


Thank you

Comment 4 Justin Sherrill 2022-03-25 15:25:00 UTC
Created redmine issue https://projects.theforeman.org/issues/34680 from this bug

Comment 5 Bryan Kearney 2022-03-25 16:04:31 UTC
Upstream bug assigned to jsherril

Comment 6 Bryan Kearney 2022-03-25 16:04:33 UTC
Upstream bug assigned to jsherril

Comment 7 Bryan Kearney 2022-03-28 20:04:33 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/34680 has been resolved.

Comment 12 errata-xmlrpc 2022-07-05 14:30:33 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: Satellite 6.11 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:5498