summaryrefslogtreecommitdiff
path: root/selftest/knownfail.d/getncchanges
Commit message (Collapse)AuthorAgeFilesLines
* getncchanges.py: Add a multi-valued linked attribute testTim Beale2017-09-181-0/+1
| | | | | | | | | | | | | | Add a test where a source object links to multiple different targets. First we do the replication without GET_TGT and check that the server can handle sending a chunk containing only links (in the middle of the replication). Then we repeat the replication forcing GET_TGT to be used. To avoid having to create 1500 objects/links, I've lowered the 'max link sync' setting on the vampire_dc testenv to 250. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* drs: Add basic GET_TGT supportTim Beale2017-09-181-9/+0
| | | | | | | | | | | | | | | | | | | | | | This adds basic DRS_GET_TGT support. If the GET_TGT flag is specified then the server will use the object cache to store the objects it sends back. If the target object for a linked attribute is not in the cache (i.e. it has not been sent already), then it is added to the response message. Note that large numbers of linked attributes will not be handled well yet - the server could potentially try to send more than will fit in a single repsonse message. Also note that the client can sometimes set the GET_TGT flag even if the server is still sending the links last. In this case, we know the client supports GET_TGT so it's safe to send the links interleaved with the source objects (the alternative of fetching the target objects but not sending the links until last doesn't really make any sense). Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* getncchanges.py: Add tests for object deletion during replicationTim Beale2017-09-181-0/+2
| | | | | | | | | Add tests that delete the source and target objects for linked attributes in the middle of a replication cycle. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* getncchanges.py: Add test for GET_ANC and GET_TGT combinedTim Beale2017-09-181-0/+2
| | | | | | | | | | | | | | | The code has to handle needing GET_ANC and GET_TGT in combination, i.e. where we fetch the target object for the linked attribute and the target object's parent is unknown as well. This patch adds a test case to exercise this code path. The second part of this test exercises GET_ANC/GET_TGT for an incremental replication, where the objects are getting filtered by an uptodateness-vector/HWM. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* getncchanges.py: Add test for adding links during replicationTim Beale2017-09-181-0/+2
| | | | | | | | | | | | | | | | | We have identified a case where the Samba server can send linked attributes but not the target object. In this case, the Samba DRS client would hit the "Failed to re-resolve GUID" case in replmd and silently discard the linked attribute. However, Samba will resend the linked attribute in the next cycle (because its USN is still higher than the committed HWM), so it should recover OK. On older releases, this may have caused problems if the first error resulting in a hanging link (which might mean the second time it's processed it still fails to be added). Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* getncchanges.py: Add some GET_TGT test casesTim Beale2017-09-181-0/+8
test_repl_get_tgt: - Adds 2 sets of objects - Links one set to the other - Changes the order so the target object comes last in the replication (which means the client has to use GET_TGT) - Checks that when GET_TGT is used that we have received all target objects we need to resolve the linked attibutes - Checks that we expect to receive the linked attributes *before* the last chunk is sent (by default, Samba sends all the links at the end, so this fails) - Checks that we eventually receive all expected objects, and all links we receive match what is expected test_repl_get_tgt_chain: This adds the linked attributes in a more complicated chain. We add 300 objects, but the links for 100 objects will point to a linked chain of 200 objects. This was mainly to determine whether or not Windows follows the target object (i.e. whether it sends all the links for the target object as well). It turns out Windows maintains its own linked attribute DB, so it sends the links based on USN. Note that the 2 testenvs fail for different reasons. promoted_dc fails because it is sending all the linked attributes last. vampire_dc fails because it doesn't support GET_TGT yet, so it sends the link before the peer knows about the target object. Note that to test against vampire_dc (rather than the ad_dc_ntvfs DC), we need to send the GetNCChanges requests to DC2 instead of DC1. I've left the DC numbering scheme as is, but I've addeed a test_ldb_dc handle to drs_base.py - it defaults to DC1, but tests can override it easily and still have everything work. While running the new tests through autobuild, I noticed an intermittent LDAP_ENTRY_ALREADY_EXISTS failure in the test setup(). This appears to be due to a timing issue in the background replication between the multiple testenvs. Adding some randomness so that the test base OU is unique seems to avoid the problem. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>