Page MenuHomePhabricator

Unmet dependencies around postgis apt packages on maps* servers
Closed, ResolvedPublic

Description

Puppet is failing on maps* servers (see log below)

Error: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install postgresql-9.4-postgis' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
postgresql-9.4-postgis-2.1 is already the newest version.
postgresql-9.4-postgis-2.1-scripts is already the newest version.
postgresql-9.4-postgis-scripts is already the newest version.
postgresql-9.4-postgis-2.2 is already the newest version.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 postgresql-9.4-postgis-2.3-scripts : Breaks: postgresql-9.4-postgis-scripts (< 2.2.2+dfsg-3~) but 2.1.4+dfsg-3 is to be installed
E: Unable to correct problems, you have held broken packages.
Error: /Stage[main]/Postgresql::Postgis/Package[postgresql-9.4-postgis]/ensure: change from purged to present failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install postgresql-9.4-postgis' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
postgresql-9.4-postgis-2.1 is already the newest version.
postgresql-9.4-postgis-2.1-scripts is already the newest version.
postgresql-9.4-postgis-scripts is already the newest version.
postgresql-9.4-postgis-2.2 is already the newest version.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 postgresql-9.4-postgis-2.3-scripts : Breaks: postgresql-9.4-postgis-scripts (< 2.2.2+dfsg-3~) but 2.1.4+dfsg-3 is to be installed
E: Unable to correct problems, you have held broken packages.
``^

Event Timeline

Puppet declares package { "postgresql-${pgversion}-postgis": }, which is treated as a regex and expanded to multiple versions of postgresql-9.4-postgis (2.[0-4]), which is most probably not what we want. The current postgis extension installed in postgresql on all maps* servers is 2.1.4 (SELECT PostGIS_full_version();). There is a ticket open to upgrade to 2.2+ (T144763). Note that labsdb100[67] are still on precise with postgis 1.5.

Gehel triaged this task as High priority.Oct 10 2016, 11:25 AM

Change 315077 had a related patch set uploaded (by Gehel):
Postgresql / postgis: use full package name

https://gerrit.wikimedia.org/r/315077

labsdb1004 is also concerned with this issue

Change 315077 merged by Gehel:
Postgresql / postgis: use full package name

https://gerrit.wikimedia.org/r/315077

Dzahn added a subscriber: Dzahn.

[maps1001:~] $ puppet agent -tv
..
Info: Caching catalog for maps1001.eqiad.wmnet
Info: Applying configuration version '1477087090'
Error: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install postgresql-9.4-postgis-2.1' returned 100: Reading package lists...
..
The following packages have unmet dependencies:
postgresql-9.4-postgis-2.1 : Depends: postgresql-9.4-postgis-scripts but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Checking an unrelated change i noticed puppet fails on maps1001.

puppet run-check in Icinga linked to this ticket which was resolved though., reopened it.

Notifications for host and all services on maps1001 were disabled in Icinga, re-enabled them, except puppet run.

puppet works fine on maps1002,1003 though ....

postgresql-9.4-postgis is now updated to 2.3 on all maps servers, puppet run is checked and working, puppet is aligned with postgis version 2.3. This should be resolved for real!