Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-11081

puppetlabs-postgresql : confdir ignored on Ubuntu

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: postgresql
    • Environment:

      Ubuntu 20.04

      Postgresql 13

    • Template:
      MODULES Bug Template
    • Method Found:
      Needs Assessment
    • QA Risk Assessment:
      Needs Assessment

      Description

      Basic Info
      Module Version: 6.9.0
      Puppet Version: 6.21.1
      OS Name/Version: Ubuntu 20.04

      Describe your issue in as much detail as possible...

      Desired Behavior: 

      Changing confdir in the module settings should update the location of files and modify the service accordingly.

      Actual Behavior:

      While the new confdir is created (and the files managed by the module populated), the service continues to run out of the system default locations. This seems to be fundamentally tied to the way Ubuntu hardcodes management of postgresql through the postgresql-common package.

      Example:

      Setting confdir to /etc/postgresql/13 in the module creates the proper files

       

      # ls -l
      total 12
      drwxr-xr-x 3 postgres postgres 139 May 27 14:35 main
      -rw-r----- 1 postgres postgres 969 May 27 03:15 pg_hba.conf
      -rw-r----- 1 postgres postgres  47 May 27 03:15 pg_ident.conf
      -rw-r--r-- 1 postgres postgres 326 May 27 03:15 postgresql.conf
      

       

      but they are never used. Note the main directory above created by the apt package and the following:

      # pg_conftool show all
      cluster_name = '13/main'
      data_directory = '/var/lib/postgresql/13/main'
      datestyle = 'iso, mdy'
      default_text_search_config = 'pg_catalog.english'
      dynamic_shared_memory_type = posix
      external_pid_file = '/var/run/postgresql/13-main.pid'
      hba_file = '/etc/postgresql/13/main/pg_hba.conf'
      ident_file = '/etc/postgresql/13/main/pg_ident.conf'
      lc_messages = 'en_US.UTF-8'
      lc_monetary = 'en_US.UTF-8'
      lc_numeric = 'en_US.UTF-8'
      lc_time = 'en_US.UTF-8'
      log_line_prefix = '%m [%p] %q%u@%d '
      log_timezone = UTC
      max_connections = 100
      max_wal_size = 1GB
      min_wal_size = 80MB
      port = 5432
      shared_buffers = 128MB
      ssl = on
      ssl_cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem'
      ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key'
      stats_temp_directory = '/var/run/postgresql/13-main.pg_stat_tmp'
      timezone = UTC
      unix_socket_directories = '/var/run/postgresql'
      

      Everything continues to run from the system defaults. Reloading or restarting the service does no good because it's written to use the postgresql-common utilities. Specifically:

      ExecStart=-/usr/bin/pg_ctlcluster --skip-systemctl-redirect %i start
      

       

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            Weavage James Weaver
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Zendesk Support