postgresql connection wants python-psycopg2 package, but in ubuntu repo package name is python3-psycopg2

Bug #1999421 reported by Mikhail Stolyarov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
puppet-oslo
Won't Fix
Undecided
Unassigned

Bug Description

When istalling keystone module needs python-psycopg2 package:

[muxa@stolyarov-ocs temp]$ grep -nri python-psycopg2 puppet-oslo/
puppet-oslo/spec/defines/oslo_db_spec.rb:93: is_expected.to contain_package('python-psycopg2').with(:ensure => 'present')
puppet-oslo/spec/defines/oslo_db_spec.rb:104: is_expected.not_to contain_package('python-psycopg2')

But in Ubuntu default repos (20.04, 22.04) there is no such package. Only python3-psycopg2.
So module not workin =(

Log from puppet:

Error: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install python-psycopg2' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
Package python-psycopg2 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'python-psycopg2' has no installation candidate
Error: /Stage[main]/Postgresql::Lib::Python/Package[python-psycopg2]/ensure: change from 'purged' to 'present' failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install python-psycopg2' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
Package python-psycopg2 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'python-psycopg2' has no installation candidate
Notice: /Stage[main]/Keystone::Db/Oslo::Db[keystone_config]/Keystone_config[database/sqlite_synchronous]: Dependency Package[python-psycopg2] has failures: true

Additional info
root@ost-m01-v:~# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.5 LTS"

root@ost-m01-v:~# apt search python psycopg2
Sorting... Done
Full Text Search... Done
python-psycopg2-doc/focal 2.8.4-2 all
  Python module for PostgreSQL (documentation package)

python3-psycogreen/focal 1.0.1-1 all
  psycopg2 integration with coroutine libraries

python3-psycopg2/focal 2.8.4-2 amd64
  Python 3 module for PostgreSQL

python3-psycopg2-dbg/focal 2.8.4-2 amd64
  Python 3 module for PostgreSQL (debug extension)

description: updated
Revision history for this message
Mikhail Stolyarov (toggetit) wrote :

Hmm... Seems to be it is a bug in postgresql puppet module. Not a puppet-oslo

Revision history for this message
Takashi Kajinami (kajinamit) wrote :

As you are aware, this is a bug of puppet-postgresql instead of puppet-oslo/keystone.
Our module does not explicitly define the package resource but use the implementation of that 3rd party module.

https://github.com/puppetlabs/puppetlabs-postgresql/blob/b051aa8ec6aebc3ac94091d5075b3bf69e25042a/manifests/params.pp#L167

Changed in puppet-oslo:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.