Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2054165 - After satellite-change-hostname, foreman tasks acquired lock error still refers to URL of old hostname
Summary: After satellite-change-hostname, foreman tasks acquired lock error still refe...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: satellite-change-hostname
Version: 6.11.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: 6.11.0
Assignee: satellite6-bugs
QA Contact: Peter Ondrejka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-14 10:46 UTC by Pavel Moravec
Modified: 2022-07-05 14:33 UTC (History)
2 users (show)

Fixed In Version: foreman-3.1.1.5-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-07-05 14:33:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2022:5498 0 None None None 2022-07-05 14:33:29 UTC

Description Pavel Moravec 2022-02-14 10:46:26 UTC
Description of problem:
Running satellite-change-hostname forgets to update one old hostname reference.

When a task fails to be executed due to an acquired lock, an error like:

Could not synchronize the repository:
  Required lock is already taken by other running tasks.
  Please inspect their state, fix their errors and resume them.
  
  Conflicts with tasks:
  - https://old.hostname.com/foreman_tasks/tasks/bc2cb786-21d5-4c24-b7f6-33048ea1032a

is raised, pointing to the *old* FQDN.

Replacing the FQDN to a current one shows proper task (that acquired the lock), so it is just somewhere in foreman-tasks that still points to the old FQDN.


Version-Release number of selected component (if applicable):
Sat 7.0 snap 9


How reproducible:
100%


Steps to Reproduce:
1. satellite-change-hostname new-satellite.redhat.com
2. For a (bigger) repo with a feed URL, invoke its sync twice concurrently:

hammer repository synchronize --organization-id 1 --async --id 4
hammer repository synchronize --organization-id 1 --async --id 4

3. Check hostname in the error raised.


Actual results:
3. shows old FQDN


Expected results:
3. to show new FQDN


Additional info:

Comment 1 Brad Buckingham 2022-02-14 14:06:47 UTC
Is this a regression from Satellite 6.10?

Comment 2 Pavel Moravec 2022-02-14 14:42:31 UTC
(In reply to Brad Buckingham from comment #1)
> Is this a regression from Satellite 6.10?

Yes it is a regression.

Renaming my Sat6.10 to pmoravec-sat610-renamed.brq2.redhat.com :


hammer> repository synchronize --organization-id 1 --id 3 --async
Repository is being synchronized in task 5b16c769-26b8-469f-be4d-8474688e22d2.
hammer> repository synchronize --organization-id 1 --id 3 --async
Could not synchronize the repository:
  Required lock is already taken by other running tasks.
  Please inspect their state, fix their errors and resume them.
  
  Conflicts with tasks:
  - https://pmoravec-sat610-renamed.brq2.redhat.com/foreman_tasks/tasks/5b16c769-26b8-469f-be4d-8474688e22d2
hammer> 


That is correct URL - on 6.10 .

Comment 3 Evgeni Golov 2022-02-16 14:41:37 UTC
I think this is technically a duplicate of BZ#2042480, which was fixed, but somehow it seems the fix was reverted :/

Comment 5 Peter Ondrejka 2022-03-02 16:02:17 UTC
Verified on Sat 7.0 snap 10 using the steps from the problem description. The new hostname is shown correctly in the error description

Comment 9 errata-xmlrpc 2022-07-05 14:33:17 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


Note You need to log in before you can comment on or make changes to this bug.