Bug 1029079
Summary: | Installer must escape backslashes in paths during post-install configuration | ||
---|---|---|---|
Product: | [JBoss] JBoss Enterprise Application Platform 6 | Reporter: | Petr Kremensky <pkremens> |
Component: | Installer | Assignee: | Francisco Canas <fcanas> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Petr Kremensky <pkremens> |
Severity: | urgent | Docs Contact: | Russell Dickenson <rdickens> |
Priority: | unspecified | ||
Version: | 6.2.0 | CC: | fcanas, mtjandra, thauser |
Target Milestone: | CR3 | ||
Target Release: | EAP 6.2.0 | ||
Hardware: | Unspecified | ||
OS: | Windows | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-12-15 16:15:44 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
Petr Kremensky
2013-11-11 15:49:49 UTC
I've added the necessary extra escape characters to the Installer's CLI commands so that windows paths are inserted into the batch command and the config xmls with the proper escaped backslashes like so: "C:\\fcanas\\vault\\keystore.jks" Note: The above works, but then final Installationlog file will show the command with extra escape characters, which unfortunately means that it is no longer reproducible by the user int he CLI (unless he removes the extra \'s). This is due to the way the CLI returns info (through the stdout rather then as a return value) and how we capture that info in order to log it. Will try to find a way to display the correct path in the log, but it may require some more modifications to izpack that I didn't want to make so close to the release. http://git.app.eng.bos.redhat.com/jbossas-installer.git/commit/?h=eap-6.2&id=6f2523e64391df17316ce30035d5b58a4b10830d I see things like: "W:\\\\\\\\tmp\\\\\\\\pkremens\\\\\\\\ssl.keystore" in xml files and CLI log. Although it is working, we should definitely spend some time trying to find cleaner solution for 6.3 (agree with avoiding more complicated modifications to izpack now). Please fix also commands using Keystore and Truststore URL during JSSE configuration, the rest seems to be fine. Please note that all of this is a side effect of the JBoss CLI API, unfortunately. I have added similar path escaping to the JSSE keystore and truststore URL elements. Note that the JSSE properties are parsed differently by the CLI, so the actual number of escape characters required in the installer is halved. This has the unfortunate side effect of creating more inconsistency in the Installationlog file: For SSL that path appears like this: c:\\\\\\\\myfolder\\\\\\\\myfile.jks For JSSE the path appears like this: c:\\\\myfolder\\\\myfile.jks Even though the path appears like this in the actual xmls for *both*: c:\\myfolder\\myfile.jks For 6.3 we'll come up with some other workaround to replace the paths shown in the logs with the third version so it's consistent with the xml files. One more note: Made a few changes in order to preserve spaces in the paths: (ie. c:\my folder\keystore.jks) This again changes what we see in the Installationlogs, but it is now more consistent. All paths will have the same number of escape chars. I am aware that CLI is villain here, we were complaining about this (BZ1024381), but we didn't succeeded so far :/. There is one more thing that need to be fixed. You've accidentally removed double quotes from vault configuration command on KEYSTORE_URL and KEYSTORE_FILE_DIR attribute values. Command looks like: ...("KEYSTORE_URL" => /home/pkremens/jbossqe-eap-tests-installer/src/test/resources/vault/vault.keystore), ... ("ENC_FILE_DIR" => /home/pkremens/jbossqe-eap-tests-installer/target/eap/)]) This is throwing Vault Reader Exception -> installation fails http://git.app.eng.bos.redhat.com/jbossas-installer.git/commit/?h=eap-6.2&id=6f2523e64391df17316ce30035d5b58a4b10830d I actually re-added the quotes yesterday (see comment 5) because the CLI wasn't preserving spaces in the path otherwise. The vault installation succeeds with the command: /core-service=vault:add(vault-options=[("KEYSTORE_URL" => "/home/yyz/fcanas/vault/keystore.jks"), ("KEYSTORE_PASSWORD" => "MASK-1KXfR4wmalv87Emab3wgdL"), ("KEYSTORE_ALIAS" => "myvault"), ("SALT" => "12345678"), ("ITERATION_COUNT" => "44"), ("ENC_FILE_DIR" => "/home/yyz/fcanas/EAP-6.2.0/")]) The batch executed successfully {"outcome" => "success"} This update will be in the re-spin and/or CR3. Verified on EAP 6.2.0.CR3 installer. |