[OPENIDM-15165] Recon failed with scripted rest with dj sample Created: 17/Jul/20  Updated: 12/Aug/20  Resolved: 12/Aug/20

Status: Closed
Project: OpenIDM
Component/s: _Samples
Affects Version/s: 7.0.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Tinghua Xu Assignee: Chris Drake
Resolution: Not a defect Votes: 0
Labels: regression
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

IDM master runs on a CentOS 7 machine, Java 11, MySQL as repo

Attachments: File idm_restldap.ldif     File openidm0.log.0    


The scripted rest stress test failed to run due to a recon failure(Test was ok on June 20, failed after that) :

Recon Mapping = systemRestLdapUser_managedUser
20200717 23:53:21.374 - INFO - Recon Url = http://pelardon.internal.forgerock.com:8081/openidm/recon?_action=recon&mapping=systemRestLdapUser_managedUser&waitForCompletion=true
20200717 23:53:21.429 - INFO - <Response [409]>
20200717 23:53:21.431 - FAIL - ERROR:
-- http status --
returned 409, expected 200
-- content --
{"code":409,"reason":"Conflict","message":"Synchronization failed"}

IDM log(attached) showed a 401.

Caused by: org.identityconnectors.framework.common.exceptions.ConnectorException: SearchScript error
Caused by: groovyx.net.http.HttpResponseException: status code: 401, reason phrase: Unauthorized
        at groovyx.net.http.RESTClient.defaultFailureHandler(RESTClient.java:263)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107) 

To reproduce, run stress test as :

./run-pybot.py  -c stress -s idm.crud_on_system_users.CrudSystemRest OpenIDM

Comment by Brendan Miller [ 29/Jul/20 ]

Tinghua Xu What is different between this stress test and the functional test that also tests recon on this sample? (I assume there is one.)

Comment by Travis Haagen [ 07/Aug/20 ]

This kind of thing will happen unless you use an explicit table with constraints on the unique fields (e.g., userName).

If you're not using an explicit table, then there is no synchronization of any kind to guarantee that uniqueness constraints will be preserved under high concurrency.

Comment by Tinghua Xu [ 08/Aug/20 ]

Brendan Miller, Sorry, missed the request comments earlier. The stress test fails all the time now, from what I can see the stress test import the ldif file attached to DJ before the recon and no other users are created in DJ before the recon, the functional test(recon succeeds) doesn't import the ldif file but does create a user in DJ before the recon. Not sure if the attached ldif file from stress test is still valid or necessary. The recon doesn't involve big count of users.

Generated at Wed Nov 25 05:16:12 UTC 2020 using Jira 7.13.12#713012-sha1:6e07c38070d5191bbf7353952ed38f111754533a.