Description of problem: The installer fails to run with the following errors: ERROR [org.rhq.storage.installer.StorageInstaller] Problems have been detected with one or more of the directories in which the storage node will need to store data ERROR [org.rhq.storage.installer.StorageInstaller] The user running this installer does not appear to have write permissions to /var/lib. Either make sure that the user running the storage node has write permissions or use the --saved-caches to change this value. ERROR [org.rhq.storage.installer.StorageInstaller] The user running this installer does not appear to have write permissions to /var/lib. Either make sure that the user running the storage node has write permissions or use the --commitlog to change this value. ERROR [org.rhq.storage.installer.StorageInstaller] The user running this installer does not appear to have write permissions to /var/lib. Either make sure that the user running the storage node has write permissions or use the --data to change this value. ERROR [org.rhq.storage.installer.StorageInstaller] The storage installer will now exit due to previous errors. ERROR [org.rhq.server.control.command.Install] An error occurred while running the storage installer: Process exited with an error: 3 (Exit value: 3) ERROR [org.rhq.server.control.command.Install] Try to point your root data directory via --storage-data-root-dir to a directory where you have read and write permissions. ERROR [org.rhq.server.control.RHQControl] An error occurred while executing the install command [Cause: org.apache.commons.exec.ExecuteException: Process exited with an error: 3 (Exit value: 3)] Version-Release number of selected component (if applicable): 3.2.0.ALPHA_QA.58 How reproducible: Always Steps to Reproduce: 1. Extract jon-server-3.2.0.ALPHA_QA.zip 2. Execute rhqctl install Actual results: Storage node installer fails due to read/write access error on /var/lib. Expected results: Installation should be successful with default configuration. Additional info: The user who starts the JBoss ON process can not have write access to /var/lib. Best case scenario, the user could be granted write access to a sub-directory of /var/lib but this would need to be done separately and not as the default requirement. Furthermore, a non-packaged (RPM) installation would normally use /var/local/lib as this is maintained outside of the distribution's provisioning system. Instead, by default, no value should be explicitly defined. This would then be interpreted as "use the default". The default would then be to see if a reasonable default in /var/local/lib/... is available and writeable and if it is, use it. Otherwise, fall-back to something inside the installation directory itself. If the user decides they want to host the storage data on a different partition or in a system wide location, they can explicitly configure it as such and in that case, the expectation would be the installation fails if the location is unavailable or can not be created.
The installer should test that default directory for permissions and if the user running the install does not have the permissions ask for a directory to put stuff in. If the user has explicitly given the directory via --storgag-dir... we may just act as we do now.
I talked with Larry, and I think we can put the data directory (by default) under RHQ_HOME. Let's say RHQ_HOME is /opt/rhq and I run rhqctl install there. I would wind up with the following directory structure, /opt/rhq | |--rhq-agent | |--rhq-server-<rhq-version> | \ | \--rhq-storage | |--rhq-data This works because it avoid the user needing administrative rights and keeps the data directory out of the rhq-server directory as I previously thought was being suggested.
I would like to see this in the 3.2 beta so I have gone with the work, including a new integration test. master commit hash: 6d78a7f3
Verified on Version: 3.2.0.ER2 Build Number: 9bf6f76:371eac0 Verified that default installation creates directory structure described in Comment 2 and that '--storage-data-root-dir' option works.