RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 918700 - [RFE] Allow db2ldif to be quiet
Summary: [RFE] Allow db2ldif to be quiet
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: 389-ds-base
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: ---
Assignee: Rich Megginson
QA Contact: Sankar Ramalingam
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-06 18:14 UTC by Nathan Kinder
Modified: 2020-09-13 20:17 UTC (History)
3 users (show)

Fixed In Version: 389-ds-base-1.3.1.2-1.el7
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 11:23:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 451 0 None None None 2020-09-13 20:17:14 UTC

Description Nathan Kinder 2013-03-06 18:14:44 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/389/ticket/451

I've started a regular db2ldif backup of my database with:

{{{
/usr/lib/dirsrv/slapd-cora/db2ldif -n userRoot > /dev/null
/usr/lib/dirsrv/slapd-cora/db2ldif -n NetscapeRoot > /dev/null
}}}

However, I still get the following output:

{{{
ldiffile: /var/lib/dirsrv/slapd-cora/ldif/cora-userRoot-2012_09_07_054839.ldif
[07/Sep/2012:05:48:40 -0600] - export userRoot: Processed 429 entries (100%).
[07/Sep/2012:05:48:41 -0600] - All database threads now stopped
ldiffile: /var/lib/dirsrv/slapd-cora/ldif/cora-NetscapeRoot-2012_09_07_054841.ldif
[07/Sep/2012:05:48:41 -0600] - export NetscapeRoot: Processed 125 entries (100%).
[07/Sep/2012:05:48:41 -0600] - All database threads now stopped
}}}

It would be nice to have it be able to be quiet unless a problem occurred.  This is with 389-ds-base-1.2.10.14-1.el5.

Comment 1 Rich Megginson 2013-10-01 23:25:41 UTC
moving all ON_QA bugs to MODIFIED in order to add them to the errata (can't add bugs in the ON_QA state to an errata).  When the errata is created, the bugs should be automatically moved back to ON_QA.

Comment 3 Amita Sharma 2014-01-08 13:17:12 UTC
Test Case 1 (db2ldif)::
=======================
without -q
-----------
[root@dhcp201-149 ~]# db2ldif -Z slapd-dhcp201-149 -n userRoot -a /export/test.ldif 
Exported ldif file: /export/test.ldif
ldiffile: /export/test.ldif
[08/Jan/2014:17:54:15 +051800] - export userRoot: Processed 9 entries (100%).
[08/Jan/2014:17:54:15 +051800] - All database threads now stopped

with -q expected pass
------------------------
[root@dhcp201-149 ~]# db2ldif -Z slapd-dhcp201-149 -n userRoot -a /export/test.ldif -q
Exported ldif file: /export/test.ldif
[root@dhcp201-149 ~]# vim /export/test.ldif

with -q expected to fail
-------------------------
[root@dhcp201-149 ~]# db2ldif -Z slapd-dhcp201-149 -n userRoot -a /export/test1.ldif -q
Exported ldif file: /export/test1.ldif

Error LOGS>>>>>>>>
[root@dhcp201-149 ~]# vim /export/test1.ldif
[root@dhcp201-149 ~]# tail -f /var/log/dirsrv/slapd-dhcp201-149/errors
[08/Jan/2014:17:53:35 +051800] - db2ldif: can't open /export/a.ldif: 13 (Permission denied)
[08/Jan/2014:17:53:35 +051800] - All database threads now stopped
[08/Jan/2014:17:54:05 +051800] - db2ldif: can't open /export/a.ldif: 13 (Permission denied)
[08/Jan/2014:17:54:05 +051800] - All database threads now stopped
[08/Jan/2014:17:54:15 +051800] - export userRoot: Processed 9 entries (100%).
[08/Jan/2014:17:54:15 +051800] - All database threads now stopped
[08/Jan/2014:17:54:25 +051800] - export userRoot: Processed 9 entries (100%).
[08/Jan/2014:17:54:25 +051800] - All database threads now stopped
[08/Jan/2014:17:54:44 +051800] - db2ldif: can't open /export/test1.ldif: 13 (Permission denied)
[08/Jan/2014:17:54:44 +051800] - All database threads now stopped

Test Case 2 (ldif2db)::
=========================
Without q
-----------
[root@dhcp201-149 ~]# ldif2db -Z slapd-dhcp201-149 -n userRoot -i /export/test.ldif
importing data ...
[08/Jan/2014:18:03:03 +051800] - WARNING: Import is running with nsslapd-db-private-import-mem on; No other process is allowed to access the database
[08/Jan/2014:18:03:03 +051800] - check_and_set_import_cache: pagesize: 4096, pages: 479602, procpages: 53205
[08/Jan/2014:18:03:03 +051800] - Import allocates 767360KB import cache.
[08/Jan/2014:18:03:03 +051800] - import userRoot: Beginning import job...
[08/Jan/2014:18:03:03 +051800] - import userRoot: Index buffering enabled with bucket size 100
[08/Jan/2014:18:03:04 +051800] - import userRoot: Processing file "/export/test.ldif"
[08/Jan/2014:18:03:04 +051800] - import userRoot: Finished scanning file "/export/test.ldif" (9 entries)
[08/Jan/2014:18:03:04 +051800] - import userRoot: Workers finished; cleaning up...
[08/Jan/2014:18:03:04 +051800] - import userRoot: Workers cleaned up.
[08/Jan/2014:18:03:04 +051800] - import userRoot: Cleaning up producer thread...
[08/Jan/2014:18:03:04 +051800] - import userRoot: Indexing complete.  Post-processing...
[08/Jan/2014:18:03:04 +051800] - import userRoot: Generating numSubordinates complete.
[08/Jan/2014:18:03:04 +051800] - import userRoot: Flushing caches...
[08/Jan/2014:18:03:04 +051800] - import userRoot: Closing files...
[08/Jan/2014:18:03:04 +051800] - All database threads now stopped
[08/Jan/2014:18:03:04 +051800] - import userRoot: Import complete.  Processed 9 entries in 1 seconds. (9.00 entries/sec)

With q expected pass
----------------------
[root@dhcp201-149 ~]# ldif2db -Z slapd-dhcp201-149 -n userRoot -i /export/test.ldif -q
[root@dhcp201-149 ~]# vim /export/test.ldif

with q expected to give warning
----------------------------------
[root@dhcp201-149 ~]# ldif2db -Z slapd-dhcp201-149 -n userRoot -i /export/test.ldif -q
[08/Jan/2014:18:10:35 +051800] - Unable to import the database because it is being used by another slapd process.
[08/Jan/2014:18:10:35 +051800] - Shutting down due to possible conflicts with other slapd processes

with q expected to fail and give error message
-----------------------------------------------
[root@dhcp201-149 ~]# ldif2db -Z slapd-dhcp201-149 -n userRoot -i /export/test12323.ldif -q
/var/lib/dirsrv/slapd-dhcp201-149/db/userRoot: No such file or directory

Test Case 3 (bak2db) ::
========================
Expected to fail with q and without -q
------------------------------------------
[root@dhcp201-149 ~]# bak2db archivedir /var/lib/dirsrv/slapd-dhcp201-149/bak/ -n userRoot -Z dhcp201-149
[08/Jan/2014:18:19:00 +051800] - Warning: Unable to read dbversion file in /root/archivedir
[08/Jan/2014:18:19:00 +051800] - Restore: backup directory /root/archivedir does not exist.
[08/Jan/2014:18:19:00 +051800] - archive2db: Failed to read backup file set. Either the directory specified doesn't exist, or it exists but doesn't contain a valid backup set, or file permissions prevent the server reading the backup set.  error=53 (Invalid request descriptor)

[root@dhcp201-149 ~]# bak2db archivedir /var/lib/dirsrv/slapd-dhcp201-149/bak/ -n userRoot -Z dhcp201-149 -q
[08/Jan/2014:18:19:30 +051800] - Warning: Unable to read dbversion file in /root/archivedir
[08/Jan/2014:18:19:30 +051800] - Restore: backup directory /root/archivedir does not exist.
[08/Jan/2014:18:19:30 +051800] - archive2db: Failed to read backup file set. Either the directory specified doesn't exist, or it exists but doesn't contain a valid backup set, or file permissions prevent the server reading the backup set.  error=53 (Invalid request descriptor)

Expected to Pass with q and without q
---------------------------------------
[root@dhcp201-149 ~]#  bak2db /var/lib/dirsrv/slapd-dhcp201-149/bak/dhcp201-149-2014_01_08_18_17_32 -n userRoot -Z dhcp201-149 -q

[root@dhcp201-149 ~]#  bak2db /var/lib/dirsrv/slapd-dhcp201-149/bak/dhcp201-149-2014_01_08_18_17_32 -n userRoot -Z dhcp201-149
[08/Jan/2014:18:20:55 +051800] - All database threads now stopped
[08/Jan/2014:18:20:55 +051800] - Moving file /var/lib/dirsrv/slapd-dhcp201-149/db/../fribak/userRoot
[08/Jan/2014:18:20:55 +051800] - Moving file /var/lib/dirsrv/slapd-dhcp201-149/db/../fribak/userRoot/DBVERSION
[08/Jan/2014:18:20:55 +051800] - Copying /var/lib/dirsrv/slapd-dhcp201-149/bak/dhcp201-149-2014_01_08_18_17_32/userRoot/DBVERSION to /var/lib/dirsrv/slapd-dhcp201-149/db/../fribak/userRoot/DBVERSION
[08/Jan/2014:18:20:55 +051800] - Moving file /var/lib/dirsrv/slapd-dhcp201-149/db/../fribak/userRoot/id2entry.db
[08/Jan/2014:18:20:55 +051800] - Copying /var/lib/dirsrv/slapd-dhcp201-149/bak/dhcp201-149-2014_01_08_18_17_32/userRoot/id2entry.db to /var/lib/dirsrv/slapd-dhcp201-149/db/../fribak/userRoot/id2entry.db
[08/Jan/2014:18:20:55 +051800] - Moving file /var/lib/dirsrv/slapd-dhcp201-149/db/../fribak/userRoot/entryrdn.db
[08/Jan/2014:18:20:55 +051800] - Copying /var/lib/dirsrv/slapd-dhcp201-149/bak/dhcp201-149-2014_01_08_18_17_32/userRoot/entryrdn.db to /var/lib/dirsrv/slapd-dhcp201-149/db/../fribak/userRoot/entryrdn.db
[08/Jan/2014:18:20:55 +051800] - Moving file /var/lib/dirsrv/slapd-dhcp201-149/db/../fribak/log.0000000001
[08/Jan/2014:18:20:55 +051800] - Copying /var/lib/dirsrv/slapd-dhcp201-149/bak/dhcp201-149-2014_01_08_18_17_32/log.0000000001 to /var/lib/dirsrv/slapd-dhcp201-149/db/../fribak/log.0000000001
[08/Jan/2014:18:20:55 +051800] - Moving file /var/lib/dirsrv/slapd-dhcp201-149/db/../fribak/DBVERSION
[08/Jan/2014:18:20:55 +051800] - Copying /var/lib/dirsrv/slapd-dhcp201-149/bak/dhcp201-149-2014_01_08_18_17_32/DBVERSION to /var/lib/dirsrv/slapd-dhcp201-149/db/../fribak/DBVERSION
[08/Jan/2014:18:20:55 +051800] - Moving file /var/lib/dirsrv/slapd-dhcp201-149/db/../fribak/dse_instance.ldif
[08/Jan/2014:18:20:55 +051800] - Copying /var/lib/dirsrv/slapd-dhcp201-149/bak/dhcp201-149-2014_01_08_18_17_32/dse_instance.ldif to /var/lib/dirsrv/slapd-dhcp201-149/db/../fribak/dse_instance.ldif
[08/Jan/2014:18:20:55 +051800] - Moving file /var/lib/dirsrv/slapd-dhcp201-149/db/../fribak/dse_index.ldif
[08/Jan/2014:18:20:55 +051800] - Copying /var/lib/dirsrv/slapd-dhcp201-149/bak/dhcp201-149-2014_01_08_18_17_32/dse_index.ldif to /var/lib/dirsrv/slapd-dhcp201-149/db/../fribak/dse_index.ldif
[08/Jan/2014:18:20:55 +051800] - Removing file /var/lib/dirsrv/slapd-dhcp201-149/db/../fribak/log.0000000001 from staging area
[08/Jan/2014:18:20:55 +051800] - Removing file /var/lib/dirsrv/slapd-dhcp201-149/db/../fribak/DBVERSION from staging area
[08/Jan/2014:18:20:55 +051800] - Restoring file 1 (/var/lib/dirsrv/slapd-dhcp201-149/db/userRoot/DBVERSION)
[08/Jan/2014:18:20:55 +051800] - Copying /var/lib/dirsrv/slapd-dhcp201-149/db/../fribak/userRoot/DBVERSION to /var/lib/dirsrv/slapd-dhcp201-149/db/userRoot/DBVERSION
[08/Jan/2014:18:20:55 +051800] - Restoring file 2 (/var/lib/dirsrv/slapd-dhcp201-149/db/userRoot/id2entry.db)
[08/Jan/2014:18:20:55 +051800] - Restoring file 3 (/var/lib/dirsrv/slapd-dhcp201-149/db/userRoot/entryrdn.db)
[08/Jan/2014:18:20:55 +051800] - All database threads now stopped
[08/Jan/2014:18:20:55 +051800] - Restore: Removing staging area /var/lib/dirsrv/slapd-dhcp201-149/db/../fribak.

Test Case 4 (db2bak)
======================
[root@dhcp201-149 ~]# db2bak -q
Back up directory: /var/lib/dirsrv/slapd-dhcp201-149/bak/dhcp201-149-2014_01_08_18_17_21

[root@dhcp201-149 ~]# db2bak
Back up directory: /var/lib/dirsrv/slapd-dhcp201-149/bak/dhcp201-149-2014_01_08_18_17_32
[08/Jan/2014:18:17:32 +051800] - Backing up file 1 (/var/lib/dirsrv/slapd-dhcp201-149/bak/dhcp201-149-2014_01_08_18_17_32/userRoot/DBVERSION)
[08/Jan/2014:18:17:32 +051800] - Copying /var/lib/dirsrv/slapd-dhcp201-149/db/userRoot/DBVERSION to /var/lib/dirsrv/slapd-dhcp201-149/bak/dhcp201-149-2014_01_08_18_17_32/userRoot/DBVERSION
[08/Jan/2014:18:17:32 +051800] - Backing up file 2 (/var/lib/dirsrv/slapd-dhcp201-149/bak/dhcp201-149-2014_01_08_18_17_32/userRoot/id2entry.db)
[08/Jan/2014:18:17:32 +051800] - Copying /var/lib/dirsrv/slapd-dhcp201-149/db/userRoot/id2entry.db to /var/lib/dirsrv/slapd-dhcp201-149/bak/dhcp201-149-2014_01_08_18_17_32/userRoot/id2entry.db
[08/Jan/2014:18:17:32 +051800] - Backing up file 3 (/var/lib/dirsrv/slapd-dhcp201-149/bak/dhcp201-149-2014_01_08_18_17_32/userRoot/entryrdn.db)
[08/Jan/2014:18:17:32 +051800] - Copying /var/lib/dirsrv/slapd-dhcp201-149/db/userRoot/entryrdn.db to /var/lib/dirsrv/slapd-dhcp201-149/bak/dhcp201-149-2014_01_08_18_17_32/userRoot/entryrdn.db
[08/Jan/2014:18:17:32 +051800] - Backing up file 4 (/var/lib/dirsrv/slapd-dhcp201-149/bak/dhcp201-149-2014_01_08_18_17_32/log.0000000001)
[08/Jan/2014:18:17:32 +051800] - Copying /var/lib/dirsrv/slapd-dhcp201-149/db/log.0000000001 to /var/lib/dirsrv/slapd-dhcp201-149/bak/dhcp201-149-2014_01_08_18_17_32/log.0000000001
[08/Jan/2014:18:17:32 +051800] - Backing up file 5 (/var/lib/dirsrv/slapd-dhcp201-149/bak/dhcp201-149-2014_01_08_18_17_32/DBVERSION)
[08/Jan/2014:18:17:32 +051800] - Copying /var/lib/dirsrv/slapd-dhcp201-149/db/DBVERSION to /var/lib/dirsrv/slapd-dhcp201-149/bak/dhcp201-149-2014_01_08_18_17_32/DBVERSION
[08/Jan/2014:18:17:32 +051800] - All database threads now stopped

QUESTION
-------------
Only Test Case which is not working as expected is :: db2ldif with -q expected to fail, it gives an illusion like its passing, though logs the error in error logs ::
[root@dhcp201-149 ~]# db2ldif -Z slapd-dhcp201-149 -n userRoot -a /export/test1.ldif -q
Exported ldif file: /export/test1.ldif

So, is it OK or should I file another bug for it?

Comment 4 Noriko Hosoi 2014-01-08 21:48:09 UTC
> Only Test Case which is not working as expected is :: db2ldif with -q expected
> to fail, it gives an illusion like its passing, though logs the error in error
> logs ::
> [root@dhcp201-149 ~]# db2ldif -Z slapd-dhcp201-149 -n userRoot -a
> /export/test1.ldif -q
> Exported ldif file: /export/test1.ldif
>
> So, is it OK or should I file another bug for it?
 
Amita, could you give me some more explanation why the first one (exporting to /export/test.ldif) is supposed to pass and the next one (exporting to /export/tests1.ldif) is not?  
 
> with -q expected pass
> ------------------------
> [root@dhcp201-149 ~]# db2ldif -Z slapd-dhcp201-149 -n userRoot -a /export/test.ldif -q
> Exported ldif file: /export/test.ldif
> [root@dhcp201-149 ~]# vim /export/test.ldif
>
> with -q expected to fail
> -------------------------
> [root@dhcp201-149 ~]# db2ldif -Z slapd-dhcp201-149 -n userRoot -a /export/test1.ldif -q
> Exported ldif file: /export/test1.ldif
 
I assume you prepared a file /export/test1.ldif with no write permission or something?  If so, as you pointed out, the error is logged in the error log, and 2) you could check the exit status just after the command line execution, which should show non zero.
 
> [root@dhcp201-149 ~]# db2ldif -Z slapd-dhcp201-149 -n userRoot -a /export/test1.ldif -q
> Exported ldif file: /tmp/test1.ldif
# echo $?
255
 
I'd think this is good enough for the DS administrators.

Comment 5 Amita Sharma 2014-01-09 05:27:39 UTC
(In reply to Noriko Hosoi from comment #4)
> > Only Test Case which is not working as expected is :: db2ldif with -q expected
> > to fail, it gives an illusion like its passing, though logs the error in error
> > logs ::
> > [root@dhcp201-149 ~]# db2ldif -Z slapd-dhcp201-149 -n userRoot -a
> > /export/test1.ldif -q
> > Exported ldif file: /export/test1.ldif
> >
> > So, is it OK or should I file another bug for it?
>  
> Amita, could you give me some more explanation why the first one (exporting
> to /export/test.ldif) is supposed to pass and the next one (exporting to
> /export/tests1.ldif) is not? 
The file itself does not exists - /export/tests1.ldif, that's why it should give an error.  
>  
> > with -q expected pass
> > ------------------------
> > [root@dhcp201-149 ~]# db2ldif -Z slapd-dhcp201-149 -n userRoot -a /export/test.ldif -q
> > Exported ldif file: /export/test.ldif
> > [root@dhcp201-149 ~]# vim /export/test.ldif
> >
> > with -q expected to fail
> > -------------------------
> > [root@dhcp201-149 ~]# db2ldif -Z slapd-dhcp201-149 -n userRoot -a /export/test1.ldif -q
> > Exported ldif file: /export/test1.ldif
>  
> I assume you prepared a file /export/test1.ldif with no write permission or
> something?  If so, as you pointed out, the error is logged in the error log,
> and 2) you could check the exit status just after the command line
> execution, which should show non zero.
>  
> > [root@dhcp201-149 ~]# db2ldif -Z slapd-dhcp201-149 -n userRoot -a /export/test1.ldif -q
> > Exported ldif file: /tmp/test1.ldif
> # echo $?
> 255
>  
> I'd think this is good enough for the DS administrators.
Ok, but as in all other test cases execution gives error/warning on screen with -q, it should also behave in similar way?

But if that's good enough to log in error logs, I will mark the bug as VERIFIED.
Thanks Noriko :)

Comment 6 Noriko Hosoi 2014-01-09 17:18:01 UTC
> Amita, could you give me some more explanation why the first one (exporting
> to /export/test.ldif) is supposed to pass and the next one (exporting to
> /export/tests1.ldif) is not? 
The file itself does not exists - /export/tests1.ldif, that's why it should give an error.

<== I'm still confused...  This is db2ldif (export).  The path specified with -a is a file to be generated and written by the utility.  That's said, the file /export/tests1.ldif is not expected to exist?  Am I missing something?

> I'd think this is good enough for the DS administrators.
Ok, but as in all other test cases execution gives error/warning on screen with -q, it should also behave in similar way?

But if that's good enough to log in error logs, I will mark the bug as VERIFIED.

<== Thank you, Amita!  Yeah, I'd agree with you that it'd be nicer to show the error in the utility's output.  But what'd happen would be the admin opens the output file /export/tests1.ldif and finds it empty, then s/he'll go to see the error log and/or try to run it without -q and find the cause of the problem.

Comment 7 Amita Sharma 2014-01-10 07:15:27 UTC
(In reply to Noriko Hosoi from comment #6)
> > Amita, could you give me some more explanation why the first one (exporting
> > to /export/test.ldif) is supposed to pass and the next one (exporting to
> > /export/tests1.ldif) is not? 
> The file itself does not exists - /export/tests1.ldif, that's why it should
> give an error.
> 
> <== I'm still confused...  This is db2ldif (export).  The path specified
> with -a is a file to be generated and written by the utility.  That's said,
> the file /export/tests1.ldif is not expected to exist?  Am I missing
> something?
***************************************************
File can be generated with utility only if user nobody has permissions to write the output file under specified path?
Like "-a /tmp/test1.ldif" should pass AND 
"-a /export/tests1.ldif" should fail due to permission issue. 

NOTE :: Both /export/ami1.ldif and /tmp/ami1.ldif files does not exists.

[root@dhcp201-149 ~]# db2ldif -Z slapd-dhcp201-149 -n userRoot -a /export/ami1.ldif
Exported ldif file: /export/ami1.ldif
ldiffile: /export/ami1.ldif
[10/Jan/2014:12:03:43 +051800] - db2ldif: can't open /export/ami1.ldif: 13 (Permission denied)
[10/Jan/2014:12:03:43 +051800] - All database threads now stopped

[root@dhcp201-149 ~]# db2ldif -Z slapd-dhcp201-149 -n userRoot -a /tmp/ami1.ldif
Exported ldif file: /tmp/ami1.ldif
ldiffile: /tmp/ami1.ldif
[10/Jan/2014:12:06:01 +051800] - export userRoot: Processed 9 entries (100%).
[10/Jan/2014:12:06:01 +051800] - All database threads now stopped


Please correct me if my understanding is wrong or expected results are different
***************************************************
> > I'd think this is good enough for the DS administrators.
> Ok, but as in all other test cases execution gives error/warning on screen
> with -q, it should also behave in similar way?
> 
> But if that's good enough to log in error logs, I will mark the bug as
> VERIFIED.
> 
> <== Thank you, Amita!  Yeah, I'd agree with you that it'd be nicer to show
> the error in the utility's output.  But what'd happen would be the admin
> opens the output file /export/tests1.ldif and finds it empty, then s/he'll
> go to see the error log and/or try to run it without -q and find the cause
> of the problem.
yeah, bit lengthy procedure for admin to find the actual cause :)

Comment 8 Noriko Hosoi 2014-01-10 18:05:23 UTC
Aha, in the comment 3, you wanted to put /tmp/test.ldif instead of /export/test.ldif?  And the location of test1.ldif is correctly noted as /export/test1.ldif?  If so, I got it.

Test Case 1 (db2ldif)::
=======================
without -q
-----------
[root@dhcp201-149 ~]# db2ldif -Z slapd-dhcp201-149 -n userRoot -a /export/test.ldif 
Exported ldif file: /export/test.ldif
ldiffile: /export/test.ldif
[08/Jan/2014:17:54:15 +051800] - export userRoot: Processed 9 entries (100%).
[08/Jan/2014:17:54:15 +051800] - All database threads now stopped

with -q expected pass
------------------------
[root@dhcp201-149 ~]# db2ldif -Z slapd-dhcp201-149 -n userRoot -a /export/test.ldif -q
Exported ldif file: /export/test.ldif
[root@dhcp201-149 ~]# vim /export/test.ldif

with -q expected to fail
-------------------------
[root@dhcp201-149 ~]# db2ldif -Z slapd-dhcp201-149 -n userRoot -a /export/test1.ldif -q
Exported ldif file: /export/test1.ldif

Comment 9 Ludek Smid 2014-06-13 11:23:59 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


Note You need to log in before you can comment on or make changes to this bug.