Bug 825384 - [eap6] setting Keepalive Time when adding a new ThreadPool
Summary: [eap6] setting Keepalive Time when adding a new ThreadPool
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: UI
Version: JON 3.1.1
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: JON 3.3.0
Assignee: Stefan Negrea
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On: 824818
Blocks: as7-plugin
TreeView+ depends on / blocked
 
Reported: 2012-05-25 20:32 UTC by Stefan Negrea
Modified: 2014-08-28 20:06 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 824818
Environment:
Last Closed: 2014-08-28 20:06:51 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 997667 0 unspecified CLOSED Thread pool creation fails due to optional parameter keepalive-time sending empty data 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 998673 0 unspecified CLOSED Thread Pool keepalive-time-unit needs to define allowed values so the user doesn't have to guess 2021-02-22 00:41:40 UTC

Internal Links: 997667 998673

Description Stefan Negrea 2012-05-25 20:32:07 UTC
+++ This bug was initially created as a clone of Bug #824818 +++

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 20:32:44 UTC
This has now been fixed in release/jon3.1.x branch by the commits for bug 811288.

The commits relevant to this bug from release/jon3.1.x branch:

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

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

Comment 2 Filip Brychta 2012-08-08 14:25:35 UTC
Tested on 3.1.1.ER1. There is no enumeration for Keepalive Time units and no Keepalive Time field validation (it is still possible to left the field empty).

Comment 3 Stefan Negrea 2012-08-16 17:32:32 UTC
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. The support for min and max for lists has not been ported yet to JON 3.1.x branch and thus the complex validation cannot be implemented at this point.

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.

Comment 4 Stefan Negrea 2012-08-16 17:46:07 UTC
commit to release/jon3.1.x branch that removes required from keepalive-time field and subfields:

http://git.fedorahosted.org/cgit/rhq/rhq.git/commit/?h=release/jon3.1.x&id=11e017fbfd37d7fc08fa9c3e2a3ad9b03431994e

Comment 5 John Sanda 2012-08-22 05:44:01 UTC
Moving to ON_QA. The JON 3.1.1 ER3 build is available at https://brewweb.devel.redhat.com/buildinfo?buildID=230321.

Comment 6 Filip Brychta 2012-09-05 11:30:33 UTC
Tested on JON 3.1.1 CR1. keepalive-time is still required. 

Followed this scenario:
1- Create a new thread pool in threads subsystem (right click on threads resource, create child->ThreadPool)
2- fill a 'new resource name' and 'Max Threads'. Leave keepalive time and keepalive units empty

result:
create child operation failed with following error: 
JBAS012472: Missing 'time' for parameter 'keepalive-time', rolled-back=true
Max Threads

When creating a new thread pool via eap cli the only required attributes are thread pool name and max threads. Thread pool is created successfully just with these two attributes.

Comment 7 Stefan Negrea 2012-09-07 15:58:02 UTC
For JON 3.1.1, the only fix was the removal of required flag from all keepalive-time fields to ease form validation and requirements to save the configuration. 

To fix the situation reported in comment #6, the long term solution described in comment #3 (lists with min=0, max=1) should be applied. And this not available at this time in JON 3.1.1.

Comment 8 Filip Brychta 2012-09-10 10:24:47 UTC
Both keepalive-time fields (time, unit) are still required (threadpool resource->configuration tab->clear 'keepalive time' field -> validation error message is displayed). According to rhq-configuration.xsd a default value for 'required' attribute is 'true' so commit from comment #4 actually didn't change value of 'required' attribute.

Comment 9 Mike Foley 2012-09-13 14:39:37 UTC
discussed with jshaugn and villiam.

summary:  it's an issue.  it's not related to the plugin.  it's related to the UI.  it's not blocking for JON 3.1.1.  troubling that it is so reproducible (100%) for villiam ...and sporadic for others.

as a result ... i am setting the target release to jon 3.1.2

Comment 10 Mike Foley 2012-09-13 14:43:58 UTC
please disregard comment #9 ... that was for a completely different BZ and unrelated to this issue.

Comment 11 Mike Foley 2012-09-13 14:45:34 UTC
setting target release back to 3.1.1 to correct my error.

Comment 12 Stefan Negrea 2012-09-13 15:14:46 UTC
The target release was already set to 3.1.2 before comment #9. After chatting with Filip we will leave the target release to 3.1.2 since there is almost no change made in 3.1.1.


The default value of required attribute works differently for maps than for simple fields (see comment #8). A subfield of a map needs to explicitly have required=false in order to avoid validation after the initial set. So the before and after behaviour is unchanged in JON 3.1.1.

Comment 15 Stefan Negrea 2014-08-28 20:06:51 UTC
This bug is no longer valid since the thread configuration requires a keepalive-time in later EAP versions. For consistency, the keepalive-time will be kept as required accross all compatible versions of EAP. Without this correctly set, the resource would have unpredictible configuration based on defaults unknown to the user.

Closing this as NOTABUG, however dependent bugs noted in comments will be addressed independently.


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