Bug 48548 - UCRV "ldap/master" wrong after univention-backup2master
UCRV "ldap/master" wrong after univention-backup2master
Status: RESOLVED FIXED
Product: UCS
Classification: Unclassified
Component: backup2master
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 5.0-6
Assigned To: Philipp Hahn
UCS maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-01-30 18:08 CET by Philipp Hahn
Modified: 2023-12-11 14:47 CET (History)
1 user (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.057
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 Philipp Hahn univentionstaff 2019-01-30 18:08:57 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.
Comment 1 Philipp Hahn univentionstaff 2020-11-20 17:36:53 CET
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.
Comment 2 Ingo Steuwer univentionstaff 2021-05-14 16:38:23 CEST
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.
Comment 3 Philipp Hahn univentionstaff 2021-07-01 08:08:55 CEST
Still relevant with UCS-5
Comment 4 Philipp Hahn univentionstaff 2023-12-11 14:47:54 CET
[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