Bug 26560 - Update nach der Installation schlägt fehl
Update nach der Installation schlägt fehl
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Samba4
UCS 3.0
Other Linux
: P5 normal (vote)
: UCS 3.0-2
Assigned To: Philipp Hahn
Arvid Requate
: interim-3
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-20 11:29 CET by Felix Botner
Modified: 2012-07-20 15:25 CEST (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
installation.log.gz (61.71 KB, application/x-gzip)
2012-03-20 11:29 CET, Felix Botner
Details
updater.log.gz (18.01 KB, application/x-gzip)
2012-03-20 11:29 CET, Felix Botner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Botner univentionstaff 2012-03-20 11:29:39 CET
Created attachment 4280 [details]
installation.log.gz

Ich habe einen UCS Master 3.0-0 amd64 installiert, am Ende der Installation hat
er die Updates eingespielt. 

Nach einem Neustart stellte sich jedoch heraus, dass zwar auf 3.0-1
aktualisiert wurde, die errata Updates fehlten jedoch. Der Updater sagt an der
entsprechenden Stelle folgendes:

Error: Update aborted due to configuration error: Configuration error: host is
unresolvable

Vermutung ist, dass beim ersten Update (auf 3.0-1) wichtige System-Dienste
(bind) neu gestartet wurden und diese beim nächsten Update Versuch (errata
Updates) noch nicht wieder richtig funktionierten.
Comment 1 Felix Botner univentionstaff 2012-03-20 11:29:56 CET
Created attachment 4281 [details]
updater.log.gz
Comment 2 Tim Petersen univentionstaff 2012-04-30 10:43:50 CEST
Konnte ich eben mit gleichen Logmeldungen auch beobachten.
Ohne Anpassungen werden die Errata-Updates dann beim händischen "univention-upgrade net" gezogen.

Hier sollte evt. die Priorität entsprechend erhöht werden, da das nicht direkt auffällt und man denkt, man würde mit einem aktuellen System arbeiten.
Comment 3 Philipp Hahn univentionstaff 2012-07-10 20:29:55 CEST
**** Starting univention-updater with parameter=['/usr/share/univention-updater/univention-updater', 'net', '--updateto', '3.0-1', '--silent']
...
Error: Update aborted due to configuration error: Configuration error: host is unresolvable
exitcode of univention-updater: 1


PROGRESS: calling /bin/sh /lib/univention-installer-scripts.d/90_upgrade.sh < /dev/tty1 2>&1 | tee -a /instmnt/var/log/univention/installation.log > /dev/tty6
...
Error: Please check "/var/log/univention/updater.log" for details.
ERROR: update failed. Please check /var/log/univention/updater.log


# cat /etc/apt/sources.list.d/15*
Configuration error: host is unresolvable
# ucr get repository/online/server
updates.software-univention.de
# host updates.software-univention.de
;; connection times out; no servers could be reached
# cat /etc/resolv.conf
nameserver 10.200.17.97
# pgrep -c named
0
# cat /var/log/daemon.log
named[1092]: loading configuration from '/etc/bind/named.conf.samba4'
named[1092]: samba_dlz: Unable to get basedn for ldapi:///var/lib/samba/private/ldap_priv/ldapi - connection to remote LDAP server dropped?
named[1029]: dlz_dlopen of 'samba4.zone' failed
named[1029]: SDL2 driver failed to load.
named[1029]: DLZ driver failed to load.
named[1029]: loading configuration: failures
named[1029]: exiting (due to fatal error)
# export LDB_MODULES_PATH=/usr/lib/samba/ldb/
# named -c /etc/bind/named.conf.samba4 -f
# host updates.software-univention.de
updates.software-univention.de has address 85.214.27.218
updates.software-univention.de has IPv6 address 2a01:238:43b3:da00:516f:fc92:a5f:d5a3
updates.software-univention.de mail is handled by 10 software-univention.de.

<http://answerpot.com/showthread.php?2134491-bind9+dlopen%2Fdlz+problems>
Comment 4 Stefan Gohmann univentionstaff 2012-07-11 07:36:22 CEST
Das Problem selbst konnte ich nicht reproduzieren. Vor dem eigentliche Update wird jetzt geprüft, ob bind läuft, wenn nicht, dann wird er gestartet.

Paket baut, Tests stehen noch aus.
Comment 5 Stefan Gohmann univentionstaff 2012-07-11 08:57:14 CEST
(In reply to comment #4)
> Das Problem selbst konnte ich nicht reproduzieren. Vor dem eigentliche Update
> wird jetzt geprüft, ob bind läuft, wenn nicht, dann wird er gestartet.
> 
> Paket baut, Tests stehen noch aus.

Wir haben das nochmal nachgeschaut. Das Problem ist, dass im Samba4 Init Skript ein crestart des bind9 gemacht wird. Wenn die Reihenfolge so ist, dann läuft der bind erst nach einigen Sekunden wieder (runit Intervall):
bind9 stop
samba4 stop
bind9 start
samba4 start

Das bind9 crestart soll jetzt prüfen, ob der bind9 laufen soll.
Comment 6 Philipp Hahn univentionstaff 2012-07-11 20:32:59 CEST
Vermutlich passiert folgendes:
 /etc/init.d/bind9 stop
 /etc/init.d/samba4 stop
 ...
 /etc/init.d/bind9 start # schlägt fehl, weil samab4 nicht verfügbar ist
 /etc/init.d/samba4 start # macht ein "bind9 crestart", was nicht funktioniert, weil bind9 nicht läuft; "sv status" liefert "finished" statt "run".

Ein mitlaufendes "while sleep 1;do date;ps axf;echo;done >/var/log/ps.log" hat das auch bestätigt:

18:37:52 samba4 wird gestoppt
18:38:44 bind9 wird neu gestartet → Fehlschlag → "sleep 5"
18:38:49 2. Versuch  → Fehlschlag → "sleep 10"
18:38:59 3. Versuch  → Fehlschlag → "sleep 20"
18:39:20 4. Versuch  → Fehlschlag → "sleep 40"
18:39:59 5. Versuch  → Fehlschlag → "sleep 60"
18:40:20 samba4 wird gestartet, während univention-bind-samba4 bereits im "sleep 60" hängt.
18:40:30 samba4 versucht ein "/etc/init.d/bind9 crestart"
18:40:56 "univention-upgrade net" kann den Depotserver nicht auflösen und bricht ab

Das init.d/bind9 Skript wurde so geändert, daß nun neben "run:" auch "finish:.*normally down" aber nicht "finish:.*nodmally down, want down" als Zustand gewertet wird, in dem der bind9 läuft bzw. laufen sollte.
Damit hat eine Installation von 3.0-0 über 3.0-1 und allen errata-Updates funktioniert.

Zum Testen kann man das aktualisierte Template per "nc -p 55443 <branches/ucs-3.0/ucs/services/univention-bind/conffiles/etc/init.d/bind9" verfügbar machen und rechtzeitig während der Installation auf der 2. Konsole per "nc ip.of.the.host 55443 >/instmnt/etc/univention/templates/files/etc/init.d/bind9" unterschieben.
Zum Überwachen kann man gut ein "watch ps fo command" mitlaufen lassen um zu sehen, was der Installer gerade so tut.

Bitte beachten: Da der Fehler beim Update von 3.0-0 auf 3.0-1 auftritt, haben wir keine Möglichkeit das rückwirkend zu korrigieren; die errata-Updates werden erst nach dem 3.0-1 Update eingespielt!

svn34140, univention-bind_6.0.41-5.159.201207112030

ChangeLog: svn13918
\item The template for \ucsFile{/etc/init.d/bind9} was modified to handle the error case, where restarting the DNS service fails when \ucsCommand{samba4} is used as the backend (\ucsBug{26560}).
Comment 7 Stefan Gohmann univentionstaff 2012-07-11 20:51:37 CEST
Kommen diese Meldungen von deiner Anpassung?

Not updating nameserver/external
local: 38: univention-bind:: bad variable name
Restarting bind9 daemon: .
done.
local: 38: univention-bind-proxy:: bad variable name
Restarting bind9 daemon: .
done.
Comment 8 Philipp Hahn univentionstaff 2012-07-12 12:35:00 CEST
(In reply to comment #7)
> Kommen diese Meldungen von deiner Anpassung?
Ja, die shell hat „local var=$(prog)” zerlegt.

svn34164, univention-bind_6.0.41-6.160.201207121232
ChangeLog: ±0
Comment 9 Arvid Requate univentionstaff 2012-07-12 15:50:10 CEST
Verified:
 * Funktioniert jetzt wieder, direkt im Anschluss des Updates wurden z.B. errata92+93 eingespielt
 * Changelog OK
Comment 10 Stefan Gohmann univentionstaff 2012-07-20 15:25:38 CEST
UCS 3.0-2 has been released: 
  http://forum.univention.de/viewtopic.php?f=54&t=1905

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