Univention Bugzilla – Bug 48548
UCRV "ldap/master" wrong after univention-backup2master
Last modified: 2023-12-11 14:47:54 CET
UCS Technical Training 2019-01-29/30 Scenario: 1*Master, 2*Backup 1. Master fails 2. 1st Backup is upgraded to new Master via "univention-backup2master" 3. On the 2nd Backup UCRV "ldap/master" still points to the old master. 4. That UCRV is used by UDL to contact the UDN - which will fail until UCRV "ldap/master" is updated manually and UDL is restarted. management/univention-directory-listener/src/select_server.c:86 86 »···ldap_master = univention_config_get_string("ldap/master"); 87 »···if (!ldap_master) { 88 »···»···univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_ERROR, "UCRV 'ldap/master' is not set"); 89 »···»···abort(); 90 »···} 91 »···ldap_master_port = univention_config_get_int("ldap/master/port"); 92 93 »···/* if this is a master or backup return ldap/master */ 94 »···if (!strcmp(server_role, "domaincontroller_master") || !strcmp(server_role, "domaincontroller_backup")) { 95 »···»···lp->host = strdup(ldap_master); 96 »···»···if (ldap_master_port > 0) 97 »···»···»···lp->port = ldap_master_port; 98 »···»···goto result; 99 »···} else { Maybe backups should use their peers as a fallback if UDN @ master fails? That way UDL @ backup2 would re-connect to UDN @ backup1 and continue after backup2master without manual intervention.
TT 2020-11-19/20 We should at least have a "UMC diagnostics check" which compares UCRV "ldap/master" to `dig +short _domaincontroller_master._tcp.$(dnsdomainname) srv`. Or have a UDL module which updates the UCRV when "univentionServerRole=master" is re-assigned in LDAP.
This issue has been filed against UCS 4.3. UCS 4.3 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed. If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.
Still relevant with UCS-5
[5.0-6] 90f48ade5e feat(diag): Check UCRV ldap/master doc/changelog/index.rst | 2 + .../debian/changelog | 5 +- .../umc/python/diagnostic/de.po | 113 ++++++++++++++++------------ .../umc/python/diagnostic/plugins/05_check_ldap_master.py | 99 ++++++++++++++++++++++++ .../umc/python/diagnostic/plugins/59_ldap_server_name.py | 17 ++--- 5 files changed, 177 insertions(+), 59 deletions(-) Package: univention-management-console-module-diagnostic Version: 6.0.7-1 Branch: ucs_5.0-0 Scope: ucs5.0-6 QA: ucr set ldap/master=localhost ucr unset diagnostic/check/disable/05_check_ldap_master univention-run-diagnostic-checks --username Administrator --bindpwdfile <(echo univention) -t 05_check_ldap_master ucr get ldap/master