Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-10437

Running remove_old_postgresql_versions after upgrade failed

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • None
    • PUP 6.16.0, PUP 5.5.21
    • None
    • Hide

      remove_old_postgresql_versions plan should succeed when the pe-postgresql11 service is running.

      Show
      remove_old_postgresql_versions plan should succeed when the pe-postgresql11 service is running.
    • Night's Watch
    • NW - 2020-04-29
    • Needs Assessment
    • Bug Fix
    • Consistency fix in puppet's behaviour when listing information about a single specific service and all available ones by showing services in a 'static' state in both cases.
    • Needs Assessment

    Description

      On Ubuntu 18.04, I ran the upgrade to 2019.5 and saw in the output a suggestion to run puppet infrastructure run remove_old_postgresql_versions. When I did that I got

      This node does not appear to have PE Postgresql11 installed, this plan can only be run to remove old Postgresql data after upgrading to PE Postgresql11. 

      in task error output.

      When I checked, the system was running postgresql 11

      $ ps -ef | grep postgres
      pe-post+ 14416     1  0 22:21 ?        00:00:00 /opt/puppetlabs/server/apps/postgresql/11/bin/postgres -D /opt/puppetlabs/server/data/postgresql/11/data -c log_directory=/var/log/puppetlabs/postgresql/11 -p 5432 

       

      I tracked this back to the task checking whether postgres 11 is being used and found the following odd behavior

      $ puppet resource service pe-postgresql
      service { 'pe-postgresql':
        ensure   => 'running',
        enable   => 'true',
        provider => 'systemd',
      }
      $ puppet resource service | grep pe-postgresql
      $ 

      The task checks whether the pe-postgresql11 service exists, but puppet didn't show that service. This appears to be a bug in puppet (although it's also more efficient on some platforms to check whether a single service exists than to grep all of them).

      Attachments

        Activity

          People

            luchian.nemes Luchian Nemes
            luchian.nemes Luchian Nemes
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support