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 1922503 - satellite-clone restores postgresql.conf with root:root ownership causing failure to clone
Summary: satellite-clone restores postgresql.conf with root:root ownership causing fai...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Satellite Clone
Version: 6.7.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 6.11.0
Assignee: satellite6-bugs
QA Contact: Vladimír Sedmík
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-01-29 22:30 UTC by Mike McCune
Modified: 2024-12-20 19:35 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-02-03 15:06:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Mike McCune 2021-01-29 22:30:31 UTC
When cloning a 6.7 Satellite server, we perform the following steps:

1) install postgresql server packages:

https://github.com/RedHatSatellite/satellite-clone/blob/81e3be94c5f34887dfe133e9309946a1bd31c175/roles/satellite-clone/tasks/main.yml#L123

2) untar config files:

https://github.com/RedHatSatellite/satellite-clone/blob/81e3be94c5f34887dfe133e9309946a1bd31c175/roles/satellite-clone/tasks/main.yml#L194

3) remove postgresql.conf

https://github.com/RedHatSatellite/satellite-clone/blob/81e3be94c5f34887dfe133e9309946a1bd31c175/roles/satellite-clone/tasks/main.yml#L198

4) run satellite-installer:

https://github.com/RedHatSatellite/satellite-clone/blob/81e3be94c5f34887dfe133e9309946a1bd31c175/roles/satellite-clone/tasks/main.yml#L235


The issue is that satellite-installer does not properly re-set file permissions on postgresql.conf to postgresql:postgresql upon execution of the Puppet code to configure this file, it ends up being root:root as it likely doesn't expect this file to be completely missing.

This causes postgreql server to fail to start and the clone to fail completely.

We need to investigate removing the step (3) above and see if we still need to continue removing this config file as test runs without this step complete properly.

Comment 1 Evgeni Golov 2022-01-28 08:18:45 UTC
This shouldn't be a problem since Foreman 2.4 (so Satellite 6.10+) as that has an updated puppet-postgresql module which contains [1].

This also explains why I was never able to reproduce the error in my tests.

Would you consider this done then?

[1] https://github.com/puppetlabs/puppetlabs-postgresql/commit/171a1be93df8113fce82460d3c9b07f17974af4f

Comment 2 Red Hat Bugzilla 2023-09-15 00:59:37 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days


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