Created attachment 573795 [details] CLI script reproducing the issue Description of problem: with CLI, programmatically creating a group and putting 1 member in it creates a mixed group instead of a compatible group Version-Release number of selected component (if applicable): RHQ 4.4 How reproducible: 100% Steps to Reproduce: 1. ./rhq-cli.sh -u rhqadmin -p rhqadmin -f attachment1 [details].js 2. verify thru the UI that a mixed group was created and that it contains the platform 3. verify through SQL (SELECT NAME, RECURSIVE, CATEGORY FROM RHQ_RESOURCE_GROUP;) that the group is a non-recursive mixed group Actual results: non-recursive mixed group Expected results: the expectation is that this creates a compatible group. this is required for 2 reasons: 1) CLI Automation, 2) CLI scripts a customer may write to do bundle deployments programmatically thru the CLI. Additional info:
error message [mfoley@foleymonsterbox1 bin]$ ./rhq-cli.sh -u rhqadmin -p rhqadmin -f /home/mfoley/automation2/automatjon/jon//clitest/resources/js-files/bundlemanager.js Remote server version is: 4.4.0-SNAPSHOT (969ed45) Login successful Exception in thread "main" org.rhq.enterprise.client.script.CLIScriptException: javax.script.ScriptException: sun.org.mozilla.javascript.WrappedException: Wrapped javax.ejb.EJBException: [Warning] java.lang.IllegalArgumentException: Invalid groupId [10013]. It must be an existing compatible group whose members must be able to support bundle deployments (<Unknown source>#51) in <Unknown source> at line number 51 at org.rhq.enterprise.client.commands.ScriptCommand.executeScriptFile(ScriptCommand.java:298) at org.rhq.enterprise.client.commands.ScriptCommand.execute(ScriptCommand.java:108) at org.rhq.enterprise.client.ClientMain$StartupConfiguration.process(ClientMain.java:142) at org.rhq.enterprise.client.ClientMain.main(ClientMain.java:162) Caused by: javax.script.ScriptException: sun.org.mozilla.javascript.WrappedException: Wrapped javax.ejb.EJBException: [Warning] java.lang.IllegalArgumentException: Invalid groupId [10013]. It must be an existing compatible group whose members must be able to support bundle deployments (<Unknown source>#51) in <Unknown source> at line number 51
master commit daec885053b6679e4bb6a80c7c8dc86c75868a4b The following ResourceGroupManager API methods now recalculate group type when they are done: - addResourceToGroup() - removeResourcesFromGroup() - updateGroup() // when using the updateMembers option
Bulk closing of items that are on_qa and in old RHQ releases, which are out for a long time and where the issue has not been re-opened since.