Description of problem: The rhqctl script contains environment variables that lead the user to believe they should change/modify them directly within the script. Modifications to the binary/scripts provided as part of the base distribution can not be supported. These settings must be externalized so the user can easily modify them without direct modification to the control script itself. Version-Release number of selected component (if applicable): 3.2.0.GA Additional info: As with any script or execution environment, user supplied settings are provided via a sourced file. For example, rhqctl.conf may should contain such values. This is very important for the following reasons: - modification of a script file is error prone and may result in an invalid script file that can not be recovered; - upgrades and patches may need to update rhqctl but if user configuration is mixed in the file the users configuration will always be lost; - keeping configuration separate from execution makes it easier to identify active configuration values;
I don't think the intent of our script documentation is to encourage editing the script itself, but perhaps we should call that out more explicitly in the script comments/documentation. If that is not sufficient then I think we would need to do as Larry suggests and add an rhq-server-env.sh|bat that gets sourced by the various server-side scripts. I think a single file is best because it consolidates all of the settings in one place. Common settings like RHQ_JAVA_HOME can be set once, and specific variables can be grouped and inspected against each other easily.
master commit 54af334ddb67f8286a2da6a614be8392342bfde3 Author: Jay Shaughnessy <jshaughn> Date: Mon Apr 7 16:25:03 2014 -0400 Introduce rhq-server-env.bat. Analogous .sh file coming in subsequent commit. master commit 60e45c64874989f4136134827399bfaa4f7e164b Author: Jay Shaughnessy <jshaughn> Date: Mon Apr 7 17:54:15 2014 -0400 Introduce rhq-server-env.sh. Now environment variables are set outside of the actual scripts used for installation, etc.
master commit 7f4465405f70af01080aa6af8674f47fe7b14059 Author: Jay Shaughnessy <jshaughn> Date: Tue Apr 8 11:17:58 2014 -0400 Add logic to 'rhqctl upgrade' command to copy rhq-server-env.sh|bat from the old to new server, if it exists. The old, potentially edited, version will be used and the new version will be backed up for reference in case it has new env variables and/or documentation. This behavior is analogous to what we currently do for rhq-agent-env.sh|bat during an agent update. Also: fix an upgrade problem with server stop at the end of the upgrade.
master commit e7c9066d73b55c7f453ed29997c521c8a9d3c057 Author: Jay Shaughnessy <jshaughn> Date: Thu Apr 24 16:09:03 2014 -0400 - Fix issues with rhq-encode-password.sh|bat - Don't abort script if rhq-server-env.sh|bat is not found
Moving to ON_QA as available to test with brew build of DR01: https://brewweb.devel.redhat.com//buildinfo?buildID=373993
Result of scenario from comment 5: [hudson@fbr-upg-s bin]$ rm -rf rhq-server-env.sh [hudson@fbr-upg-s bin]$ ./rhqctl install Failed to find rhq-server-env.sh. This file should exist in the bin directory. It works correctly on windows. Version : 3.3.0.DR01 Build Number : 6468454:dda0a47
master commit 3ba9855c298f6155cf77017e4e9eae0d664de590 Author: Jay Shaughnessy <jshaughn> Date: Tue Aug 19 10:45:10 2014 -0400 Apply a missing fix to to rhqctl that was already in the .bat. release/jon3.3.x commit 2d322b3533c3d7e86f107dad1ac499177fe64725 Author: Jay Shaughnessy <jshaughn> Date: Tue Aug 19 10:48:09 2014 -0400 Cherry-pick master 7898bbbb65029a9cc6c1dd06584336a40d1117b5
Moving to ON_QA as available for test with the following brew build: https://brewweb.devel.redhat.com//buildinfo?buildID=381194
Verified on Version : 3.3.0.ER02 Build Number : 4fbb183:7da54e2