Bug 1060353 - Non required or unused properties in rhq-server.properties are being required by rhqctl
Summary: Non required or unused properties in rhq-server.properties are being required...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Installer
Version: JON 3.2
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: DR01
: JON 3.3.0
Assignee: Jay Shaughnessy
QA Contact: Filip Brychta
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-31 22:05 UTC by Larry O'Leary
Modified: 2014-12-11 14:00 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-12-11 14:00:01 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1127790 0 unspecified CLOSED Default values should be used for unset properties in rhq-server.properties 2021-02-22 00:41:40 UTC

Internal Links: 1127790

Description Larry O'Leary 2014-01-31 22:05:48 UTC
Description of problem:
Seems pretty straight forward. A property which is not required should -- well -- not be required. However, if you omit these unused or non-required properties from the property file rhqctl fails and tells you that the property file is invalid due to missing properties.

Version-Release number of selected component (if applicable):
3.2.0.GA

How reproducible:
Always

Steps to Reproduce:
1. Modify rhq-server.properties to use an Oracle database
   
   Remove or comment out the properties that have "unused" as their values
2. Attempt to run rhqctl install

Actual results:
rhqctl fails with:
    17:00:04,828 ERROR [org.rhq.server.control.RHQControl] The rhq-server.properties file is not valid. Installation is canceled: Validation errors:
    [rhq.server.database.port] must exist and be set to a number : [null]
    [rhq.server.database.db-name] must exist and be set to a valid string value
    [rhq.server.database.server-name] must exist and be set to a valid string value

Expected results:
Install should continue on as normal. No errors should be produced.

Comment 1 Jay Shaughnessy 2014-04-04 21:14:26 UTC
Doing this violates the documentation directly above those properties:

# These should point to the database that your RHQ Server will use as
# its backend RDBMS storage.
# If you are using Oracle:
#   - comment out the Postgres settings
#   - uncomment the Oracle settings below
#   - adjust the values to match your environment
#   - do not edit the three unused properties, leave as "prop=unused"


Given the documentation that is already there, is this really an issue?

Comment 2 Larry O'Leary 2014-04-04 21:56:43 UTC
(In reply to Jay Shaughnessy from comment #1)
> Given the documentation that is already there, is this really an issue?

Yes.

Although this might appear in this version of the properties file, the properties file is owned by the user and the user does not require the comments. In other words, we can't fix deficiencies via documentation or notes. 

Instead, 'unused' properties should not be required or needed. The components which may want them should look for them. And if they aren't there, should use a reasonable default.

The expectation would be that the following would work without any issue:

cat >"${RHQ_SERVER_HOME}"'/bin/rhq-server.properties' <<EOF
jboss.bind.address=0.0.0.0
rhq.autoinstall.enabled=true
EOF

"${RHQ_SERVER_HOME}"'/bin/rhqctl' install

Now, I understand that there may be other properties within the file that have the same problem and that the point of this bug raised specific issues related to the database properties, but the goal should be the same. One could easily argue that jboss.bind.address and rhq.autoinstall.enabled shouldn't be needed either as a reasonable default could be 127.0.0.1 and true respectively.

Comment 3 Jay Shaughnessy 2014-04-07 17:49:33 UTC
master commit 2324ad07f5356195b2345bf68cc781f8918f417f
Author: Jay Shaughnessy <jshaughn>
Date:   Mon Apr 7 13:47:20 2014 -0400

    Make the unused oracle props optional and remove them from the supplied
    rhq-server.properties file.

Comment 4 Jay Shaughnessy 2014-04-07 21:57:51 UTC
master commit 82416ed019173880186b11a81bc93df2677eed26
Author: Jay Shaughnessy <jshaughn>
Date:   Mon Apr 7 17:46:16 2014 -0400

    Remove some related special-case installer code.

Comment 5 Jay Shaughnessy 2014-05-15 19:56:13 UTC
Note : The prior work went into rhq 4.11.  This commit will go into rhq 4.12.

commit 942f18c96ba7e2869820b7e0a5d8dcd10d889e54
Author: Jay Shaughnessy <jshaughn>
Date:   Wed May 14 12:48:23 2014 -0400

 Better handle backward compatible oracle settings where the "unused"
 settings are carried forward via upgrade.

Comment 6 Simeon Pinder 2014-07-31 15:52:05 UTC
Moving to ON_QA as available to test with brew build of DR01: https://brewweb.devel.redhat.com//buildinfo?buildID=373993

Comment 7 Filip Brychta 2014-08-07 09:20:56 UTC
Based on comment 2 I used rhq-server.properties containing only:
jboss.bind.address=0.0.0.0
rhq.autoinstall.enabled=true
rhq.autoinstall.server.admin.password=GNv8qjaLIjxMC7cHVS+QMQ==

Result:
[hudson@fbr-jon33-ora bin]$ ./rhqctl install
05:10:19,475 INFO  [org.jboss.modules] JBoss Modules version 1.3.3.Final-redhat-1
05:10:19,923 ERROR [org.rhq.server.control.RHQControl] The rhq-server.properties file is not valid. Installation is canceled: Validation errors:
[rhq.server.maintenance-mode-at-startup] must exist and be set 'true' or 'false' : [null]
[rhq.server.client.security.server-auth-mode-enabled] must exist and be set 'true' or 'false' : [null]
[rhq.communications.multicast-detector.enabled] must exist and be set 'true' or 'false' : [null]
[rhq.server.socket.binding.port.http] must exist and be set to a number : [null]
[rhq.server.concurrency-limit.measurement-report] must exist and be set to a number : [null]
[rhq.server.concurrency-limit.content-download] must exist and be set to a number : [null]
[rhq.server.concurrency-limit.inventory-sync] must exist and be set to a number : [null]
[rhq.storage.gossip-port] must exist and be set to a number : [null]
[rhq.server.email.smtp-port] must exist and be set to a number : [null]
[rhq.storage.cql-port] must exist and be set to a number : [null]
[rhq.communications.global-concurrency-limit] must exist and be set to a number : [null]
[rhq.server.concurrency-limit.inventory-report] must exist and be set to a number : [null]
[rhq.server.operation-timeout] must exist and be set to a number : [null]
[rhq.server.concurrency-limit.availability-report] must exist and be set to a number : [null]
[rhq.communications.multicast-detector.port] must exist and be set to a number : [null]
[rhq.server.concurrency-limit.content-report] must exist and be set to a number : [null]
[rhq.server.concurrency-limit.measurement-schedule-request] must exist and be set to a number : [null]
[rhq.server.socket.binding.port.https] must exist and be set to a number : [null]
[rhq.server.startup.web.max-connections] must exist and be set to a number : [null]
[rhq.server.quartz.lockHandlerClass] must exist and be set to a valid string value
[rhq.server.email.smtp-host] must exist and be set to a valid string value
[rhq.server.quartz.selectWithLockSQL] must exist and be set to a valid string value
[rhq.autoinstall.database] must exist and be set to a valid string value
[rhq.server.email.from-address] must exist and be set to a valid string value



Original issue with oracle db properties and "unused" values is fixed. So there are two options:
1- mark this bz as verified and create a separate bz for the issue described above
2- keep just one bz and fix the issue here

Comment 8 Jay Shaughnessy 2014-08-07 13:16:20 UTC
As far as I'm concerned this is fixed and should be marked verified.  

Option 3: Mark this as verified and don't add another RFE BZ.  There is no reason, in my opinion, to do a bunch of work to support a properties file that has been manipulated in ways that does not tie back to any actual user failure that I'm aware of. The test install fails and we're telling you why, that seems reasonable.  Let's not invent more work when we already have well over a 1000 open BZs.

Comment 9 Larry O'Leary 2014-08-07 13:25:53 UTC
Although this bug title was intended to be general to ensure that all properties used a reasonable default, I do see that we focused on the test case provided in comment 0. This meant we only fixed the Oracle properties issue. Therefore I agree that we should probably mark this one as verified and create a new bug for the other properties as indicated in comment 7.

Putting back ON_QA for Filip.

(In reply to Jay Shaughnessy from comment #8)
> As far as I'm concerned this is fixed and should be marked verified.  
> 
> Option 3: Mark this as verified and don't add another RFE BZ.  There is no
> reason, in my opinion, to do a bunch of work to support a properties file
> that has been manipulated in ways that does not tie back to any actual user
> failure that I'm aware of. The test install fails and we're telling you why,
> that seems reasonable.  Let's not invent more work when we already have well
> over a 1000 open BZs.

This bug is about usability and user expectations for an enterprise product. In a cloud environment, these properties are dynamically generated. The better we can be at using real defaults, especially when 99% of the time these properties are not used, the easier it makes configuration on the user. Additionally it becomes easier to maintain an environment and support upgrades across multiple releases over the support period.

Comment 10 Filip Brychta 2014-08-07 14:47:03 UTC
New bz 1127790 created. This bz (original issue with oracle db properties and "unused" values) is verified on
3.3.0.DR01
Build Number :	
6468454:dda0a47


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