DS error logs throwing "posix_winsync_end_update_cb: failed to add task entry" error.
Steps to Reproduce: 1. Install latest 389-ds-base packages and configure Winsync. 2. Enable "Posix Winsync" plugin and set these values(posixWinsyncCreateMemberOfTask and posixwinsyncmapmemberuid) TRUE. 3. Add few groups on AD with member attribute. 4. Leave the setup for 5 - 10 mins 5. Add few more groups on to AD with member attribute. 6. Tail the DS error logs and observe any error messages displayed as "posix-winsync - posix_winsync_end_update_cb: failed to add task entry"
Actual results: It throws "posix-winsync - posix_winsync_end_update_cb: failed to add task entry"
Expected results: There should be a better way to handle if the task is already running/exists.
Additional info: Noriko's comments:
Investigated a little more on this issue. I think the error is minor and we could fix it in 1.3.1. But, I'd like to have more comments...
The error message is issued when testing this functionality:
posixWinsyncCreateMemberOfTask - this is FALSE by default. Set this to TRUE
if you are using memberOf and you want the memberOf attribute values updated after group sync is complete. The plugin will invoke the memberof fixup task to perform this update.
The Posix Winsync plugin sets the config parameter:
dn: cn=Posix Winsync API,cn=plugins,cn=config posixwinsynccreatememberoftask: TRUE
slapd-M1/dse.ldif has the "memberuid task" entry:
dn: cn=memberuid task,cn=tasks,cn=config objectClass: top objectClass: extensibleObject cn: memberuid task creatorsName: cn=server,cn=plugins,cn=config modifiersName: cn=server,cn=plugins,cn=config createTimestamp: 20130225103003Z modifyTimestamp: 20130225103003Z
And the real task entry is added sometimes. It's added periodically and let the task run, then the task disappears when it's done.
dn: cn=posix-winsync,cn=memberuid task,cn=tasks,cn=config cn: posix-winsync objectClass: extensibleObject objectClass: top basedn: ou=dswinsync,dc=passsync,dc=com creatorsName: cn=Posix Winsync API,cn=plugins,cn=config modifiersName: cn=Posix Winsync API,cn=plugins,cn=config createTimestamp: 20130225191505Z modifyTimestamp: 20130225191505Z
The error "failed to add task entry" is being issued in the function "posix_winsync_end_update_cb" as we see in the error log:
[25/Feb/2013:05:33:10 -0500] posix-winsync - posix_winsync_end_update_cb:
failed to add task entry [25/Feb/2013:05:35:06 -0500] posix-winsync - posix_winsync_end_update_cb: failed to add task entry [25/Feb/2013:05:36:31 -0500] posix-winsync - posix_winsync_end_update_cb: failed to add task entry [25/Feb/2013:05:36:32 -0500] posix-winsync - posix_winsync_end_update_cb: failed to add task entry
The function adds the task entry which DN is always "cn=posix-winsync,cn=memberuid task,cn=tasks,cn=config" char *dn = slapi_create_dn_string("cn=%s,cn=%s,cn=tasks,cn=config", posix_winsync_plugin_name, MEMBEROFTASK);
The function posix_winsync_end_update_cb is a update callback, if multiple updates come in while the first task is still running, the additional task adds fail since all tasks share the same name...? Probably, we want to set the different name, e.g., containing the time stamp in the cn (cn=posix-winsync-<time>,cn=memberuid task,cn=tasks,cn=config")?
But it may not be needed that intensively if the purpose of the task is just "fix_memberuid scan for orphaned memberuids" under the basedn "ou=dswinsync,dc=passsync,dc=com". If that's the case, the above error would be benign. We may want to suppress them if the error code is LDAP_ALREADY_EXISTS.
Thanks, --noriko
Bug description: When a task posixWinsyncCreateMemberOfTask is already running, another same task request is received, the Posix Winsync Plug-in issues an error "posix-winsync - posix_ winsync_end_update_cb: failed to add task entry". This is not an "error" but an expected behaviour.
Fix description: Instead of filing the message as SLAPI_LOG_ FATAL, this patch logs clearer message "task entry <taskname> already exists" if the log level is SLAPI_LOG_PLUGIN. posix_winsync_end_update_cb
attachment 0001-Ticket-608-Posix-Winsync-plugin-throws-posix_winsync.patch
Looks good, ack.
Reviewed by Mark (Thank you!!)
Pushed to master: commit 05803a4
Pushed to 389-ds-base-1.3.1 branch: commit 9dbf49a
Metadata Update from @mreynolds: - Issue assigned to nhosoi - Issue set to the milestone: 1.3.1
389-ds-base is moving from Pagure to Github. This means that new issues and pull requests will be accepted only in 389-ds-base's github repository.
This issue has been cloned to Github and is available here: - https://github.com/389ds/389-ds-base/issues/608
If you want to receive further updates on the issue, please navigate to the github issue and click on subscribe button.
subscribe
Thank you for understanding. We apologize for all inconvenience.
Metadata Update from @spichugi: - Issue close_status updated to: wontfix (was: Fixed)
Login to comment on this ticket.