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.
``^

Details

Related Gerrit Patches:
operations/puppet : productionPostgresql / postgis: use full package name

Event Timeline

Gehel created this task.Oct 10 2016, 8:37 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 10 2016, 8:37 AM
Gehel added a comment.Oct 10 2016, 9:08 AM

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 moved this task from Backlog to In progress on the Maps-Sprint board.Oct 10 2016, 11:22 AM
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

Gehel closed this task as Resolved.Oct 10 2016, 8:53 PM
Dzahn reopened this task as Open.Oct 21 2016, 9:59 PM
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 ....

Gehel closed this task as Resolved.Oct 24 2016, 2:17 PM

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!