Bug 995386

Summary: QUIT in Post-Install step makes EAP malformed (Reopened)
Product: [JBoss] JBoss Fuse Service Works 6 Reporter: Pavol Srna <psrna>
Component: InstallerAssignee: Miroslav Sochurek <msochure>
Status: MODIFIED --- QA Contact: Pavol Srna <psrna>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.0.0CC: oskutka, psrna, soa-p-jira, tsedmik
Target Milestone: CR1Keywords: Reopened
Target Release: 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
If the user quits the installer during the post-installation step, and then tries to re-run the installer an error message appears stating that "product.conf file is either malformed or does not exist." This is because EAP becomes malformed, so you cannot use the same EAP directory for the reinstallation. Or If you force exit the install during the post installations steps while installing FSW on an previously installed EAP, you may end up with a broken EAP installation. Work around is to install into a different location or clean up your installation and start over.
Story Points: ---
Clone Of: Environment:
Last Closed: 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
screen-2
none
Processing page
none
InstallationLog.txt none

Description Pavol Srna 2013-08-09 08:44:01 UTC
Steps to Reproduce:
1. Run soa installer, fill in all necessary fields
2. On the Post-Install installer step quit the installation
3. Re-run soa installer
4. User cannot reinstall to the same eap folder as in step 1. EAP is malformed.


Expected results:

User can re-install.

Comment 2 Pavol Srna 2013-08-10 18:16:16 UTC
Let's have these scenarios:

a)
* install soa using the installer - (success)
* re-run the installer (select the same install folder), finish installation. (success)

b) 
* install soa using the installer, on the very last page ('Creating Shortcuts') hit on quit and confirm. (success)
* re-run the installer (select the same install folder), hit 'next'. Now there is an error dialog saying: product.conf file is either malformed or does not exist. (fail)

User should be able to reinstall soa in scenario b).

Comment 3 Thomas Hauser 2013-08-15 16:09:29 UTC
The installer now backs up files that will be modified. Current list is:

$JBOSS_HOME/bin/product.conf
$JBOSS_HOME/modules/layers.conf
$JBOSS_HOME/standalone/configuration/standalone*.xml
$JBOSS_HOME/domain/configuration/domain.xml
$JBOSS_HOME/domain/configuration/host.xml

If the installation is cancelled early, the new files are deleted and the backups restored. If it is not, the backups are deleted upon installer completion. 

Relevant commit:  d07fd58ac39f38c5db4766086f04abeaebad38bd

Comment 4 Pavol Srna 2013-09-18 09:13:23 UTC
Created attachment 799227 [details]
screen-2

Comment 5 Pavol Srna 2013-09-18 09:14:27 UTC
I still hit the issue:

a) after hitting on quit I cannot start EAP anymore
b) after hittin on quit I cannot reinstall soa to the same folder

Comment 6 Pavol Srna 2013-09-18 09:22:13 UTC
Error: missing product.conf file

Comment 7 Thomas Hauser 2013-09-20 19:28:17 UTC
This was fixed, but some changes in IzPack unfortunately destroyed the functionality. It cannot be put into beta, but will be available for builds after that.

Comment 11 Pavol Srna 2013-10-23 09:52:55 UTC
Verified in ER4 build.

Comment 12 Tomáš Sedmík 2014-01-07 13:38:30 UTC
Steps to Reproduce:
1. Run soa installer, fill in all necessary fields
2. On the Post-Install installer step quit the installation
3. Re-run soa installer
4. User cannot reinstall to the same eap folder as in step 1. EAP is malformed.

(see attachment)

Comment 13 Thomas Hauser 2014-01-10 14:33:24 UTC
Hello Tomas,

I'm having trouble reproducing this issue. I'll continue trying today but none of f my attempts result in malformed EAP; some do, however, result in failed installs.

Comment 14 Tomáš Sedmík 2014-01-10 14:46:30 UTC
Created attachment 848217 [details]
Processing page

Hello Thomas,

I'm quitting the installation during "processing" (see attachment). Re-run SOA installer ends with described error.

Comment 15 Thomas Hauser 2014-01-10 23:06:42 UTC
The backup / restoration process has been modified to backup the user's entire EAP installation. This will then either be discarded or put back upon installer failure / cancellation.

Comment 16 Pavol Srna 2014-01-15 11:55:14 UTC
I still see some problems. 

If I attempt to quit the installation during "processing" on step 13, then there is java process not terminated properly on installer finish which prevents user to re-run the installation unless he 'pkill java' in terminal.


`ps ax | grep java` gives:

21365 pts/0    Sl     0:03 /usr/lib/jvm/java-7-oracle/bin/java -D[Standalone] -server -Xms1303m -Xmx1303m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djava.security.manager -Djava.security.policy=/home/psrna/data/soa/tests/soa-installer.test/eap61/jboss-eap-6.1/bin/security.policy -Drtgov.security.policy=/home/psrna/data/soa/tests/soa-installer.test/eap61/jboss-eap-6.1/bin/rtgov.policy -Dorg.jboss.boot.log.file=/home/psrna/data/soa/tests/soa-installer.test/eap61/jboss-eap-6.1/standalone/log/server.log -Dlogging.configuration=file:/home/psrna/data/soa/tests/soa-installer.test/eap61/jboss-eap-6.1/standalone/configuration/logging.properties -jar /home/psrna/data/soa/tests/soa-installer.test/eap61/jboss-eap-6.1/jboss-modules.jar -mp /home/psrna/data/soa/tests/soa-installer.test/eap61/jboss-eap-6.1/modules -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone -Djboss.home.dir=/home/psrna/data/soa/tests/soa-installer.test/eap61/jboss-eap-6.1 -Djboss.server.base.dir=/home/psrna/data/soa/tests/soa-installer.test/eap61/jboss-eap-6.1/standalone --admin-only --server-config=standalone.xml

Comment 18 Francisco Canas 2014-01-15 15:38:24 UTC
Hi Pavol,

I am having trouble reproducing the problem described in your last comment (16). Is this something you can reproduce every try, or only happens intermittently? Is there a particular job during the "processing" step where you quit to reproduce this error?

thanks.

Comment 19 Francisco Canas 2014-01-15 16:09:42 UTC
Please disregard my previous comment. 

I was able to reproduce this error by quitting the installation during processing precisely after the command to start up the server is first sent, but before the server has had time to display it's started code.

I've modified the Installer to track this intermediate 'starting' state, and to run the shutdown command during cleanup if the server was in this state when the user quit.

See commit:
http://git.app.eng.bos.redhat.com/installer-commons.git/commit/?h=6.1.1.ip&id=970b84c47f7e5afc709659332d03af9dcf0ab429

Comment 21 Francisco Canas 2014-01-22 15:02:37 UTC
Hi Pavol,

Can you give a bit more info on how to reproduce this issue? Which job number is the processing panel at when you hit quit? Or perhaps attach the InstallationLog.txt file. 

Also, some info about your OS and environment.

thanks!

Comment 22 Pavol Srna 2014-01-23 13:22:11 UTC
Hi Francisco,

the trick is to quit the installation in the right step. If I hit on quit during the postinstallation phase in step 14/110 then the java process is not terminated.

I recently tried on RHEL6 and openJDK7.

Comment 23 Pavol Srna 2014-01-23 13:23:24 UTC
Created attachment 854377 [details]
InstallationLog.txt

Comment 24 Thomas Hauser 2014-02-25 16:11:50 UTC
The installer now backs up the entire jboss-eap-6.1 directory that already existed on the user's system, and restores that after pressing the quit button.