#50240 Improve task logging for import/export
Closed: fixed 8 months ago by mreynolds. Opened 10 months 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

10 months ago

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

10 months ago

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

8 months ago

Login to comment on this ticket.

Metadata