Bug 1259721

Summary: Automatic installer: install script property name results in wrong prompt for password
Product: [JBoss] JBoss Data Virtualization 6 Reporter: Jan Stastny <jstastny>
Component: InstallerAssignee: Mansi Vaghela <mvaghela>
Status: CLOSED CURRENTRELEASE QA Contact: Jan Stastny <jstastny>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: atangrin, dlesage, drieden, eunderhi, felias, vhalbert
Target Milestone: ER5   
Target Release: 6.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-24 11:35:59 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 Jan Stastny 2015-09-03 12:25:15 UTC
Description of problem:
When you install DV server with 'Use same password' and 'Skip admin creation', a new field emerges called master password. After you install server with this settings and try to run automatic installer with generated install script one problem appears.
When you don't provide the '.variables' file, then installer asks for a password in the console. But it calls the password still 'EAP admin password' not the 'master' password. Also in the script and '.variables' files a property for the password is denoted as 'adminPassword'.
I checked, that in current state the admin user, which exists before the installation is NOT replaced or altered. Thus the installer behaves as expected, it is only matter of inaccurate instructions provided by installer.

Version-Release number of selected component (if applicable):
DV 6.2.0 CR1

How reproducible:
'Use same password' and 'Skip admin creation' options selected in users' credentials page

Steps to Reproduce:
1. Install server with 'Use same password' and 'Skip admin creation' options set, save the install script.
2. To another location prepare the eap (important to preserve original installation)
3. make sure that '.variables' file for the auto script is missing, or doesn't provide needed password.
4. Run the installer with created script(e.g. using the java -DINSTALL_PATH=/new/path -jar installer.jar ./path/to/script.xml command) 
5. Notice the prompt for the password
6. Provide different password than in the first installation (important)
7. Wait for end of installation
8. run diff command on both instances' JBOSS_HOME/standalone/configuration/mgmt-users.properties files, no difference should exist.

Actual results:
Server installed successfully, but during installation wrong description appears.

Expected results:
Server installed successfully.

Comment 1 Jan Stastny 2015-09-10 08:46:18 UTC
The prompt is corrected now. But probably by introducing new variable 'masterPassword' there is again problem with password validation: https://bugzilla.redhat.com/show_bug.cgi?id=1251486

The outcome of installation in debug mode is:

Try to add to selection [Name: Integration Platform Console and Index: 0]
Try to add to selection [Name: Red Hat JBoss DV Platform and Index: 1]
Try to add to selection [Name: Teiid and Index: 2]
Try to add to selection [Name: ModeShape and Index: 3]
Modify pack selection.
Checking condition.
Checking condition.
UserInputPanel: setting variable use.same.password to true
UserInputPanel: setting variable addUser to false
Master password:
********
Confirm master password:
********
UserInputPanel: setting variable masterPassword to p@s$w0rd
UserInputPanel: setting variable Dashboard.admin.username to dashboardAdmin
UserInputPanel: setting variable Teiid.user.username to teiidUser
UserInputPanel: setting variable Teiid.user.odata to 
UserInputPanel: setting variable Teiid.user.logging to 
UserInputPanel: setting variable Modeshape.user to modeshapeUser
Condition () not found.

Comment 2 Mansi Vaghela 2015-09-10 19:02:40 UTC
Hi Jan,

Introducing the new variable 'masterPassword' caused a null pointer exception. I've fixed the password validation and now it installs with no issues.

We can rebuild it asap.

Thanks,
Mansi Vaghela