Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1146420

Summary: Installer installs broken datasource
Product: [JBoss] JBoss Data Virtualization 6 Reporter: Juraj Duráni <jdurani>
Component: InstallerAssignee: Thomas Hauser <thauser>
Status: CLOSED CURRENTRELEASE QA Contact: Len DiMaggio <ldimaggi>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.1.0CC: dlesage, felias, jstastny, thauser, tkirby, vhalbert
Target Milestone: ER5Keywords: QA-Closed
Target Release: 6.1.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
A broken datasource was being installed. This issue was caused by a variable not being set during automated installations. The variable is now set correctly.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-10 08:54:24 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:
Attachments:
Description Flags
Configure runtime environment none

Description Juraj Duráni 2014-09-25 08:49:30 UTC
Created attachment 941016 [details]
Configure runtime environment

Description: After instalation is in standalone/configuration/standalone.xml datasource:

<datasource jndi-name="java:/teiid-log-ds" pool-name="teiid-log-ds" enabled="true" use-java-context="true">
	<connection-url>Logging database URL</connection-url>
	<driver>Name of the database driver</driver>
	<security>
		<user-name>defaultusername</user-name>
		<password>${VAULT::teiid::dblogging.password::1}</password>
	</security>
</datasource>

Steps to preproduce:
1. run installer (jboss-dv-installer-6.1.0.ER2-redhat-1.jar)
2. go through the installation (accept terms of licence and set required passwords; do not change any other fields)
3. in window "Configure runtime environment" change selection to "Perform default configuration". Field "Database logging configuration selected" should be still selected (see Configuration.png)
4. finish the installation

Quick fix:
deselect "Database logging configuration selected" in step 3. and datasource will not be installed

Comment 1 Thomas Hauser 2014-09-25 14:23:56 UTC
Hello Juraj,

This is the default dblogging installation that was added at Van's request. Is the functionality broken in some way? 

Thanks,
Tom

Comment 2 Van Halbert 2014-09-25 14:49:27 UTC
DV is installing the logging datasource by default, which is used by the command and audit logging.   We want that to be the default for production environments.

Comment 3 Van Halbert 2014-09-25 14:52:31 UTC
Thomas,

We should be able to default the H2 username/password to sa/sa so that the dialog to set those don't need to be presented.

Comment 4 Juraj Duráni 2014-09-26 05:10:11 UTC
Hi Tom,

if you will follow steps to reproduce you will see, that datasource is installed, but its URL is "Logging database URL" and refers to driver "Name of the database driver". It means that after installation server starts with ERROR.

Yes, there is a dialog with URL and driver setup (in case you select "Perform advanced configuration"), but if you do not want to install this datasource ("Perform default configuration" shows no dialog - see "Configure runtime environment.png") it should not be present in standalone.xml.

Comment 5 Thomas Hauser 2014-09-26 15:23:53 UTC
Hi Juraj,

You're correct. I misread the reproduction procedure. The datasource is being added erroneously when the configuration option is deselected. Thanks!

Tom

Comment 6 Ahmed Abu Lawi 2014-09-30 21:57:20 UTC
Hi,

I've made the changes so that if the radio button on the "Configure Runtime Environment" panel is set to "Perform default configuration" the datasource will no longer be installed.

I've also made it so that if no Jdbc driver is installed, the default H2 Username/Password will be sa/sa and will each be displayed in a textbox.

Comment 7 Jan Stastny 2014-11-20 12:06:05 UTC
The error still persists in ER4, but in slightly different scenario.
When using graphical or console installer, then the datasource is installed properly. 

Problem occurs when installed utilizing installation-script generated from the original installation. Then there is again  <connection-url>Logging database URL</connection-url> in datasource definition in the standalone.xml after the install and start of the server ends up with error.

Below is the datasource definition in both cases.

after automated install:
<datasource jndi-name="java:/teiid-log-ds" pool-name="teiid-log-ds" enabled="true" use-java-context="true"> 
                    <connection-url>Logging database URL</connection-url> 
                    <driver>h2</driver> 
                    <security> 
                        <user-name>sa</user-name> 
                        <password>${VAULT::teiid::dblogging.password::1}</password> 
                    </security> 
                </datasource> 

after gui install:
<datasource jndi-name="java:/teiid-log-ds" pool-name="teiid-log-ds" enabled="true" use-java-context="true">
                    <connection-url>jdbc:h2:file:${jboss.server.data.dir}/teiid-logging/teiid-logging-ds;DB_CLOSE_ON_EXIT=FALSE;DB_CLOSE_DELAY=-1</connection-url>
                    <driver>h2</driver>
                    <security>
                        <user-name>sa</user-name>
                        <password>${VAULT::teiid::dblogging.password::1}</password>
                    </security>
                </datasource>

Comment 8 Ahmed Abu Lawi 2014-11-21 17:12:47 UTC
This issue was caused by a variable not being set during automated installations. 

The issue should be resolved in the next build.