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 2238348 - when creating a backup on rhel7 and restoring on rhel8, the restore process will fail with permission issues
Summary: when creating a backup on rhel7 and restoring on rhel8, the restore process w...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Satellite Maintain
Version: 6.11.0
Hardware: All
OS: All
high
high
Target Milestone: 6.13.5
Assignee: Evgeni Golov
QA Contact: Lukas Pramuk
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-09-11 15:16 UTC by Odilon Sousa
Modified: 2024-02-21 15:29 UTC (History)
14 users (show)

Fixed In Version: rubygem-foreman_maintain-1.2.12-1.el8sat
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2159839
Environment:
Last Closed: 2023-10-19 13:13:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 36578 0 High Closed restore sometimes fails when puppet or katello-agent features are enabled 2023-09-11 15:17:13 UTC
Red Hat Issue Tracker SAT-18664 0 None None None 2023-09-11 15:17:13 UTC
Red Hat Issue Tracker SAT-19976 0 None None None 2023-09-11 15:18:45 UTC
Red Hat Product Errata RHSA-2023:5931 0 None None None 2023-10-19 13:13:38 UTC

Comment 2 Lukas Pramuk 2023-10-03 15:22:34 UTC
VERIFIED.

@Satellite 6.13.5 Snap 2
rubygem-foreman_maintain-1.2.12-1.el8sat.noarch

by the following manual reproducer:

1) Enable katello-agent feature 
# satellite-installer --foreman-proxy-content-enable-katello-agent true

2) Create a backup
# satellite-maintain backup offline -y /var/backup

3) Check qpidd user UID and GID
# id qpidd
uid=986(qpidd) gid=984(qpidd) groups=984(qpidd)

4) On another machine with the same hostname install satellite with the defaults
(=katello-agent is disabled and not installed)

5) Add a dummy system group and user so they take over the original UID/GID (986/984)
# groupadd --system monitoring
# useradd --system -g  monitoring monitoring
# id monitoring
uid=986(monitoring) gid=984(monitoring) groups=984(monitoring)

6) Restore from the backup made on 1st machine

REPRO:

# satellite-maintain restore -y /var/backup/satellite-backup-2023-09-22-07-03-49
...
--------------------------------------------------------------------------------
Restore configs from backup: 
- Restoring configs                                                   [OK]      
--------------------------------------------------------------------------------
Run installer reset: 
| Installer reset                                                     [FAIL]    
Failed executing yes | satellite-installer -v --reset-data , exit status 6:
...
2023-10-03 10:38:49 [ERROR ] [configure] Systemd start for qpidd failed!
2023-10-03 10:38:49 [ERROR ] [configure] journalctl log for qpidd:
2023-10-03 10:38:49 [ERROR ] [configure] -- Logs begin at Tue 2023-10-03 07:02:38 EDT, end at Tue 2023-10-03 10:38:49 EDT. --
2023-10-03 10:38:49 [ERROR ] [configure] Oct 03 10:37:19 satellite.example.com systemd[1]: Starting An AMQP message broker daemon....
2023-10-03 10:38:49 [ERROR ] [configure] Oct 03 10:37:19 satellite.example.com qpidd[38819]: 2023-10-03 10:37:19 [Broker] critical Unexpected error: Cannot open lock file /var/lib/qpidd/lock: Permission denied
2023-10-03 10:38:49 [ERROR ] [configure] Oct 03 10:37:19 satellite.example.com qpidd[38819]: 2023-10-03 10:37:19 [Broker] critical Unexpected error: Cannot open lock file /var/lib/qpidd/lock: Permission denied
2023-10-03 10:38:49 [ERROR ] [configure] Oct 03 10:37:19 satellite.example.com systemd[1]: qpidd.service: Main process exited, code=exited, status=1/FAILURE
2023-10-03 10:38:49 [ERROR ] [configure] Oct 03 10:38:49 satellite.example.com systemd[1]: qpidd.service: Start-post operation timed out. Stopping.
2023-10-03 10:38:49 [ERROR ] [configure] Oct 03 10:38:49 satellite.example.com systemd[1]: qpidd.service: Failed with result 'exit-code'.
2023-10-03 10:38:49 [ERROR ] [configure] Oct 03 10:38:49 satellite.example.com systemd[1]: Failed to start An AMQP message broker daemon..
2023-10-03 10:38:49 [ERROR ] [configure] /Stage[main]/Qpid::Service/Service[qpidd]/ensure: change from 'stopped' to 'running' failed: Systemd start for qpidd failed!

# ll /var/lib/qpidd/lock
-rw-r--r--. 1 monitoring monitoring 0 Sep 22 06:44 /var/lib/qpidd/lock


vs.


FIX:

# satellite-maintain restore -y /var/backup/satellite-backup-2023-09-22-07-03-49
...
--------------------------------------------------------------------------------
Ensure required packages are installed before restore: 
/ Installing required packages                                        [OK]      
--------------------------------------------------------------------------------
Restore configs from backup: 
/ Restoring configs                                                   [OK]      
--------------------------------------------------------------------------------
Run installer reset: 
| Installer reset                                                     [OK]      
--------------------------------------------------------------------------------

# ll /var/lib/qpidd/lock
-rw-r--r--. 1 qpidd qpidd 0 Sep 22 06:44 /var/lib/qpidd/lock


>>> restore now ensures required users/groups exist prior restoring configs (in order to map users/groups in archive vs. in system)

Comment 9 errata-xmlrpc 2023-10-19 13:13: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 (Important: Satellite 6.13.5 Async Security Update), 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-2023:5931


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