Skip to content

Resource type not found: Pe_postgresql_conf #62

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hawkeye-7 opened this issue Jun 8, 2021 · 8 comments
Closed

Resource type not found: Pe_postgresql_conf #62

hawkeye-7 opened this issue Jun 8, 2021 · 8 comments

Comments

@hawkeye-7
Copy link

puppetlabs-pe_databases 1.2.0 gives me an error:

Evaluation Error: Resource type not found: Pe_postgresql_conf
file: modules/pe_databases/manifests/postgresql_settings.pp
line: 58

@MartyEwings
Copy link
Contributor

@hawkeye-7 may i ask the PE version and the component you are seeing this on?

@MartyEwings
Copy link
Contributor

@hawkeye-7 iv been unable to reproduce in 2017.3 the last version that should trigger this class, or in 2021.1
Pe_postgresql_conf resource is provided by puppet enterprise modules, and should be present in all Valid PE installs can I confirm the environment you are running this module in?

@hawkeye-7
Copy link
Author

Using PE 2019.8.6

@MartyEwings
Copy link
Contributor

We have been unable to reproduce, and believe this is likely an issue with the modulepath or another misconfiguration specific to your environment,
One of the recent changes to the module was to consume the Puppet-enterprise-modules module, Pe_postgres rather than the external Postgres module. Pe_postgres should be available by default to all infrastructure components

@hawkeye-7
Copy link
Author

The profile is question is fairly basic:

On the server:
ls -l /opt/puppetlabs/server/data/postgresql/11/data/postgresql.conf /opt/puppetlabs/server/data/postgresql/11/data/postgresql.conf

-rw-------. 1 pe-postgres pe-postgres 23857 Nov 16 2020 /opt/puppetlabs/server/data/postgresql/11/data/postgresql.conf

So the file is there

facter -p pe_postgresql_info
{
installed_server_version => "11",
installed_packages => {
pe-postgresql-common => "2019.8-5",
pe-postgresql11 => "11.11-3",
pe-postgresql11-contrib => "11.11-3",
pe-postgresql11-pglogical => "2.3.2-3",
pe-postgresql11-pgrepack => "1.4.5-3",
pe-postgresql11-server => "11.11-3"
},
data_partition_size_bytes => 107321753600,
data_partition_available_bytes => 76735340544,
versions => {
11 => {
app_dir => "/opt/puppetlabs/server/apps/postgresql/11",
data_dir => "/opt/puppetlabs/server/data/postgresql/11",
tablespaces => [
"/opt/puppetlabs/server/data/postgresql/activity/PG_11_201809051",
"/opt/puppetlabs/server/data/postgresql/classifier/PG_11_201809051",
"/opt/puppetlabs/server/data/postgresql/orchestrator/PG_11_201809051",
"/opt/puppetlabs/server/data/postgresql/puppetdb/PG_11_201809051",
"/opt/puppetlabs/server/data/postgresql/rbac/PG_11_201809051"
],
used_bytes => 6711025664
}
}
}

The fact is set

Works with puppetlabs-pe_databases 1.1.0 fails with puppetlabs-pe_databases 1.2.0

The breaking change is f147ba2 changed Postgressql_conf to Pe_postgressql_conf

ross@harmony3-p1:~$ /opt/puppetlabs/bin/puppet module list
/opt/puppetlabs/puppet/modules
├── puppetlabs-cd4pe_jobs (v1.5.0)
├── puppetlabs-enterprise_tasks (v0.1.0)
├── puppetlabs-facter_task (v0.9.0)
├── puppetlabs-facts (v1.4.0)
├── puppetlabs-package (v1.4.0)
├── puppetlabs-pe_bootstrap (v0.3.0)
├── puppetlabs-pe_concat (v1.1.1)
├── puppetlabs-pe_hocon (v2019.0.0)
├── puppetlabs-pe_infrastructure (v2018.1.0)
├── puppetlabs-pe_inifile (v1.1.3)
├── puppetlabs-pe_install (v2018.1.0)
├── puppetlabs-pe_java_ks (v2016.4.0)
├── puppetlabs-pe_nginx (v2017.1.0)
├── puppetlabs-pe_patch (v0.13.0)
├── puppetlabs-pe_postgresql (v2016.5.0)
├── puppetlabs-pe_puppet_authorization (v2016.2.0)
├── puppetlabs-pe_r10k (v2016.2.0)
├── puppetlabs-pe_razor (v1.1.0)
├── puppetlabs-pe_repo (v2018.1.0)
├── puppetlabs-pe_staging (v0.3.3)
├── puppetlabs-pe_support_script (v2.16.0)
├── puppetlabs-puppet_conf (v0.8.0)
├── puppetlabs-puppet_enterprise (v2018.1.0)
├── puppetlabs-puppet_metrics_collector (v6.5.0)
├── puppetlabs-python_task_helper (v0.5.0)
├── puppetlabs-reboot (v4.0.2)
├── puppetlabs-ruby_task_helper (v0.6.0)
└── puppetlabs-service (v1.4.0)

@MartyEwings
Copy link
Contributor

HI @hawkeye-7

Thank for the data, yes we recently made the change to move from external to internal dependencies.

puppetlabs-pe_postgresql provides the resource in question, and would be located here:

/opt/puppetlabs/puppet/modules/pe_postgresql/lib/puppet/type/pe_postgresql_conf.rb

The error you are experiencing Evaluation Error: Resource type not found: Pe_postgresql_conf implies that this module and resource are not available at compilation time.

This does not appear to be an issue with the module as we can not reproduce it through manual or automated testing, and this may be an issue with your basemodulepath for the environment the node is compiling a catalog against.

As this is a PE issue, and likely environment based, may I suggest raising a case with the Support team to help you further?

https://support.puppet.com

Thank you

@jarretlavallee
Copy link
Contributor

@hawkeye-7 Based on https://github.com/puppetlabs/puppetlabs-pe_databases/blob/main/manifests/init.pp#L29 that class should not be added in 2019.8.z

  # Do not manage postgresql_settings in 2018.1.0 or newer.
if $manage_postgresql_settings and (versioncmp('2018.1.0', $facts['pe_server_version']) > 0) {
    include pe_databases::postgresql_settings

How are you using this module in your code and what parameters are set?

@MartyEwings
Copy link
Contributor

Closing the issue as we can not reproduce if you can provide more information on versioning an circumstances we can reopen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants