Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-22442

Ensure PostgreSQL systemd service ensures the existence of the mount point before starting

XMLWordPrintable

    • 0
    • False
    • Hide

      None

      Show
      None
    • False
    • ASSIGNED
    • 850
    • Hide
      . Systemd ensures the PostgreSQL directory partition is mounted

      When the PostgreSQL data directory is on a separate partition there was a chance the service couldn't properly start up when it wasn't mounted.
      Now the systemd service is configured to ensure the partition is mounted prior to starting the service.
      This is particularly important on system start up, such as after a reboot.
      Show
      . Systemd ensures the PostgreSQL directory partition is mounted When the PostgreSQL data directory is on a separate partition there was a chance the service couldn't properly start up when it wasn't mounted. Now the systemd service is configured to ensure the partition is mounted prior to starting the service. This is particularly important on system start up, such as after a reboot.
    • Platform
    • Important
    • No

      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:

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

      2. Create a custom drop-in configuration file:

      1. touch postgresql-fs-mount-reqs.conf

      3. Verify the existence of the custom drop-in file:

      1. ls -l
        The output should include `postgresql-fs-mount-reqs.conf`.
        rrr-. 1 root root 73 Dec 19 08:05 postgresql.conf
        rw-rr-. 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:

      1. 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:

      1. ls -l
        rrr-. 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.

            ekohlvan@redhat.com Ewoud Kohl van Wijngaarden
            rhn-support-gpayelka Ganesh Payelkar
            Radek Mynar Radek Mynar
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: