Bug 43041 - wait_for_drs_replication(): skip if no domain found
wait_for_drs_replication(): skip if no domain found
Status: CLOSED FIXED
Product: UCS Test
Classification: Unclassified
Component: Samba
unspecified
Other Linux
: P5 normal (vote)
: UCS 4.2
Assigned To: Florian Best
Stefan Gohmann
: interim-3
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-11-23 10:43 CET by Florian Best
Modified: 2017-04-04 18:29 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Development Internal
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:
best: Patch_Available+


Attachments
patch (1.14 KB, patch)
2016-11-23 10:43 CET, Florian Best
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2016-11-23 10:43:22 CET
Created attachment 8239 [details]
patch

I often have the problem when starting a UCS@school test script on a UCS@school Multiserver DC Master. If these test scripts contain wait_for_drs_replication() they always wait 5 minutes in each call with the same dump error message:

Waiting for DRS replication, filter: 'foo=bar' Error during samdb.search: ldb_search: invalid basedn '(null)'
. Error during samdb.search: ldb_search: invalid basedn '(null)'
. Error during samdb.search: ldb_search: invalid basedn '(null)'
. Error during samdb.search: ldb_search: invalid basedn '(null)'
. Error during samdb.search: ldb_search: invalid basedn '(null)'
. Error during samdb.search: ldb_search: invalid basedn '(null)'
. Error during samdb.search: ldb_search: invalid basedn '(null)'
…

We should either ignore this and return immediately or raise an Exception.
Patch for the first one is attached.

@Arvid: Do you have an opinion about this?
Comment 1 Arvid Requate univentionstaff 2016-11-23 12:57:22 CET
Ok, I think is UCS@school we solved this by running

samba-tool drs showrepl "$ldap_master" || exit 0

or something along that line, which fails if there is no DRS replication with the "$ldap_master". Actually that should better be the host which advertises "univentionService=S4 Connector", in the odd case, where it's run on a DC Backup.
Comment 2 Florian Best univentionstaff 2017-01-12 21:46:12 CET
ucs-test (7.0.6-47):
r75733 | Bug #43041: stupid samba lib return string 'None'
r75732 | Bug #43041: skip wait_for_drs_replication if no samba domain is found.  otherwise this takes ages
Comment 3 Stefan Gohmann univentionstaff 2017-03-07 14:06:20 CET
OK, looks good.
Comment 4 Stefan Gohmann univentionstaff 2017-04-04 18:29:21 CEST
UCS 4.2 has been released:
 https://docs.software-univention.de/release-notes-4.2-0-en.html
 https://docs.software-univention.de/release-notes-4.2-0-de.html

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