Bug 1100507 - Application types list has "JBoss Enterprise Application Platform 6" under "Other types" instead of under "Java"
Summary: Application types list has "JBoss Enterprise Application Platform 6" under "O...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 2.1.0
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
: ---
Assignee: Miheer Salunke
QA Contact: libra bugs
URL:
Whiteboard:
Depends On: 1100508
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-23 00:22 UTC by Miciah Dashiel Butler Masters
Modified: 2014-06-23 07:37 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
When choosing an application type to create on the /console/application_types page of the Management Console, the JBoss Enterprise Application Platform 6 cartridge is placed in the "Other types" group instead of in the "Java" group. This was due to how tags were parsed for cartridges with multiple tags. This bug fix improves application type grouping and the JBoss EAP 6 cartridge now appears in the "Java" group.
Clone Of:
: 1100508 (view as bug list)
Environment:
Last Closed: 2014-06-23 07:37:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:0781 0 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.1.2 bug fix update 2014-06-23 11:36:38 UTC

Description Miciah Dashiel Butler Masters 2014-05-23 00:22:38 UTC
Description of problem:

In the application types list in the management console (/console/application_types), the "JBoss Enterprise Application Platform 6" (jbosseap-6) cartridge is placed in the "Other types" group instead of in the "Java" group.


How reproducible:

Readily.


Steps to Reproduce:

1. Provision a RHEL6 host.

2. Run `curl -O https://raw.githubusercontent.com/openshift/openshift-extras/enterprise-2.1/enterprise/install-scripts/generic/openshift.sh` on the RHEL6 host provisioned in Step 1 to get the latest version of the installation script.

3. Run `sh openshift.sh` on the RHEL6 host to install OpenShift Enterprise 2.1 with the standard cartridges.

4. Run `sh openshift.sh actions=post_deploy` to perform post-deployment configuration on the RHEL6 host.

5. On a system with a web browser, browse to the URL https://broker.example.com/console/application_types where either the system is configured to resolve broker.example.com to the host provisioned in Step 1 or broker.example.com is substituted in the URL by the IP address of the host.


Actual results:

"JBoss Enterprise Application Platform 6" appears under the "Other types" category.


Expected results:

"JBoss Enterprise Application Platform 6" should appear under the "Java" category.


Additional info:

The relevant code is the algorithm in_groups_by_tag in Console::ModelHelper:   https://github.com/openshift/enterprise-server/blob/enterprise-2.1/console/app/helpers/console/model_helper.rb#L257

The algorithm takes a list of application types and tags and returns two arrays: one with the application types grouped tags that they match and one with application types that have no tags that more than one application type matches.    https://github.com/openshift/enterprise-server/blob/enterprise-2.1/console/app/controllers/application_types_controller.rb#L42

The algorithm iterates over the array of tags that is passed into it.  For each tag in this array, the algorithm pulls out each type that matches the tag.  After iterating over the array of types while matching them against the iterator tag, the algorithm either creates a new grouping of all types that matched the tag if there were more than one, or else the algorithm puts any matching type in the "other" group.

The problem is that jbosseap-6 has the "xpaas" tag, which comes before the "java" tag in the array of tags provided to in_groups_by_tag.  Thus the jbosseap-6 cartridge is found to match the "xpaas" tag before the "java" tag is considered.  However, jbosseap-6 is the only cartridge with the "xpaas" tag, so it is placed on the "other" group before the "java" tag is considered.  Thus by the time the "java" tag is considered, jbosseap-6 has already been pulled into the "others" group and is not in the array considered for consideration when matching types against the "java" tag.

Comment 5 Yujie Zhang 2014-06-12 05:21:40 UTC
Tested on above puddle, the issue has been fixed now, "jbosseap" can be listed in the "java" column, so verify this bug, thanks.

Comment 7 errata-xmlrpc 2014-06-23 07:37:52 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-0781.html


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