Bug 1002226 - Server installation fails due to user requiring escalated permissions for data storage
Summary: Server installation fails due to user requiring escalated permissions for dat...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Installer
Version: JON 3.2
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ER02
: JON 3.2.0
Assignee: John Sanda
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: jon32-Beta-Blockers-1006862
TreeView+ depends on / blocked
 
Reported: 2013-08-28 16:36 UTC by Larry O'Leary
Modified: 2014-01-02 20:33 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-02 20:33:39 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Larry O'Leary 2013-08-28 16:36:00 UTC
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.

Comment 1 Heiko W. Rupp 2013-09-12 08:53:57 UTC
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.

Comment 2 John Sanda 2013-09-12 21:43:27 UTC
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.

Comment 3 John Sanda 2013-09-14 15:50:57 UTC
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

Comment 5 Filip Brychta 2013-09-30 09:11:28 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.