Bug 40690 - UCS 3.3 Postgres update
UCS 3.3 Postgres update
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: PostgreSQL
UCS 3.3
Other Linux
: P5 enhancement (vote)
: UCS 3.3
Assigned To: Janek Walkenhorst
Felix Botner
:
Depends on:
Blocks: 41272
  Show dependency treegraph
 
Reported: 2016-02-16 21:03 CET by Stefan Gohmann
Modified: 2016-06-07 21:35 CEST (History)
0 users

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Gohmann univentionstaff 2016-02-16 21:03:56 CET
Postgres should be updated to 9.1 (Debian Wheezy) in UCS 3.3.

We should block the update to UCS 3.3 if Postgres 8.4 is used. The migration must be done before the update to UCS 3.3 is started, therefore a Postgres 9.1 upgrade should be released as 3.2 erratum.
Comment 1 Janek Walkenhorst univentionstaff 2016-03-09 20:27:16 CET
The update to postgresql-9.1 is better done after the update to UCS 3.3.

***

A warning needs to be show to the user to explain the required update to postgresql-9.1:

univention-updater (9.100.2-1) unstable; urgency=medium

  * Add warning for PostgreSQL migration (Bug #40690)

***

PostgreSQL 9.1 needs to be available in UCS 3.3:

Successful build
Package: postgresql-9.1
Version: 9.1.16-0~ucs3.3.11.201603091845
Branch: ucs_3.3-0

***

The UCS 3.2 and UCS 4.0 versions of univention-postgresql had Bug #39595 hindering updates to other PostgreSQL versions.
The UCS 4.1 version of univention-postgresql was checked and taken as-is for UCS 3.3, the only change being a slightly reduced version number ("8.0.0-10~ucs3.3" < "8.0.0-10").
This should
* remove the problems when installing new PostgreSQL versions (like we require for UCS 3.3, as explained above) and
* not conflict with UCS 4.1 (as the version is lower but the code is the same, no migrations are triggered after 8.0.0-8, so 8.0.0-10~ucs3.3 → 8.0.0-10 is a no-op) and also
* not conflict with UCS 4.0 (as, although the version being newer and the package will therefore not be "upgraded", no changes 4.0→4.1 (except for Bug #39595) were done, and security/maintenance changes in univention-postgresql are unlikely)

univention-postgresql (8.0.0-10~ucs3.3) unstable; urgency=medium

  * Backport to UCS 3.3 (Bug #40690)
Comment 2 Felix Botner univentionstaff 2016-03-14 13:43:07 CET
During the dvd build the packages

univention-bacula
univention-pkgdb

can't be installed.

-> apt-get -d install univention-pkgdb
The following packages have unmet dependencies:
 univention-pkgdb : PreDepends: univention-postgresql (>= 2.0.1-5) but it is not going to be installed
E: Broken packages

-> apt-get -d install univention-pkgdb univention-postgresql
The following packages have unmet dependencies:
 univention-postgresql : Depends: univention-postgresql-8.4 but it is not going to be installed or
                                  univention-postgresql-9.1 but it is not going to be installed
E: Broken packages
Comment 3 Felix Botner univentionstaff 2016-03-18 09:37:47 CET
And on a updated system

-> apt-get -s install univention-pkgdb

Die folgenden Pakete haben unerfüllte Abhängigkeiten:
 univention-pkgdb : Hängt ab von (vorher): univention-postgresql (>= 2.0.1-5) soll aber nicht installiert werden
E: Beschädigte Pakete

-> apt-get -s install univention-pkgdb univention-postgresql

Die folgenden Pakete haben unerfüllte Abhängigkeiten:
 univention-postgresql-8.4 : Beschädigt: univention-pkgdb (< 9.0.1-2) aber 7.0.11-8.195.201410271620 soll installiert werden
Comment 4 Janek Walkenhorst univentionstaff 2016-04-19 19:30:07 CEST
Backported univention-bacula from 4.1 as there are no significant changes.
Comment 5 Janek Walkenhorst univentionstaff 2016-05-03 18:59:28 CEST
univention-pkgdb (7.100.1-1) unstable; urgency=medium

  * remove multifile entry from UCR specification, to only generate
    files for the correct postgresql version (Bug #39595) (Bug #40690)

r69096, r69097

Change univention-postgresql conflicts to allow univention-pkgdb (7.100.1-1) (Bug #40690)
Working around limited dpkg Breaks/Conflicts expressivity by listing conflicting versions explicitly.
Comment 6 Felix Botner univentionstaff 2016-05-04 11:44:26 CEST
Update from 3.2 to 3.3 (univention-postgresql 6.0.1-4.70.201309241236 is installed)

Investigating (0) univention-postgresql-8.4 [ amd64 ] < none -> 8.0.0-10~ucs3.3-1~ucs3.3.88.201605031855 > ( univention )
Broken univention-postgresql-8.4:amd64 Beschädigt on univention-pkgdb [ amd64 ] < 7.0.11-8.195.201410271620 > ( univention ) (= 7.0.11-8.195.201410271620)
  Considering univention-pkgdb:amd64 2 as a solution to univention-postgresql-8.4:amd64 1
  Holding Back univention-postgresql-8.4:amd64 rather than change univention-pkgdb:amd64

Investigating (1) univention-postgresql [ amd64 ] < 6.0.1-4.70.201309241236 -> 8.0.0-10~ucs3.3-1~ucs3.3.88.201605031855 > ( univention )
Broken univention-postgresql:amd64 Hängt ab von on univention-postgresql-8.4 [ amd64 ] < none -> 8.0.0-10~ucs3.3-1~ucs3.3.88.201605031855 > ( univention )
  Considering univention-postgresql-8.4:amd64 1 as a solution to univention-postgresql:amd64 2
  Holding Back univention-postgresql:amd64 rather than change univention-postgresql-8.4:amd64
Broken univention-postgresql:amd64 Hängt ab von on univention-postgresql-9.1 [ amd64 ] < none > ( none )
  Or group keep for univention-postgresql:amd64
 Try to Re-Instate (2) univention-postgresql:amd64

Die folgenden Pakete sind zurückgehalten worden:
  nmap univention-postgresql

also, do we need a check_for_postgresql83 (Bug #36371)?
Comment 7 Felix Botner univentionstaff 2016-05-04 11:51:30 CEST
On an upgraded system:

-> apt-get -s install univention-postgresql
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut       
Statusinformationen werden eingelesen... Fertig
Die folgenden Pakete wurden automatisch installiert und werden nicht mehr benötigt:
  libopts25 univention-postgresql libdns81 libndr-standard0 libsamba-credentials0 univention-postgresql-8.4 libsamba-util0 libisccfg80 libsamba-hostconfig0
  samba-dsdb-modules libisc81 libndr0
Verwenden Sie »apt-get autoremove«, um sie zu entfernen.
Die folgenden zusätzlichen Pakete werden installiert:
  univention-postgresql-8.4
Die folgenden Pakete werden ENTFERNT:
  univention-management-console-module-pkgdb univention-pkgdb
Die folgenden NEUEN Pakete werden installiert:
  univention-postgresql-8.4
Die folgenden Pakete werden aktualisiert (Upgrade):
  univention-postgresql
1 aktualisiert, 1 neu installiert, 2 zu entfernen und 1 nicht aktualisiert.
Comment 8 Janek Walkenhorst univentionstaff 2016-05-04 18:49:00 CEST
(In reply to Felix Botner from comment #6)
> Update from 3.2 to 3.3 (univention-postgresql 6.0.1-4.70.201309241236 is
> installed)
u-pkgdb was not yet in maintained.

> also, do we need a check_for_postgresql83 (Bug #36371)?
Added; Unskippable because it would break the upgrade of u-postgresql.
Comment 9 Felix Botner univentionstaff 2016-05-12 10:19:54 CEST
Update 3.2 -> 3.3 OK, but the update to 4.0 fails:

Broken univention-postgresql-8.4:i386 Beschädigt on univention-pkgdb [ i386 ] < 7.100.1-1~ucs3.3.205.201604261509 -> 8.1.1-1.194.201410271559 > ( univention ) (= 8.1.1-1.194.201410271559)
  Considering univention-pkgdb:i386 2 as a solution to univention-postgresql-8.4:i386 2
  Removing univention-postgresql-8.4:i386 rather than change univention-pkgdb:i386
Investigating (0) univention-postgresql [ i386 ] < 8.0.0-10~ucs3.3-1.89.201605041210 > ( univention )
Broken univention-postgresql:i386 Hängt ab von on univention-postgresql-8.4 [ i386 ] < 8.0.0-10~ucs3.3-1.89.201605041210 > ( univention )
  Considering univention-postgresql-8.4:i386 2 as a solution to univention-postgresql:i386 2
Broken univention-postgresql:i386 Hängt ab von on univention-postgresql-9.1 [ i386 ] < none > ( none )
  Or group remove for univention-postgresql:i386

Is it really a good idea to backport the 4.1 version of univention-postgresql to 3.3 and skip the 4.0 univention-postgresql? Why not just slightly modify the 3.2-8 version to support postgresql 9.1, 4.0-0 univention-postgresql seems to support postgresql 9.1 as well?
Comment 10 Felix Botner univentionstaff 2016-05-12 10:36:26 CEST
(In reply to Felix Botner from comment #9)
> Update 3.2 -> 3.3 OK, but the update to 4.0 fails:
> 
> Broken univention-postgresql-8.4:i386 Beschädigt on univention-pkgdb [ i386
> ] < 7.100.1-1~ucs3.3.205.201604261509 -> 8.1.1-1.194.201410271559 > (
> univention ) (= 8.1.1-1.194.201410271559)
>   Considering univention-pkgdb:i386 2 as a solution to
> univention-postgresql-8.4:i386 2
>   Removing univention-postgresql-8.4:i386 rather than change
> univention-pkgdb:i386
> Investigating (0) univention-postgresql [ i386 ] <
> 8.0.0-10~ucs3.3-1.89.201605041210 > ( univention )
> Broken univention-postgresql:i386 Hängt ab von on univention-postgresql-8.4
> [ i386 ] < 8.0.0-10~ucs3.3-1.89.201605041210 > ( univention )
>   Considering univention-postgresql-8.4:i386 2 as a solution to
> univention-postgresql:i386 2
> Broken univention-postgresql:i386 Hängt ab von on univention-postgresql-9.1
> [ i386 ] < none > ( none )
>   Or group remove for univention-postgresql:i386
> 
> Is it really a good idea to backport the 4.1 version of
> univention-postgresql to 3.3 and skip the 4.0 univention-postgresql? Why not
> just slightly modify the 3.2-8 version to support postgresql 9.1, 4.0-0
> univention-postgresql seems to support postgresql 9.1 as well?

some more apt-get output:
Die folgenden Pakete werden ENTFERNT:
  defoma kdebase-runtime kdebase-runtime-data libdrm-nouveau1 libept1
  libkutils4 libpango1.0-common libperl5.10 libqt4-webkit libraptor1
  librasqal2 libsdl1.2debian-alsa myspell-de-ch portmap qt4-qtconfig
  univention-management-console-module-pkgdb univention-pkgdb
  univention-postgresql univention-postgresql-8.4

or we add the 4.1 version of univention-pkgdb (univention-bacula) to the 3.2-4.0 transition component, but i'm sure there are some more apps that depend on univention-postgres (and they probably don't survive the update to 4.0 too)
Comment 11 Stefan Gohmann univentionstaff 2016-05-20 17:13:00 CEST
I've now rebuild the packages 
 univention-postgreql, univention-pkgdb and univention-bacula

I've used the UCS 4.0 packages / patches as a base.

univention-postgresql 
r69413:
 * Revert upgrade to UCS 4.1 package (Bug #40690)
r69414:
 * Merge UCS 4.0 package into UCS 3.3 (Bug #40690)

univention-pkgdb
r69440:
* Revert r68912 and add changes from UCS 4.0 (Bug #40690)

univention-bacula
r69442:
* Revert to UCS 3.3 status (Bug #40690)
r69443:
* Merge UCS 4.0 changes (Bug #40690)

First tests were successful, waiting for Jenkins results.
Comment 12 Stefan Gohmann univentionstaff 2016-05-21 07:41:47 CEST
(In reply to Stefan Gohmann from comment #11)
> First tests were successful, waiting for Jenkins results.

Failed.

Two more changes:

r16532 postgresql-common:
In UCS 3.3, it is possible that 8.4 and 9.1 are installed. The Debian way
is to configure the port automatically. Unfortunataly, the configuration
is overwritten by a UCR template. Thus, the second start fail.

r69451:
Migrate Postgres 8.4 to 9.1 before updating from UCS 3.3 to UCS 4.1 in Jenkins update tests.

We should force the migration of 8.4 to 9.1 before the upgrade from 3.3 to 4.0 can be started. I'll split it into  new bug.
Comment 13 Stefan Gohmann univentionstaff 2016-05-23 06:32:18 CEST
(In reply to Stefan Gohmann from comment #12)
> (In reply to Stefan Gohmann from comment #11)
> > First tests were successful, waiting for Jenkins results.
> 
> Failed.
> 
> Two more changes:
> 
> r16532 postgresql-common:
> In UCS 3.3, it is possible that 8.4 and 9.1 are installed. The Debian way
> is to configure the port automatically. Unfortunataly, the configuration
> is overwritten by a UCR template. Thus, the second start fail.
> 
> r69451:
> Migrate Postgres 8.4 to 9.1 before updating from UCS 3.3 to UCS 4.1 in
> Jenkins update tests.
> 
> We should force the migration of 8.4 to 9.1 before the upgrade from 3.3 to
> 4.0 can be started. I'll split it into  new bug.

That is Bug #41315.

I've also created a transition package univention-postgresql-9.1 which will be installed during the PostgreSQL 9.1 migration.

I've re-added univention-pkgdb and univention-bacula to the Jenkins tests. The new installation tests are OK and the upgrade to UCS 4.1-2 works as well.

Changelog + Release Notes hint: r69457 + r69458
Comment 14 Felix Botner univentionstaff 2016-05-23 15:10:02 CEST
OK - update 3.2->3.3->4.1 with univention-pkgdb and univention-bacula
OK - 3.3 install univention-pkgdb and univention-bacula update to 4.1

OK - changelog
Comment 15 Stefan Gohmann univentionstaff 2016-06-07 21:35:43 CEST
UCS 3.3 has been released:
 https://docs.software-univention.de/release-notes-3.3-0-en.html
 https://docs.software-univention.de/release-notes-3.3-0-de.html

If this error occurs again, please use "Clone This Bug".