| 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). |