Bug #26171 Rule can be saved with DC item with empty instance -- this is bad
Submitted: 8 Feb 2007 0:55 Modified: 8 Mar 2007 14:25
Reporter: Andy Bang Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Web Severity:S2 (Serious)
Version:1.1 OS:Windows (Windows XP)
Assigned to: Joshua Ganderson CPU Architecture:Any

[8 Feb 2007 0:55] Andy Bang
Description:
I was able to save a rule that had a data item where I hadn't specified an instance.  This is bad because without an instance that data item doesn't get put into agent_tasks and therefore is never sent to the agent to be scheduled.

How to repeat:
1) Create a rule.
2) Add a data item, but don't specify an instance for it.
3) Save the rule.
4) Schedule the rule against some server.
5) It will never evaluate because it will never get data for that data item.
6) Look in agent_tasks.  You won't see it.

Suggested fix:
Don't allow a rule to be saved if an instance isn't specified for every data item.
[14 Feb 2007 17:37] Joshua Ganderson
Added error check to make sure that all variables map to an instance. In the process I cleaned up much of the controller logic around edit/save/copy and made the mapping be by uuid rather than name. Further error checking is expected to be defined by Andy and will be added to the save method prior to sending to the server.
[28 Feb 2007 0:25] Bill Weber
Verified on save now says "You must map "<variable>" to an instance."
[8 Mar 2007 14:25] Peter Lavin
Added to the changelog.