Bug 28417 - Slave Join gegen Samba4-DC Master failed in 03univention-directory-listener.inst
Slave Join gegen Samba4-DC Master failed in 03univention-directory-listener.inst
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Listener (univention-directory-listener)
UCS 3.0
Other Linux
: P5 normal (vote)
: UCS 3.1
Assigned To: Philipp Hahn
Stefan Gohmann
: interim-1
Depends on: 27330
Blocks: 28459
  Show dependency treegraph
 
Reported: 2012-09-05 12:01 CEST by Arvid Requate
Modified: 2012-12-12 21:10 CET (History)
2 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 Arvid Requate univentionstaff 2012-09-05 12:01:24 CEST
Der Join eines Slave gegen einen Samba4-DC Master schlägt zur Zeit fehl:

=========================================================================
root@slave12:~# univention-join 
/usr/sbin/univention-join: line 33: }#: command not found
univention-join: joins a computer to an ucs domain
copyright (c) 2001-2012 Univention GmbH, Germany

Enter DC Master Account : Administrator
Enter DC Master Password: 

Search DC Master:                                          done
Check DC Master:                                           done
Stop LDAP Server:                                          done
Stop Samba 4 Server:                                       done
Search ldap/base                                           done
Start LDAP Server:                                         done
Search LDAP binddn                                         done
Sync time                                                  done
Join Computer Account:                                     done
Stopping univention-directory-listener daemon:  done
Sync ldap-backup.secret:                                   done
Check TLS connection                                       done
Download host certificate                                  done
Restart LDAP Server:                                       done
Sync Kerberos settings:                                    done
Configure 01univention-ldap-server-init.inst               done
Configure 03univention-directory-listener.inst             failed


**************************************************************************
* Join failed!                                                           *
* Contact your system administrator                                      *
**************************************************************************
* Message:  FAILED: 03univention-directory-listener.inst
**************************************************************************
=========================================================================




Sollte aber eigentlich gehen:

root@slave12:~# ldapsearch -xLLL -h master10.arucs3i8.qa -p 7389 -D "$ldap_hostdn" -y /etc/machine.secret cn=$hostname dn
dn: cn=slave12,cn=dc,cn=computers,dc=arucs3i8,dc=qa



Aus den Join.log mit set -x:

=========================================================================
+ options=-o -x -ZZ -d 1 -i -h master10.arucs3i8.qa -b dc=arucs3i8,dc=qa -m /usr/lib/univention-directory-listener/system -c /var/lib/univention-directory-listener
+ [ -n domaincontroller_slave ]
+ [ domaincontroller_slave = domaincontroller_master -o domaincontroller_slave = domaincontroller_backup ]
+ univention-config-registry get ldap/hostdn
+ /usr/sbin/univention-directory-listener -o -x -ZZ -d 1 -i -h master10.arucs3i8.qa -b dc=arucs3i8,dc=qa -m /usr/lib/univention-directory-listener/system -c /var/lib/univention-directory-listener -D cn=slave12,cn=dc,cn=computers,dc=arucs3i8,dc=qa -y /etc/machine.secret
03.07.12 19:46:33.772  DEBUG_INIT
03.07.12 19:46:33.811  LISTENER    ( ERROR   ) : failed to connect to notifier
03.07.12 19:46:33.812  LISTENER    ( WARN    ) : can not connect to ldap server (master10.arucs3i8.qa)
03.07.12 19:46:33.812  LISTENER    ( ERROR   ) : can not connect to any ldap server, exit
=========================================================================
Comment 1 Arvid Requate univentionstaff 2012-09-05 12:04:46 CEST
Version 7.0.1-1.156.201209051...
Comment 2 Philipp Hahn univentionstaff 2012-09-05 14:46:51 CEST
Durch commit svn35226 wurde das Locking auf atomar umgestellt, was einen vorher bereits vorhandenen Fehler erst sichtbar gemacht hat: lockf() darf nur auf Dateien aufgerufen werden, die zum Schreiben geöffnet sind. Der Notifier hat das allerdings für alle Dateien gemacht und den auftretenden Fehlercode stillschweigend ignoriert. Insbesondere wurden einige .lock-Dateien ro geöffnet!

Damit das Locking jetzt funktioniert, wurde folgendes geändert: Die .lock-Datei wird immer im "a"ppend-Modus geöffnet, unabhängig davon was flock_file() als Dateityp ('r', 'w', 'a+') für die eigentliche Datei übergeben wird.

Dabei ist auch noch aufgefallen, daß im Fehlerfall oft vergessen wurde die Dateien zu schließen, die Locks und den Speicher freizugeben. Das wurde ebenfalls korrigiert.

svn35258,35261
univention-directory-listener_7.0.3-1.158.201209051438
univention-directory-notifier_7.0.4-2.64.201209051440

ChangeLog: svn14599
\item Several memory leaks and out-of-memory conditions have been fixed (\ucsBug{27330}, \ucsBug{28417}).
\item The locking used by the Listener and Notifier daemon has been changed to be atomic (\ucsBug{27730}, \ucsBug{28417}).
Comment 3 Stefan Gohmann univentionstaff 2012-09-11 10:55:02 CEST
OK, Replikation unter Volllast problemlos möglich.

Changelog: OK

Join: OK
Comment 4 Stefan Gohmann univentionstaff 2012-12-12 21:10:28 CET
UCS 3.1-0 has been released: 
 http://forum.univention.de/viewtopic.php?f=54&t=2125

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