This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
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 2257980 - Ensure PostgreSQL systemd service ensures the existence of the mount point before starting
Summary: Ensure PostgreSQL systemd service ensures the existence of the mount point be...
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Installation
Version: 6.14.1
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Satellite QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-01-11 22:24 UTC by Ganesh Payelkar
Modified: 2024-06-06 16:40 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-06-06 16:40:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github puppetlabs puppetlabs-postgresql pull 1582 0 None open Use RequiresMountsFor on datadir 2024-03-25 12:49:27 UTC
Red Hat Issue Tracker   SAT-22442 0 None Migrated None 2024-06-06 16:40:44 UTC

Description Ganesh Payelkar 2024-01-11 22:24:44 UTC
Description of problem:

Upon creating a custom drop-in file for PostgreSQL (postgresql-fs-mount-reqs.conf), I noticed that the installer intentionally removed this file during its execution.

Version-Release number of selected component (if applicable):
satellite-6.14

How reproducible:
When creating a custom configuration

Steps to Reproduce:

To reproduce the behavior where the custom configuration file for PostgreSQL is removed during the Satellite installation, you can follow these steps:

1. Navigate to the directory where PostgreSQL drop-in configurations are stored:

   # cd /etc/systemd/system/postgresql.service.d


2. Create a custom drop-in configuration file:

    # touch postgresql-fs-mount-reqs.conf

3. Verify the existence of the custom drop-in file:
    # ls -l
   The output should include `postgresql-fs-mount-reqs.conf`.
   -r--r--r--. 1 root root 73 Dec 19 08:05 postgresql.conf
   -rw-r--r--. 1 root root  0 Jan 12 03:08 postgresql-fs-mount-reqs.conf

4. Run the Satellite installer:
   satellite-installer -S satellite

5. Monitor the installer logs for any actions related to the custom drop-in file:
   # tail -f /var/log/foreman-installer/satellite.log

2024-01-12 02:51:34 [DEBUG ] [configure] /File[/etc/systemd/system/postgresql.service.d/postgresql-fs-mount-reqs.conf]/seluser: Found seluser default 'system_u' for /etc/systemd/system/postgresql.service.d/postgresql-fs-mount-reqs.conf
2024-01-12 02:51:34 [DEBUG ] [configure] /File[/etc/systemd/system/postgresql.service.d/postgresql-fs-mount-reqs.conf]/selrole: Found selrole default 'object_r' for /etc/systemd/system/postgresql.service.d/postgresql-fs-mount-reqs.conf
2024-01-12 02:51:34 [DEBUG ] [configure] /File[/etc/systemd/system/postgresql.service.d/postgresql-fs-mount-reqs.conf]/seltype: Found seltype default 'postgresql_unit_file_t' for /etc/systemd/system/postgresql.service.d/postgresql-fs-mount-reqs.conf
2024-01-12 02:51:34 [DEBUG ] [configure] /File[/etc/systemd/system/postgresql.service.d/postgresql-fs-mount-reqs.conf]/selrange: Found selrange default 's0' for /etc/systemd/system/postgresql.service.d/postgresql-fs-mount-reqs.conf
2024-01-12 02:51:34 [DEBUG ] [configure] /Stage[main]/Postgresql::Server::Config/Postgresql::Server::Instance::Config[main]/Postgresql::Server::Instance::Systemd[postgresql]/Systemd::Dropin_file[postgresql.conf]/File[/etc/systemd/system/postgresql.service.d/postgresql-fs-mount-reqs.conf]: Starting to evaluate the resource (1320 of 2192)
2024-01-12 02:51:34 [DEBUG ] [configure] /Stage[main]/Postgresql::Server::Config/Postgresql::Server::Instance::Config[main]/Postgresql::Server::Instance::Systemd[postgresql]/Systemd::Dropin_file[postgresql.conf]/File[/etc/systemd/system/postgresql.service.d/postgresql-fs-mount-reqs.conf]: Removing existing file for replacement with absent
2024-01-12 02:51:34 [INFO  ] [configure] /Stage[main]/Postgresql::Server::Config/Postgresql::Server::Instance::Config[main]/Postgresql::Server::Instance::Systemd[postgresql]/Systemd::Dropin_file[postgresql.conf]/File[/etc/systemd/system/postgresql.service.d/postgresql-fs-mount-reqs.conf]/ensure: removed

6. After the installation completes, check the contents of the directory:
    # ls -l
     -r--r--r--. 1 root root 73 Dec 19 08:05 postgresql.conf
   The custom drop-in file may no longer be present.




Actual results:

After running the satellite-installer command for Satellite, I observed that the installer process removed the custom drop-in file, as evidenced by both the absence of the file and corresponding log entries indicating its removal.
the satellite installer appears to delete custom configurations during the installation process. 

Expected results:

The expected result would be that the custom PostgreSQL drop-in configuration file (postgresql-fs-mount-reqs.conf) remains intact even after running the Satellite installer. The installer should not remove custom configurations that are essential for ensuring proper PostgreSQL startup dependencies, such as mount points.

Additional info:


Tested on satellite 6.13 and it does not remove it.

Comment 3 Ewoud Kohl van Wijngaarden 2024-01-15 17:13:33 UTC
This is a result of https://github.com/puppetlabs/puppetlabs-postgresql/commit/5eb1e8edb825a0ee1377db0ecf7af1646452df94 where it now uses the common puppet-systemd module. That has this piece of code https://github.com/voxpupuli/puppet-systemd/blob/00915e3ac17d11b34d1821fa1b76752b99a3d387/manifests/dropin_file.pp#L56-L57 which purges the systemd drop ins directory for a service.

There is a systemd::purge_dropin_dirs option you can define in custom-hiera.yaml but we should investigate the effects. I don't think it will hurt things, but it will also change the drop ins for other services. With Apache it probably isn't an issue, but we could rely on it with our dynflow or pulp worker configuration (when you scale down the number of workers).

Comment 4 Ewoud Kohl van Wijngaarden 2024-03-25 12:49:08 UTC
With the upcoming version of puppet-systemd it will be possible to create managed dropins using custom-hiera.yaml, but we generally call that unsupported so it won't be documented.

For this specific case I've opened https://github.com/puppetlabs/puppetlabs-postgresql/pull/1582 to always make sure the mounts are available. There is a clear benefit to this for all users. This saves the customer from manually managing this and also provides value to other customers implementing the same partitioning scheme (which is common).

Comment 5 Eric Helms 2024-06-06 16:40:46 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "SAT-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.


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