puppetlabs/puppetlabs-postgresql

setting the encoding parameter causes a dependency cycle

KoenDierckx opened this issue · 5 comments

Describe the Bug

Error: Found 1 dependency cycle:
(Anchor[postgresql::server::service::begin::main] => Postgresql_psql[Set template1 encoding to UTF8] => Postgresql::Server::Instance::Late_initdb[main] => Postgresql::Server::Instance::Initdb[main] => Class[Postgresql::Server::Initdb] => Postgresql_conf[port_for_instance_main] => Class[Postgresql::Server::Service] => Postgresql::Server::Instance::Service[main] => Anchor[postgresql::server::service::begin::main])

Expected Behavior

No dependency cycle error

Steps to Reproduce

class { 'postgresql::server':
encoding => 'UTF8',
}

Environment

  • Version 10.0.1
  • Platform [Ubuntu 20.04

Hi,
thanks for raising the ticket. We're able to reproduce it in #1547

Thanks, looking forward to the fix. This blocks our upgrade to the latest module version

I was also able to reproduce the problem in an environment or came across it.

I was able to determine that the dependency cycle only occurs if manage_package_repo from the globals is set to false.
If the value is set to true, the dependency cycle does not occur for me and the module works as expected.

I'm experiencing a similar problem, but with listen_address parameter. Only relevant when manage_package_repo is set to false

Error: Found 1 dependency cycle:
(Anchor[postgresql::server::service::begin::main] => Postgresql_psql[Set template1 encoding to UTF-8] => Postgresql::Server::Instance::Late_initdb[main] => Postgresql::Server::Instance::Initdb[main] => Class[Postgresql::Server::Initdb] => Postgresql_conf[listen_addresses] => Class[Postgresql::Server::Service] => Postgresql::Server::Instance::Service[main] => Anchor[postgresql::server::service::begin::main])\nTry the '--graph' option and opening the resulting '.dot' file in OmniGraffle or GraphViz
Error: Failed to apply catalog: One or more resource dependency cycles detected in graph