Bug 46062 - backup2master: resolve_reference() too fuzzy
backup2master: resolve_reference() too fuzzy
Status: RESOLVED FIXED
Product: UCS
Classification: Unclassified
Component: backup2master
UCS 5.0
Other other
: P5 normal (vote)
: UCS 5.0-6
Assigned To: Philipp Hahn
UCS maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-01-17 11:11 CET by Michael Grandjean
Modified: 2023-12-12 11:10 CET (History)
2 users (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?: 2: Will only affect a 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.046
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2018011221000555
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.
Comment 1 Michael Grandjean univentionstaff 2018-01-17 11:17:02 CET
First comment contains customer information, here is an adjusted copy:

https://git.knut.univention.de/univention/ucs/blob/4.3-0/management/univention-ldap/univention-backup2master#L75

-> resolve_reference() also finds references that are only similar to the hostname / FQDN of the UCS Master, nut no exact matches. This is quite dangerous, because backup2master suggests to change reference from a completely different server to the Backup (= new UCS Master).

Example:

Hostname of UCS Master: ucs
Hostname of UCS Backup: backup1
Hostname of UCS Slaves: ucs-$SCHOOL
Name of example school: abcdef


> udm shares/share (attribute host) contains a reference to ucs in cn=share01,cn=shares,ou=abcdef,dc=example,dc=org
> 
> Do you want this reference to be changed from
>   "ucs-abcdef.example.org"
> to
>   "backup1-abcdef.example.org"
> [Y|n|remove]?

The script should only change references that exactly match the UCS Master.
The current behaviour is very annoying and time-consuming especially in environments with a lot of UCS@school slaves that follow the naming scheme above.
Comment 2 Philipp Hahn univentionstaff 2023-12-12 11:10:40 CET
Running `univention-backup2master` on "backup.master2backup.test" renamed the *domain* "master2backup" to "backup2backup"!

[5.0-6] b7bfbca9a0 fix(backup2master): fix logic bugs
 doc/changelog/index.rst                             |   4 +
 management/univention-ldap/debian/changelog         |   6 +
 management/univention-ldap/univention-backup2master | 533 ++++++++++++++++++----------------------
 test/scenarios/base/backup2master.cfg               | 145 +++++++++++
 4 files changed, 399 insertions(+), 289 deletions(-)

Package: univention-ldap
Version: 16.0.14-2
Branch: ucs_5.0-0
Scope: ucs5.0-6