Bug 514190 - setup-ds-admin.pl --debug does not log to file
Summary: setup-ds-admin.pl --debug does not log to file
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: 389
Classification: Retired
Component: Install/Uninstall
Version: 1.2.8
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Rich Megginson
QA Contact: Viktor Ashirov
URL:
Whiteboard:
Depends On:
Blocks: 639035 389_1.2.8 681550
TreeView+ depends on / blocked
 
Reported: 2009-07-28 09:06 UTC by Jasper Capel
Modified: 2015-12-07 17:10 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 681550 (view as bug list)
Environment:
Last Closed: 2015-12-07 17:10:42 UTC
Embargoed:


Attachments (Terms of Use)
0001-Bug-514190-setup-ds-admin.pl-debug-does-not-log-to-f.patch (4.24 KB, patch)
2011-03-02 02:56 UTC, Rich Megginson
nhosoi: review+
Details | Diff

Description Jasper Capel 2009-07-28 09:06:29 UTC
Description of problem:
setup-ds-admin.pl --debug does not write the debug log messages to the file

Version-Release number of selected component (if applicable):
redhat-ds-admin-8.1.0-9.el5dsrv

How reproducible:
Start a silent install w/ an answer-file and ask for debug info.

Steps to Reproduce:
1. Create an answer-file
2. setup-ds-admin.pl --silent --file=foo.inf --debug
  
Actual results:
The debug messages go to the console, not to the create log file in /tmp

Expected results:
The debug messages also appear in the created log file.

Additional info:

Comment 2 Rich Megginson 2011-03-02 02:56:49 UTC
Created attachment 481772 [details]
0001-Bug-514190-setup-ds-admin.pl-debug-does-not-log-to-f.patch

Comment 3 Rich Megginson 2011-03-02 14:53:28 UTC
To ssh://git.fedorahosted.org/git/389/ds.git
   6c4eac9..6580a99  master -> master
commit 6580a9942e945699819570596977b60cd82d65ec
Author: Rich Megginson <rmeggins>
Date:   Tue Mar 1 19:53:01 2011 -0700
    Reviewed by: nhosoi (Thanks!)
    Branch: master
    Fix Description: Added a logDebug() method to the SetupLog class, used
    for logging debug messages.  At startup time, the log used by the
    Setup or Migration object registers its log with the DSUtil code.  When
    the DSUtil::debug() method is called, it will also call the logDebug()
    method of the DSUtil::log object if specified.
    Platforms tested: RHEL6 x86_64
    Flag Day: no
    Doc impact: no
To ssh://git.fedorahosted.org/git/389/ds.git
   ef1cb3d..f399247  389-ds-base-1.2.8 -> 389-ds-base-1.2.8
commit f399247c9e72d1765d1b9b83d7c939bfd517f606

Comment 4 Amita Sharma 2011-07-28 07:54:01 UTC
[root@amsharma /]# rpm -qa | grep 389
389-ds-base-devel-1.2.8.2-1.el6_1.7.x86_64
389-console-1.1.7-1.el6.noarch
389-ds-console-1.2.6-1.el6.noarch
389-adminutil-devel-1.1.14-1.el6.x86_64
389-ds-base-libs-1.2.8.2-1.el6_1.7.x86_64
389-admin-console-doc-1.1.7-1.el6.noarch
389-admin-console-1.1.7-1.el6.noarch
389-ds-base-debuginfo-1.2.8.2-1.el6_1.3.x86_64
389-adminutil-1.1.14-1.el6.x86_64
389-ds-1.2.1-2.el6.noarch
389-ds-console-doc-1.2.6-1.el6.noarch
389-admin-1.1.20-1.el6.x86_64
389-ds-base-1.2.8.2-1.el6_1.7.x86_64

================================================================================
I can see the debug messages on the console while executing :
setup-ds-admin.pl --silent --file=/home/setupadmin.inf --debug

================================================================================
few lines while executed above command:
=========================================
+Entry cn=StatPingServ,cn=configuration,cn=Tasks,cn=admin-serv-amsharma, cn=Red Hat Administration Server, cn=Server Group, cn=amsharma.pnq.redhat.com, ou=pnq.redhat.com, o=NetscapeRoot is added
+Entry cn=ViewData,cn=configuration,cn=Tasks,cn=admin-serv-amsharma, cn=Red Hat Administration Server, cn=Server Group, cn=amsharma.pnq.redhat.com, ou=pnq.redhat.com, o=NetscapeRoot is added
+Entry cn=ViewLog,cn=configuration,cn=Tasks,cn=admin-serv-amsharma, cn=Red Hat Administration Server, cn=Server Group, cn=amsharma.pnq.redhat.com, ou=pnq.redhat.com, o=NetscapeRoot is added
+Entry cn=MonReplication,cn=configuration,cn=Tasks,cn=admin-serv-amsharma, cn=Red Hat Administration Server, cn=Server Group, cn=amsharma.pnq.redhat.com, ou=pnq.redhat.com, o=NetscapeRoot is added
+Entry cn=repl-monitor-cgi.pl,cn=configuration,cn=Tasks,cn=admin-serv-amsharma, cn=Red Hat Administration Server, cn=Server Group, cn=amsharma.pnq.redhat.com, ou=pnq.redhat.com, o=NetscapeRoot is added
+Processing /usr/share/dirsrv/data/22ascommands.ldif.tmpl ...
+Entry cn=Commands,cn=admin-serv-amsharma, cn=Red Hat Administration Server, cn=Server Group, cn=amsharma.pnq.redhat.com, ou=pnq.redhat.com, o=NetscapeRoot is added
+Entry cn=sync-task-sie-data,cn=Commands,cn=admin-serv-amsharma, cn=Red Hat Administration Server, cn=Server Group, cn=amsharma.pnq.redhat.com, ou=pnq.redhat.com, o=NetscapeRoot is added
+Entry cn=change-sie-password,cn=Commands,cn=admin-serv-amsharma, cn=Red Hat Administration Server, cn=Server Group, cn=amsharma.pnq.redhat.com, ou=pnq.redhat.com, o=NetscapeRoot is added
Updating adm.conf with information from configuration directory server . . .
Updating the configuration for the httpd engine . . .
+Content-type: text/html

NMC_Status: 0
Starting admin server . . .
output: Starting dirsrv-admin: 
output:                                                    [  OK  ]
The admin server was successfully started.
+Changing the owner of /var/log/dirsrv/admin-serv/access to (99, 99)
+Changing the owner of /var/log/dirsrv/admin-serv/error to (99, 99)
Admin server was successfully created, configured, and started.
Exiting . . .
Log file is '/tmp/setupAeFxpN.log'

What is expected here? Please guide.
Also It created the log file under /tmp along with giving the logs at prompt.

Comment 5 Rich Megginson 2011-08-01 14:59:57 UTC
(In reply to comment #4)
...
> 
> NMC_Status: 0
> Starting admin server . . .
> output: Starting dirsrv-admin: 
> output:                                                    [  OK  ]
> The admin server was successfully started.
> +Changing the owner of /var/log/dirsrv/admin-serv/access to (99, 99)
> +Changing the owner of /var/log/dirsrv/admin-serv/error to (99, 99)
> Admin server was successfully created, configured, and started.
> Exiting . . .
> Log file is '/tmp/setupAeFxpN.log'
> 
> What is expected here? Please guide.

What is expected is that /tmp/setupAeFxpN.log should contain everything written to the screen/console.

> Also It created the log file under /tmp along with giving the logs at prompt.

Comment 6 Amita Sharma 2011-08-03 08:02:08 UTC
Based on Comment#5, marking the bug as VERIFIED.
Thanks Rich.


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