#50240 Improve task logging for import/export
Closed: wontfix 2 years ago by mreynolds. Opened 2 years ago by mreynolds.

Issue Description

When an export or import task fails we do not record the reason in the task log, but only in the errors log. We should be recording as much information as possible in the task's log (nsTaskLog).

For example, when the ldif file for an export does not exist:

# dsconf  -j ldapi://%2fvar%2frun%2fslapd-localhost.socket backend export dc=example,dc=com --ldif=/not_there/mark.ldif
Export task failed
-------------------------
Beginning export of 'userroot'
backend 'userroot' export failed (-1)
Export failed.

But only in the errors log do we see the reason for the failure:

[24/Feb/2019:08:10:15.653832402 -0500] - INFO - task_export_thread - Beginning export of 'userroot'
[24/Feb/2019:08:10:15.658232920 -0500] - ERR - ldbm_back_ldbm2ldif - db2ldif: can't open /not_there/mark.ldif: 2 (No such file or directory) while running as user "dirsrv"
[24/Feb/2019:08:10:15.660868025 -0500] - ERR - task_export_thread - Backend 'userroot' export failed (-1)
[24/Feb/2019:08:10:15.663609566 -0500] - ERR - task_export_thread - Export failed.

We should be recording this in the task log as well:

db2ldif: can't open /not_there/mark.ldif: 2 (No such file or directory) while running as user "dirsrv"

Most failure reasons are not recorded in the task log for many of these database tasks.


Metadata Update from @mreynolds:
- Issue assigned to mreynolds

2 years ago

Metadata Update from @mreynolds:
- Custom field origin adjusted to None
- Custom field reviewstatus adjusted to review

2 years ago

Metadata Update from @mreynolds:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

2 years ago

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/3299

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: fixed)

17 days ago

Login to comment on this ticket.

Metadata