You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following does not work on Rocky Linux 8 without first disabling the yum postgresql module.
class { 'postgresql::globals':
manage_package_repo => true,
version => '14',
}->
class { 'postgresql::server':
}
It returns the following error
Error: Execution of '/bin/dnf -d 0 -e 1 -y install postgresql14-server' returned 1: Error: Unable to find a match: postgresql14-server
Error: /Stage[main]/Postgresql::Server::Install/Package[postgresql-server]/ensure: change from 'purged' to 'present' failed: Execution of '/bin/dnf -d 0 -e 1 -y install postgresql14-server' returned 1: Error: Unable to find a match: postgresql14-server (corrective)
Notice: /Stage[main]/Postgresql::Server::Initdb/File[/var/lib/pgsql/14/data]: Dependency Package[postgresql-server] has failures: true
Warning: /Stage[main]/Postgresql::Server::Initdb/File[/var/lib/pgsql/14/data]: Skipping because of failed dependencies
Warning: /Stage[main]/Postgresql::Server::Initdb/Exec[postgresql_initdb]: Skipping because of failed dependencies
Warning: /Stage[main]/Postgresql::Server::Config/File[/var/lib/pgsql/14/data/postgresql.conf]: Skipping because of failed dependencies
Warning: /Stage[main]/Postgresql::Server::Config/File[systemd-conf-dir]: Skipping because of failed dependencies
Warning: /Stage[main]/Postgresql::Server::Config/File[systemd-override]: Skipping because of failed dependencies
Warning: /Stage[main]/Postgresql::Server::Config/File[old-systemd-override]: Skipping because of failed dependencies
Warning: /Stage[main]/Postgresql::Server::Config/Exec[restart-systemd]: Skipping because of failed dependencies
Warning: /Stage[main]/Postgresql::Server::Config/Concat[/var/lib/pgsql/14/data/pg_hba.conf]/Concat_file[/var/lib/pgsql/14/data/pg_hba.conf]: Skipping because of failed dependencies
Warning: /Stage[main]/Postgresql::Server::Config/Concat[/var/lib/pgsql/14/data/pg_hba.conf]/File[/var/lib/pgsql/14/data/pg_hba.conf]: Skipping because of failed dependencies
Warning: /Stage[main]/Postgresql::Server::Config/Concat[/var/lib/pgsql/14/data/pg_hba.conf]/Concat_fragment[/var/lib/pgsql/14/data/pg_hba.conf_header]: Skipping because of failed dependencies
Warning: /Stage[main]/Postgresql::Server::Config/Postgresql::Server::Config_entry[port]/Postgresql_conf[port]: Skipping because of failed dependencies
Warning: /Stage[main]/Postgresql::Server::Config/Postgresql::Server::Config_entry[data_directory]/Postgresql_conf[data_directory]: Skipping because of failed dependencies
Warning: /Stage[main]/Postgresql::Server::Config/Concat[/var/lib/pgsql/14/data/pg_ident.conf]/Concat_file[/var/lib/pgsql/14/data/pg_ident.conf]: Skipping because of failed dependencies
Warning: /Stage[main]/Postgresql::Server::Config/Concat[/var/lib/pgsql/14/data/pg_ident.conf]/File[/var/lib/pgsql/14/data/pg_ident.conf]: Skipping because of failed dependencies
Warning: /Stage[main]/Postgresql::Server::Config/Concat[/var/lib/pgsql/14/data/pg_ident.conf]/Concat_fragment[/var/lib/pgsql/14/data/pg_ident.conf_header]: Skipping because of failed dependencies
Warning: /Stage[main]/Postgresql::Server::Config/Postgresql::Server::Pg_hba_rule[local access as postgres user]/Concat::Fragment[pg_hba_rule_local access as postgres user]/Concat_fragment[pg_hba_rule_local access as postgres user]: Skipping because of failed dependencies
Warning: /Stage[main]/Postgresql::Server::Config/Postgresql::Server::Pg_hba_rule[local access to database with same name]/Concat::Fragment[pg_hba_rule_local access to database with same name]/Concat_fragment[pg_hba_rule_local access to database with same name]: Skipping because of failed dependencies
Warning: /Stage[main]/Postgresql::Server::Config/Postgresql::Server::Pg_hba_rule[allow localhost TCP access to postgresql user]/Concat::Fragment[pg_hba_rule_allow localhost TCP access to postgresql user]/Concat_fragment[pg_hba_rule_allow localhost TCP access to postgresql user]: Skipping because of failed dependencies
Warning: /Stage[main]/Postgresql::Server::Config/Postgresql::Server::Pg_hba_rule[deny access to postgresql user]/Concat::Fragment[pg_hba_rule_deny access to postgresql user]/Concat_fragment[pg_hba_rule_deny access to postgresql user]: Skipping because of failed dependencies
Warning: /Stage[main]/Postgresql::Server::Config/Postgresql::Server::Pg_hba_rule[allow access to all users]/Concat::Fragment[pg_hba_rule_allow access to all users]/Concat_fragment[pg_hba_rule_allow access to all users]: Skipping because of failed dependencies
Warning: /Stage[main]/Postgresql::Server::Config/Postgresql::Server::Pg_hba_rule[allow access to ipv6 localhost]/Concat::Fragment[pg_hba_rule_allow access to ipv6 localhost]/Concat_fragment[pg_hba_rule_allow access to ipv6 localhost]: Skipping because of failed dependencies
Warning: /Stage[main]/Postgresql::Server::Service/Anchor[postgresql::server::service::begin]: Skipping because of failed dependencies
Warning: /Stage[main]/Postgresql::Server::Service/Service[postgresqld]: Skipping because of failed dependencies
Warning: /Stage[main]/Postgresql::Server::Service/Postgresql_conn_validator[validate_service_is_running]: Skipping because of failed dependencies
Warning: /Stage[main]/Postgresql::Server::Service/Anchor[postgresql::server::service::end]: Skipping because of failed dependencies
Warning: /Stage[main]/Postgresql::Server::Reload/Exec[postgresql_reload]: Skipping because of failed dependencies
To get it to work, i need to disable the yum postresql module first.
dnf -qy module disable postgresql
Working solution
The following snippet solves the issue, and i get postgres14 installed
On Alma Linux 8 (elevated from CentOS 7) the same issue appears when using the external Postgresql repositories. When using the private postgresql::dnfmodule class, one could use the disabled value for ensure. But this conflicts with enable_only inside the postgresql::dnfmodule class, which is also not changeable... Thus, the Enum does not suit with other package parameters and there for using this code currently does not work with external repositories.
We've decided to copy the code into our own class without the enable_only => true and use that until this issue is fixed:
# postgresql dnf module needs to be disabled on EL >= 8
# see https://github.com/puppetlabs/puppetlabs-postgresql/issues/1398
if $facts['os']['family'] == 'RedHat' and $facts['os']['release']['major'] >= '8' {
# based on https://github.com/puppetlabs/puppetlabs-postgresql/blob/main/manifests/dnfmodule.pp
package { 'postgresql dnf module':
ensure => 'disabled',
name => 'postgresql',
provider => 'dnfmodule',
}
Package['postgresql dnf module'] -> Package<|tag == 'puppetlabs-postgresql'|>
}
The issue
The following does not work on Rocky Linux 8 without first disabling the yum postgresql module.
It returns the following error
To get it to work, i need to disable the yum postresql module first.
dnf -qy module disable postgresql
Working solution
The following snippet solves the issue, and i get postgres14 installed
an other option could be.
This works quicker when not having to run dnf module list --enabled |grep postgresql|wc -l
The text was updated successfully, but these errors were encountered: