Bug 1091291
| Summary: | There is no validation on agent-configuration.xml while installing remote agent | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [JBoss] JBoss Operations Network | Reporter: | Jeeva Kandasamy <jkandasa> | ||||
| Component: | Agent | Assignee: | John Mazzitelli <mazz> | ||||
| Status: | CLOSED NOTABUG | QA Contact: | Mike Foley <mfoley> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | JON 3.3.0 | CC: | hrupp, jshaughn | ||||
| Target Milestone: | ER05 | ||||||
| Target Release: | JON 3.3.0 | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2014-09-30 22:06:27 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
While I think the installed agent should report back (to the install-UI), that something is broken, I think the validation is as good as when you manually install the agent with such a broken config file. We have to remember, all this is doing is pushing out the agent distro and running some commands as if we are the user doing it on the command like. As Heiko said, this is as good as when you manually install the agent. We don't do anything special. All the validation code is in the agent - the agent code isn't in the server. The server doesn't know what the agent wants to be an integer, or string, or whatever. This BZ could be generalized to say "something caused the agent to fail to start" and we'd have the same problem. What we do is push the agent distro, unpack it, and start it. Whether the agent starts or fails to start only comes later - sometimes errors won't show until much later after startup (for example, perhaps the agent bind address was incorrectly specified in the config .xml file (and only the agent could know this because its the agent box that has to do the DNS resolving) - the agent will fail to start in that case, or perhaps the agent ran out of disk space and can't write its plugins to its /plugins directory (which happens after it successfully registers and connects with the server), again, only the agent would know when that happened. So, its a question of how hard do we try to be smart about telling the user *in the UI* that the agent is bad? Right now, if the agent can be installed and be run, it is considered a successful installation. Whether the agent runtime "gets stuck" is another problem and actually might not manifest itself until well after the installer runs and the agent starts up. Keeping this BZ as a request for better validation but removing it as a blocker of JON3-30 as it's not directly related to the feature. out of scope for JON 3-30 |
Created attachment 889644 [details] xml with syntax error Description of problem: There is no validation on agent-configuration.xml while installing remote agent. Coping the file to remote agent and applied without any validation. In GUI it is showing Remote Agent installed Successfully. But it is actually failed to run. It will be good if we validate it while uploading the file. Validation should consider the following criteria, - Is it real xml file - There is no syntax error - Integer, String, etc.. should be validated (example: port number should be in integer) - allowed properties Version-Release number of selected component (if applicable): Version : 4.11.0-SNAPSHOT Build Number : 1bc9904 GWT Version : 2.5.0 SmartGWT Version : 3.0 Browser: Firefox 28 How reproducible: always Steps to Reproduce: 1. Navigate to "Administration-->Agents-->New" 2. Enter remote box details (Agent should not be installed), give some location, example: /tmp/ 3. Upload invalid agent-configuration.xml file 4. Click on "install Agent" Actual results: In GUI there is no exception, says installed successfully. Applying the xml file without any validation. Expected results: Before applying in to remote agent side, xml file should be validated and report error if xml file has any exception Additional info: attached invalid agent-configuration.xml (with syntax error) file