Bug 824818 - [eap6] setting Keepalive Time when adding a new ThreadPool
[eap6] setting Keepalive Time when adding a new ThreadPool
Status: ON_QA
Product: RHQ Project
Classification: Other
Component: Plugins (Show other bugs)
4.4
Unspecified Unspecified
high Severity high (vote)
: ---
: RHQ 4.13
Assigned To: Stefan Negrea
Mike Foley
: Reopened
Depends On: 998673
Blocks: as7-plugin 825384
  Show dependency treegraph
 
Reported: 2012-05-24 07:05 EDT by Libor Zoubek
Modified: 2015-11-01 19:45 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 825384 (view as bug list)
Environment:
Last Closed: 2014-09-03 16:29:50 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Libor Zoubek 2012-05-24 07:05:37 EDT
Description of problem:When creating a new threadPool (or overall configuring Keepalive Time) It is not simple to guess Time unit. It would be nice if UI suggested time units by enumerating java.util.concurrent.TimeUnit. Moreover, Keepalive Time must be set, otherwise resource is not created. UI does not handle this.


Version-Release number of selected component (if applicable):
JON 3.1.ER4 EAP6.ER8

How reproducible:always


Steps to Reproduce:
1.have imported EAP6 in standalone mode
2.go to threads
3.add child of type 'ThreadPool'
  
Actual results: User is not required to set Keepalive Time, but it is required to create the resource. Time Unit is a text field and it is not straightforward to guess correct value


Expected results: UI notifies me, that Keepalive Time is required and pops-up a combo for selecting Unit.


Additional info:
Comment 1 Stefan Negrea 2012-05-25 16:31:14 EDT
This has now been fixed in master branch by the commits for bug 811288.

The commits relevant to this bug from master branch:

http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commit;h=acc5f0a08049440b70441fda1d591e225f2156ab

http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commit;h=1490b713fd1b2b0829521225eb4d9ab21b1f4e90
Comment 2 Stefan Negrea 2012-08-16 13:27:24 EDT
The keepalive-time validation is complicated on the EAP6 side. 

Here are the rules from the actual resource description:
1) The keepalive-time can be null
2) If either time or unit are non-null then both of them need to be non-null

Currently there is no support to implement the complex validation rules described by EAP6 without lists that support min and max. In this case it would be implemented with a list with min=0 and max=1 and if a single element is present then translate that into the EAP6 map having a value, if list has a size of zero set the property to null.


However, these rules are not enforced by EAP6 (tested all the resources that have this property). Users can set either time or unit to null and the configuration is accepted by the server. Until the more complex solution is implemented given the weak enforcement from EAP6 side, all the required flags have been removed from the resource descriptor. This will avoid user confusion and prevent false configuration errors.

master branch commit for required removal:
http://git.fedorahosted.org/cgit/rhq/rhq.git/commit/?id=10ad78d37ed54185afee537929c7411f0f40b694

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