Bug 918050 - Missing validation of configuration when creating a new resource via CLI
Summary: Missing validation of configuration when creating a new resource via CLI
Keywords:
Status: NEW
Alias: None
Product: RHQ Project
Classification: Other
Component: CLI, Plugins
Version: 4.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-05 11:45 UTC by Filip Brychta
Modified: 2022-03-31 04:27 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)
configScreenshot (134.95 KB, image/png)
2013-03-05 11:45 UTC, Filip Brychta
no flags Details
CLI script with reproduction steps (1.08 KB, application/javascript)
2013-03-05 11:47 UTC, Filip Brychta
no flags Details

Description Filip Brychta 2013-03-05 11:45:28 UTC
Created attachment 705365 [details]
configScreenshot

Description of problem:
It seems that validation of some fields which is done during creation of a new resource by GUI is missing when creating a new resource via CLI. So the resource is created with invalid configuration which is impossible via GUI. Concrete example would be creation of POP3 Mail Server on eap6. 

Version-Release number of selected component (if applicable):
Version: 4.7.0-SNAPSHOT
Build Number: 8beb34b

How reproducible:
Always

Steps to Reproduce:
1. eap6 standalone is imported to the inventory
2. create a new POP3 Mail Server resource via CLI with a default configuration (see attached test.js which does that)
3. check configuration of created POP3 Mail Server in GUI
  
Actual results:
POP3 Mail Server is created with invalid configuration (see attached configScreenshot)

Expected results:
POP3 Mail Server is not created and CLI client throws an exception with message containing validation errors

Additional info:
This is probably a general problem which could be probably found for configuration updates as well.

Comment 1 Filip Brychta 2013-03-05 11:47:52 UTC
Created attachment 705366 [details]
CLI script with reproduction steps

Comment 2 Filip Brychta 2013-03-05 13:12:11 UTC
Additional info:
The fact that a resource is created with invalid configuration means, that subsequent operation 'reload' on eap6 fails and eap6 fails to start up with exception 'Failed to parse configuration'. So the configuration of eap6 must be fixed manually.


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