Bug 565980

Summary: OID for traps sent by the SNMP Alert Sender Plugin can be set to a string
Product: [Other] RHQ Project Reporter: Steve Salevan <ssalevan>
Component: AlertsAssignee: Heiko W. Rupp <hrupp>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: unspecifiedCC: bkearney, hrupp
Target Milestone: ---Flags: bkearney: needinfo+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-02-24 15:31:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 547833, 565632    

Description Steve Salevan 2010-02-16 20:42:08 UTC
Description of problem:
If a user attaches an SNMP Alert Sender Plugin to an alert (or configures the plugin), they can set the OID of the traps sent by it to a string, like 'bork'.  Since SNMP OIDs are integers, this field should be checked to ensure that only integers can be entered.

Version-Release number of selected component (if applicable):
RHQ, 12/16 git pull from alertPlugin branch

How reproducible:
Always

Steps to Reproduce:
1. Attempt to set the OID for traps sent by the SNMP Alert Sender Plugin to a string, like 'bork', either on the plugin configuration page or while attaching it to an alert
  
Actual results:
Input accepted and SNMP traps for alert will fail to send

Expected results:
Input rejected with error message

Additional info:

Comment 1 wes hayutin 2010-02-17 13:27:07 UTC
mass move to rhq_chainsaw tracker bug

Comment 2 wes hayutin 2010-02-18 14:49:35 UTC
This bug has now been triaged by Chainsaw on 2/18. The expectation is the bug to be addressed by the end of sprint06 roughly 3/10/10.

Comment 3 Bryan Kearney 2010-02-18 18:23:55 UTC
What is the exact format? Is it X.X.X or are dashes allowed?

Comment 4 Heiko W. Rupp 2010-02-19 11:57:30 UTC
Oids follow the x.y.z.a.b.c format with variable length. All of a,b,c,d need to be numeric in our implementation, but can in theory be strings like sys.system.interfaces.eth.packets.sent.
So bork would be a valid oid if someone would define a mib accordingly.

Comment 5 Bryan Kearney 2010-02-19 13:08:54 UTC
So, this is a works as designed?

Comment 6 Heiko W. Rupp 2010-02-19 14:22:53 UTC
Sort of - as long as we have no real OID/MIB parser (hooked into the UI classes).
One could add some basic oid validation (e.g at least one dot, no two dots adjacent) to the general UI config elements in having this as an additional input type to the configuration schema.

Comment 10 Bryan Kearney 2010-02-24 15:31:18 UTC
Given that customers can use custom MIBs which do not follow any given pattern, we will keep this as is.