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:
Created attachment 481772 [details] 0001-Bug-514190-setup-ds-admin.pl-debug-does-not-log-to-f.patch
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
[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.
(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.
Based on Comment#5, marking the bug as VERIFIED. Thanks Rich.