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

postgresql : unable to change server port

    XMLWordPrintable

    Details

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

      Client OS: Debian GNU/Linux 9.6 (stretch)
      PuppetServer: 5.3.6-1stretch
      puppetlabs/postgresql module version: 5.11.0 (latest)

    • Template:
      MODULES Bug Template
    • Team:
      Modules
    • Method Found:
      Manual Test
    • QA Risk Assessment:
      Needs Assessment

      Description

      Currently attempts to change the port lead to errors (chicken and eggs problem)?

      E.g, Server side config:

      classes:
        - postgresql::server

      postgresql::server::port: 7777
      
      

      Client side:

       
      % puppet agent -t --debug |grep psql Debug: Executing with uid=postgres gid=postgres: '/usr/bin/psql -p 7777 -t -X -c "SELECT COUNT(*) FROM (SELECT datname FROM pg_database WHERE Error: /Stage[main]/Postgresql::Server::Initdb/Postgresql_psql[Set template1 encoding to UTF-8]: Could not evaluate: Error evaluating 'unless' clause, returned pid 15857 exit 2: 'psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.7777"?
      

      manifests/server/initdb.pp tries to work on a new port before the server change the port (and restart)

      Also attempt to change port via config_entry

      postgresql::server::config_entry { 'port': value => '7777' }

      leads to an error:

      Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Duplicate declaration: Postgresql::Server::Config_entry[port] is already declared at (file: /etc/puppetlabs/code/environments/production/modules/postgresql/manifests/server/config.pp, line: 109); 

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            olevole Oleg Ginzburg
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Zendesk Support