Bug 1128921

Summary: rhq-encode-password.sh should not write to rhq-installer.log
Product: [JBoss] JBoss Operations Network Reporter: Viet Nguyen <vnguyen>
Component: InstallerAssignee: Stefan Negrea <snegrea>
Status: CLOSED CURRENTRELEASE QA Contact: Armine Hovsepyan <ahovsepy>
Severity: low Docs Contact:
Priority: unspecified    
Version: JON 3.3.0CC: mfoley, mkoci, snegrea
Target Milestone: ER02   
Target Release: JON 3.3.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-12-11 14:02:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Viet Nguyen 2014-08-11 20:45:42 UTC
Description of problem:

The new password encoder utility (rhq-encode-password.sh) also writes its output to rhq-installer.log. Being a command line utility the tool should just write to standard out.


rhq-installer.log
------

20:09:52,644 INFO  [org.rhq.enterprise.server.installer.ServerInstallUtil] Mail service has been configured.
20:09:53,738 INFO  [org.rhq.enterprise.server.installer.InstallerServiceImpl] Installing RHQ EAR startup subsystem extension
20:09:55,112 INFO  [org.rhq.enterprise.server.installer.InstallerServiceImpl] Will now ask the app server to reload its configuration
20:09:55,134 INFO  [org.rhq.enterprise.server.installer.InstallerServiceImpl] App server has been successfully asked to reload its configuration
20:09:57,658 INFO  [org.rhq.enterprise.server.installer.InstallerServiceImpl] Installing RHQ EAR subsystem
20:10:28,960 INFO  [org.rhq.enterprise.server.installer.Installer] Installation is complete. The server should be ready shortly.
20:32:01,994 INFO  [org.jboss.modules] JBoss Modules version 1.3.3.Final-redhat-1
20:32:10,647 INFO  [org.rhq.enterprise.server.installer.Installer] *** Encoded password for rhq-server.properties:
20:32:10,648 INFO  [org.rhq.enterprise.server.installer.Installer] ***     foo=RESTRICTED::1eeb2f255e832171df8592078de921bc
20:32:10,649 INFO  [org.rhq.enterprise.server.installer.Installer] ***
20:32:10,649 INFO  [org.rhq.enterprise.server.installer.Installer] *** Encoded password for standalone.xml with vault with default:
20:32:10,650 INFO  [org.rhq.enterprise.server.installer.Installer] ***     ${VAULT::restricted::foo::1eeb2f255e832171df8592078de921bc}
20:32:10,651 INFO  [org.rhq.enterprise.server.installer.Installer] ***
20:32:10,651 INFO  [org.rhq.enterprise.server.installer.Installer] *** Encoded password for standalone.xml with vault without default:
20:32:10,652 INFO  [org.rhq.enterprise.server.installer.Installer] ***     ${VAULT::restricted::foo:: }
20:32:10,653 INFO  [org.rhq.enterprise.server.installer.Installer] ***
20:32:10,653 INFO  [org.rhq.enterprise.server.installer.Installer] *** Encoded password for agent-configuration.xml:
20:32:10,654 INFO  [org.rhq.enterprise.server.installer.Installer] ***     <entry key="foo" value="RESTRICTED::1eeb2f255e832171df8592078de921bc" />

Version-Release number of selected component (if applicable):
3.3DR01

How reproducible:
100%

Steps to Reproduce:
1. run rhq-encode-password.sh to encode auto install password then start the installation
2. output by the tool is also written to rhq-installer.log

Comment 1 Stefan Negrea 2014-08-29 18:52:56 UTC
Fix has been committed to release/jon3.3.x branch:

commit fe35b53c28f0af42b0c19cd98cd039edbd682114
Author: Stefan Negrea <snegrea>
Date:   Fri Aug 29 13:43:26 2014 -0500
     [BZ 1128921] Avoid logging the output from the rhq-encode-value utility to the installer log.
     (cherry picked from commit 6e9d2527451ebe4e695dce863120e3e654bcf13e)

Comment 2 Stefan Negrea 2014-08-29 18:58:48 UTC
The fix updates all the output from rhq-encode-value utility to use System.out.println; this avoids any output text from getting captured in the installer logs.


Note: the rhq-encode-password utility is now rhq-encode-value.

Comment 3 Simeon Pinder 2014-09-03 20:32:00 UTC
Moving to ON_QA as available for test with the following brew build:
https://brewweb.devel.redhat.com//buildinfo?buildID=381194

Comment 4 Jan Bednarik 2014-09-10 11:36:41 UTC
Moving to VERIFIED.

The information about password encoding done is not printed in ehq-installer.log anymore.

Version:3.3.0.ER02
Build Number:4fbb183:7da54e2