Bug 37534 - Update to UCS 4 breaks if /var/lib/samba/secrets.tdb (or others) exist
Update to UCS 4 breaks if /var/lib/samba/secrets.tdb (or others) exist
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Update - Release updates
UCS 4.0
Other Linux
: P5 critical (vote)
: UCS 4.0-0-errata
Assigned To: Arvid Requate
Stefan Gohmann
:
: 37420 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-01-13 17:00 CET by Janis Meybohm
Modified: 2015-02-10 15:34 CET (History)
3 users (show)

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 Janis Meybohm univentionstaff 2015-01-13 17:00:00 CET
Ticket#2015011321000424 

samba-libs.preinst breaks if some tdb files exist in /var/lib/samba/ AND /var/lib/samba/private/
---
for file in passdb.tdb secrets.tdb schannel_store.tdb idmap2.tdb
        do
                if [ -e /var/lib/samba/$file ]
                then
                        if [ -e /var/lib/samba/private/$file ] &&
                                [ ! /var/lib/samba/$file -ef /var/lib/samba/private/$file ]
                        then
                                echo $file exists in /var/lib/samba and /var/lib/samba/private, aborting samba-libs preinst
                                echo rename one of them to allow the install/upgrade to continue
                                echo http://bugs.debian.org/726472
                                ls -al /var/lib/samba /var/lib/samba/private
                                exit 1
                        fi
                fi
        done
---

Selecting previously deselected package samba-libs.
Unpacking samba-libs (from .../samba-libs_2%3a4.2.0~rc2-1.708.201411171637_amd64.deb) ...
secrets.tdb exists in /var/lib/samba and /var/lib/samba/private, aborting samba-libs preinst
rename one of them to allow the install/upgrade to continue
http://bugs.debian.org/726472


This hit a customers DC-Backup that was migrated from Samba 3 to Samba 4 (while on UCS 3.x). The broken update left the system in a very bad state as networking and tty login where no longer possible.
Comment 1 Stefan Gohmann univentionstaff 2015-01-21 10:54:51 CET
Maybe we should fix it as erratum for UCS 3.2-4. Otherwise we should adjust the updater preup script.
Comment 2 Arvid Requate univentionstaff 2015-01-22 20:18:00 CET
I adjusted univention-updater/script/preup.sh. For QA I copied it to
mirror/testing/4.0/maintained/4.0-0/all and signed it with the UCS 4.0 archive key.
Comment 3 Stefan Gohmann univentionstaff 2015-01-27 06:59:54 CET
It has been overwritten by a testing announce. Could you re-copy it? I've changed the cron job.
Comment 4 Arvid Requate univentionstaff 2015-01-27 11:54:43 CET
Ok, added some more logging output and re-installed it to testing.
Comment 5 Stefan Gohmann univentionstaff 2015-01-28 07:55:13 CET
(In reply to Arvid Requate from comment #4)
> Ok, added some more logging output and re-installed it to testing.

Please redirect the output the logfile. Otherwise it is difficult to retrace a support case.
Comment 6 Arvid Requate univentionstaff 2015-01-28 11:37:05 CET
Ok, adjusted.
Comment 7 Stefan Gohmann univentionstaff 2015-01-28 16:14:40 CET
OK, it works.
Comment 8 Arvid Requate univentionstaff 2015-01-28 17:03:06 CET
Advisory updated: 2014-12-01-univention-updater.yaml
Comment 9 Stefan Gohmann univentionstaff 2015-01-28 17:05:52 CET
(In reply to Arvid Requate from comment #8)
> Advisory updated: 2014-12-01-univention-updater.yaml

OK
Comment 10 Janek Walkenhorst univentionstaff 2015-01-29 11:47:25 CET
<http://errata.univention.de/ucs/4.0/53.html>
Comment 11 Stefan Gohmann univentionstaff 2015-02-10 15:34:49 CET
*** Bug 37420 has been marked as a duplicate of this bug. ***