puppetlabs / puppetlabs-peadm

A Puppet module defining Bolt plans used to automate Puppet Enterprise deployments
Apache License 2.0
29 stars 55 forks source link

Plans do not consider differences between PSQL 11 and 14 #274

Closed ody closed 2 years ago

ody commented 2 years ago

Describe the Bug

Plans peadm::subplans::db_populate and peadm::add_replica only add required rules for successful PSQL operations on deployments which run PSQL 11 and will fail on those which used PSQL 14

Expected Behavior

Plans are capable of detecting which version of PSQL is installed and not fail.

Environment

Additional Context

This does not block deployment of new installs.

MartyEwings commented 2 years ago

If it helps we had a similar problem in status_checks and we solved it with the following:

    postgres_info = Facter.value(:pe_postgresql_info)
      pg_version = postgres_info['installed_server_version']
      data_dir = postgres_info['versions'][pg_version].fetch('data_dir', '/opt/puppetlabs/server/data/postgresql')
ody commented 2 years ago

@MartyEwings Thank you. peadm avoids using facter so I am currently trying to determine if it reasonable to continue avoiding it...the simple solution I tried yesterday was just hand loading the same library facter uses for the pe_postgresql_info fact. It works and avoids having to load the entirety of facter but I am not sure it is a good thing to do