Bug 29970 - UCS 3.1 Appliance: UCR Variablen aus postinst-Skripten sind nicht gesetzt.
UCS 3.1 Appliance: UCR Variablen aus postinst-Skripten sind nicht gesetzt.
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - Basic settings
UCS 3.1
Other Linux
: P2 normal (vote)
: UCS 3.1-0-errata
Assigned To: Dirk Wiesenthal
Alexander Kläser
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-08 20:10 CET by Arvid Requate
Modified: 2013-01-15 15:15 CET (History)
9 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
/var/log/univention/config-registry.replog (37.01 KB, text/plain)
2013-01-08 20:11 CET, Arvid Requate
Details
base.conf (19.58 KB, text/plain)
2013-01-08 20:14 CET, Arvid Requate
Details
Tar mit allen Dateien (10.52 KB, application/x-gtar)
2013-01-08 20:23 CET, Arvid Requate
Details
setup.log (73.75 KB, text/plain)
2013-01-08 20:30 CET, Arvid Requate
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2013-01-08 20:10:15 CET
Bei der genaueren Analyse von Bug 29961 fiel auf, dass eine UCR-Variablen, die in univention-samba4.postinst gesetzt werden, sich dann nicht in base.conf finden.
Comment 1 Arvid Requate univentionstaff 2013-01-08 20:11:12 CET
Created attachment 4958 [details]
/var/log/univention/config-registry.replog
Comment 2 Arvid Requate univentionstaff 2013-01-08 20:14:20 CET
Created attachment 4959 [details]
base.conf

Die base.conf wurde ein paar Sekunden vor der config-registry.replog kopiert, man sieht aber, dass z.B. alle connector/.* Variablen nicht da sind ebenso wie die meisten der samba./ Variablen.
Comment 3 Arvid Requate univentionstaff 2013-01-08 20:23:11 CET
Created attachment 4960 [details]
Tar mit allen Dateien

z.B. sieht man im log, dass connector/s4/listener/dir gesetzt wird, aber nach Abschluß von system-setup ist die Variable nicht in base.conf
Comment 4 Arvid Requate univentionstaff 2013-01-08 20:30:42 CET
Created attachment 4961 [details]
setup.log
Comment 5 Stefan Gohmann univentionstaff 2013-01-08 20:34:40 CET
Der Status sollte nochmal geprüft werden, wenn Bug #15723 behoben ist. Siehe auch Bug #29758.
Comment 6 Sönke Schwardt-Krummrich univentionstaff 2013-01-09 09:14:30 CET
Den Effekt hatte ich im Appliance-Mode ebenfalls nachdem ich als zusätzliche Software univention-mail-server ausgewählt hatte. Die UCR-Variablen aus  univention-mail-server.postinst sind nach dem Durchlauf ebenfalls nicht gesetzt, obwohl die Änderung in config-registry.replog korrekt angezeigt wird.
Comment 7 Dirk Wiesenthal univentionstaff 2013-01-09 10:17:17 CET
In system-setup wird im Software-Installationsprozess jetzt kein bash-Skript mehr benutzt, sondern ein Python-Skript: SoftwareScript(AptScript). Und das ruft am Anfang ein ucr.load() und am Ende automatisch ein self.commit_ucr() auf:
  ucr.save()
  ucr.load()
  if self._ucr_changes:
    [...] # handler, aber der Teil wird nicht ausgeführt werden, denn das Skript setzt keine UCR-Variablen

Kann das zu den beschriebenen Problemen führen (insbesondere das save)?
Comment 8 Sönke Schwardt-Krummrich univentionstaff 2013-01-09 10:19:12 CET
(In reply to comment #7)
> In system-setup wird im Software-Installationsprozess jetzt kein bash-Skript
> mehr benutzt, sondern ein Python-Skript: SoftwareScript(AptScript). Und das
> ruft am Anfang ein ucr.load() und am Ende automatisch ein self.commit_ucr()
> auf:
>   ucr.save()
>   ucr.load()
>   if self._ucr_changes:
>     [...] # handler, aber der Teil wird nicht ausgeführt werden, denn das
> Skript setzt keine UCR-Variablen
> 
> Kann das zu den beschriebenen Problemen führen (insbesondere das save)?

Ja, dann wird der UCR-Zustand am Anfang einmal ausgelesen und am Ende wird der Anfangszustand wieder zurückgeschrieben.
Comment 9 Philipp Hahn univentionstaff 2013-01-09 10:34:58 CET
(In reply to comment #8)
> Ja, dann wird der UCR-Zustand am Anfang einmal ausgelesen und am Ende wird der
> Anfangszustand wieder zurückgeschrieben.

Deswegen siehe Bug #15723 comment 3; da ist auch ein Patch für base/univention-system-setup/umc/python/setup/setup_script.py
Comment 10 Dirk Wiesenthal univentionstaff 2013-01-09 12:03:38 CET
Fixed in:
  univention-system-setup 6.0.56-1.433.201301091151
Comment 11 Alexander Kläser univentionstaff 2013-01-11 12:48:14 CET
Beim Reproduzieren des Fehlers ist mir aufgefallen, dass die UCR-Variablen von anderen postinst-Skripten (bspw. Nagios-Server) gesetzt werden. Mir ist nicht wirklich verständlich warum dem so ist. Wie dem auch sei, zuverlässig konnte ich das Problem mit univention-samba4 und univention-s4-connector nachstellen.

Es wurde mir allerdings kein Hinweis ausgegeben in System-Setup, dass die Samba-Joinskripte fehlerhaft ausgeführt wurden (wie dies berichtet wurde). Mit anderen Worten, der Exit-Status der Samba-Joinskripte scheint normal zu sein → ist das so gewollt? univention-check-join-status zeigt jedoch die Join-Skripte als noch nicht ausgeführt an:

====================
root@appliance86:~# univention-check-join-status 
Warning: 'univention-samba4' is not configured.
Warning: 'univention-s4-connector' is not configured.
Warning: 'univention-samba4-dns' is not configured.
Error: Not all install files configured: 3 missing
====================

Vielleicht wäre es sinnvoll, dass System-Setup am Ende den Join-Status noch einmal überprüft, bzw. die Samba-Joinskripte sollten einen korrekten Fehlerstatus zurückgeben. Vielleicht ist deshalb der Fehler auch noch nicht früher aufgefallen?

Fix: OK
YAML-Datei: OK
Übernahme nach 3.1-1: OK
Changelog 3.1-1: OK
Comment 12 Alexander Kläser univentionstaff 2013-01-11 12:49:26 CET
(In reply to comment #11)
> ...
> Fix: OK

→ will heißen durch die hier eingebrachten Änderungen funktioniert die Installation nun korrekt.
Comment 13 Arvid Requate univentionstaff 2013-01-11 15:30:41 CET
> Es wurde mir allerdings kein Hinweis ausgegeben in System-Setup, dass die
> Samba-Joinskripte fehlerhaft ausgeführt wurden (wie dies berichtet wurde). Mit
> anderen Worten, der Exit-Status der Samba-Joinskripte scheint normal zu sein →
> ist das so gewollt?

Die exit codes sind != 0, aber univention-system-setup/scripts/setup-join.sh prüft das nicht, siehe Patch an Bug #29969 ;-)
Comment 14 Alexander Kläser univentionstaff 2013-01-11 16:10:52 CET
(In reply to comment #13)
> Die exit codes sind != 0, aber univention-system-setup/scripts/setup-join.sh
> prüft das nicht, siehe Patch an Bug #29969 ;-)

Ja, stimmt, danke für den Hinweis :) !
Comment 15 Alexander Kläser univentionstaff 2013-01-11 19:23:22 CET
YAML-Datei: 2012-12-21-univention-system-setup.yaml
Comment 16 Moritz Muehlenhoff univentionstaff 2013-01-15 15:15:47 CET
http://errata.univention.de/3.1-errata10.html