Bug 1251486

Summary: Automatic installer fails when use.same.password set to true
Product: [JBoss] JBoss Data Virtualization 6 Reporter: Jan Stastny <jstastny>
Component: InstallerAssignee: Emmett Underhill <eunderhi>
Status: CLOSED CURRENTRELEASE QA Contact: Jan Stastny <jstastny>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: atangrin, dlesage, eunderhi, vhalbert
Target Milestone: ER5Keywords: QA-Closed
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-02-10 08:55:17 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-08-07 13:00:36 UTC
Description of problem:
When installing with install-script generated from installation in which was selected to use one password for all the users, the installation fails.

Best you can observe it by using such a script but don't provide the '.variables' file. In this way the installer prompts for password. When provided, installer immediately fails, the only output is:

[ Starting automated installation ]
Read pack list from xml definition.
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.

When I used -DTRACE=TRUE argument I got a few extra lines:
.
.
.
Read pack list from xml definition.
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 true
UserInputPanel: setting variable adminUser to admin
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.
Checking condition.
Checking condition.
Checking condition.


I found out, that the only option how to make auto install work is to provide all the passwords in variables, even though only adminPassword should suffice(and installer itself asks only for this one).
This command works well:
java -jar dv-installers/jboss-dv-installer-6.2.0.ER4-redhat-1.jar tmp-workspaces/install.xml -variables Teiid.user.password=p@s\$w0rd,adminPassword=p@s\$w0rd,vault.keystorepwd=p@s\$w0rd,Modeshape.password=p@s\$w0rd

Notice that this command is similar to one used when 'use same password' was NOT selected.


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

How reproducible:
when provided only adminPassword

Steps to Reproduce:
1.Install server with 'use same passwords' option, save auto-install script
2.Start installer with this script, provide no '-variables' arguments, nor '.variables' file
3.Input the adminPassword when prompted.
4.Observe immediate ending of installer process. 

Actual results:
auto installation fails

Expected results:
server is installed

Additional info:

Comment 1 Jan Stastny 2015-08-07 13:07:49 UTC
I am sorry, I forgot to add Dashboard.admin.password to the -variables argument.

This is the workaround command:
java -jar dv-installers/jboss-dv-installer-6.2.0.ER4-redhat-1.jar tmp-workspaces/install.xml -variables Teiid.user.password=p@s\$w0rd,adminPassword=p@s\$w0rd,vault.keystorepwd=p@s\$w0rd,Modeshape.password=p@s\$w0rd,Dashboard.admin.password=p@s\$w0rd

Comment 2 Thomas Hauser 2015-08-07 14:51:28 UTC
Regression caused by https://bugzilla.redhat.com/show_bug.cgi?id=1241129

Comment 3 Emmett Underhill 2015-08-07 20:15:14 UTC
Hi Jan,

The new password validation caused a null pointer exception because some values are null during auto-installation.

I've added the appropriate null checking to the new PasswordValidator class so automated installation no longer fails to run when "use same passwords" is set and there is no variables file.

Thank you,

Emmett Underhill

Comment 4 Jan Stastny 2015-08-11 07:33:51 UTC
*** Bug 1252143 has been marked as a duplicate of this bug. ***

Comment 8 Van Halbert 2015-08-18 15:34:22 UTC
If you run the following:

java -jar jboss-dv-installer-6.2.0.ER4-redhat-1.jar dv_installer.xml

The installer assumes to find the variables file (dv_installer.xml.variables), but will fail because the installation was setup to use one password for all and to not create a new admin user.

Comment 9 Emmett Underhill 2015-08-18 21:08:56 UTC
I've run the installation without a variables file, and with one that contains the adminPassword, both of which I selected to use the same password for all users. The installation succeeds in both of these cases. So yes hopefully the issue has been addressed if I'm understanding correctly.

Comment 10 Jan Stastny 2015-08-19 05:46:57 UTC
Hi Emmett, yes, if the installer works now with both '-variables' argument and automatic script (either provided via '-variableFile' or taken by installer implicitly by filename), then the problem with 'use.same.password' seems resolved.