Bug 50070 - 51_samba4.52replication_sysvol fails in samba multiserver product tests
51_samba4.52replication_sysvol fails in samba multiserver product tests
Status: VERIFIED FIXED
Product: UCS Test
Classification: Unclassified
Component: Samba
unspecified
Other Linux
: P5 normal (vote)
: ---
Assigned To: Felix Botner
Arvid Requate
:
Depends on:
Blocks: 56645
  Show dependency treegraph
 
Reported: 2019-08-28 09:20 CEST by Felix Botner
Modified: 2023-09-23 13:42 CEST (History)
0 users

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:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Botner univentionstaff 2019-08-28 09:20:46 CEST
The test creates a GPO on a remote samba server. In the multiserver tests we also have a RODC and when the test accidentally picks this server the gpo can't be created:

samba-tool gpo create mc9FPEQ5 -H ldap://10.210.220.143 '-UAdminist...
(2019-08-27 19:22:53.109314) ERROR(runtime): uncaught exception - (3221225524, 'The object name is not found.')
(2019-08-27 19:22:53.109417)   File "/usr/lib/python2.7/dist-packages/samba/netcmd/__init__.py", line 185, in _run
(2019-08-27 19:22:53.109570)     return self.run(*args, **kwargs)
(2019-08-27 19:22:53.109634)   File "/usr/lib/python2.7/dist-packages/samba/netcmd/gpo.py", line 1161, in run
(2019-08-27 19:22:53.111579)     cldap_ret = net.finddc(address=dc_hostname, flags=flags)

10.210.220.143 is the RODC
Comment 1 Felix Botner univentionstaff 2019-09-02 09:54:21 CEST
The test gets the samba dc's via ldapsearch univentionService=Samba4, and in this particular setup, the test can also find the RODC.

Add a check whether the there is a dns-${hostname} user for the DC. If no such users exists we assume this is a RODC and skip this host.

Is there a better way to check for RODC's?
Comment 2 Arvid Requate univentionstaff 2019-09-02 22:38:08 CEST
probably host -t srv "ldap._tcp.dc._msdcs.$(ucr get domainname)" would not return the RODC. But that may be pretty fragile. Maybe we should change univentionService for the RODCs to make it easier to identify them? I don't think UCS Smba/AD RODCs are used very much yet.
Comment 3 Arvid Requate univentionstaff 2021-04-28 11:01:38 CEST
Ok, this works.