puppetlabs/puppetlabs-postgresql

Postgresql_conf[ssl] resource broken with Server Error: no parameter named 'key' after bump to 10.0.1

corporate-gadfly opened this issue · 5 comments

Describe the Bug

Error: Could not retrieve catalog from remote server:
Error 500 on SERVER: Server Error: no parameter named 'key'
(file: /etc/puppetlabs/code/environments/production/modules/postgresql/manifests/server/config_entry.pp, line: 87)
on Postgresql_conf[ssl]
(file: /etc/puppetlabs/code/environments/production/modules/postgresql/manifests/server/config_entry.pp, line: 87)
on node xxx.tld

For reference:

postgresql_conf { $name:
ensure => $ensure,
target => $path,
key => $key,
value => $value,
comment => $comment,
require => Class['postgresql::server::initdb'],
}

I don't use puppetlabs-postgresql directly. Instead, my usage is via puppetlabs-puppetdb (version 7.13.0) as follows:

  class { 'puppetdb::globals':
    version => '8.1.1-1.el8',
  }
  class { 'puppetdb':
    open_ssl_listen_port    => true,
    postgres_version        => '11',
    postgresql_ssl_on       => true,
    database_host           => $trusted['certname'],
    database_listen_address => '0.0.0.0',

    # set low TTL values resulting in low resource usage
    # (as we are not interested in reports/facts/dashboard)

    # Mark as 'expired' nodes that haven't seen any activity
    # (no new catalogs, facts, or reports) in the specified amount of time.
    # if unset, the default is 7d
    node_ttl                => '1d',
    # Automatically delete nodes that have been deactivated
    # or expired for the specified amount of time.
    # if unset, the default is 14d
    node_purge_ttl          => '1d',
    # Automatically delete reports that are older than
    # the specified amount of time.
    # if unset, the default is 14d
    report_ttl              => '1d',
    # JAVA args
    java_args               => {
      '-Xmx' => '2g',
      '-Xms' => '2g',
    },
  }

Feel free to close if this should be filed against puppetdb.

Hi @corporate-gadfly ,
any chance you didn't run puppet generate types after the code deployment? If you are using r10k, you can enable it in the config file (/etc/puppetlabs/r10k/r10k.yaml):

---
pool_size: 8
deploy:
  generate_types: true
  exclude_spec: true
  incremental: true
cachedir: "/opt/puppetlabs/puppet/cache/r10k"

@bastelfreak @corporate-gadfly I can confirm, this solves the error for me

TY, I will try. I have exclude_spec: true but currently do not have generate_types.

Fixed for me with the supplied suggestion by @bastelfreak . Feel free to close, TY (or follow up with r10k documentation updates).

nice, thanks for reporting