Bug #47562 "NS" (No Severity Set) support issue severity unhandled by MEM
Submitted: 23 Sep 2009 18:12 Modified: 19 Nov 2009 11:18
Reporter: Josh Sled Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Web Severity:S3 (Non-critical)
Version:2.1.0.1096 OS:Any
Assigned to: Josh Sled CPU Architecture:Any

[23 Sep 2009 18:12] Josh Sled
Description:
Support issue can of course have a Severity from S1 through S4, but can too have a value of "NS" meaning "No Severity Set".  MEM does not parse this, resulting in e.g.,

2009-09-23 13:53:51,812 ERROR [em-worker-pool-thread-6:monitor.support.DevSpPoller] error consuming successful response
java.lang.IllegalArgumentException: No enum const class com.mysql.etools.monitor.support.SpIssue$Severity.NS
	at java.lang.Enum.valueOf(Enum.java:196)
	at com.mysql.etools.monitor.support.SpIssue$Severity.valueOf(SpIssue.java:34)
	at com.mysql.etools.monitor.support.JsonIssue.getSeverity(JsonIssue.java:86)
	at com.mysql.etools.monitor.pom.hib.HibSpIssue.updateFrom(HibSpIssue.java:123)
	at com.mysql.etools.monitor.pom.hib.HibSpIssue.<init>(HibSpIssue.java:74)
	at com.mysql.etools.monitor.pom.hib.HibPersistence.createSpIssue(HibPersistence.java:2086)
	at com.mysql.etools.monitor.support.SpManagerImpl.consumeUpdate(SpManagerImpl.java:86)
	at com.mysql.etools.monitor.support.SpHttpPoller.consumeSuccessfulResponse(SpHttpPoller.java:101)
	at com.mysql.etools.util.net.AbstractHttpPoller.yayHandleGoodResponse(AbstractHttpPoller.java:358)
	at com.mysql.etools.util.net.AbstractHttpPoller.innerPoll(AbstractHttpPoller.java:245)
	at com.mysql.etools.util.net.AbstractHttpPoller.poll(AbstractHttpPoller.java:199)
	at com.mysql.etools.util.net.AbstractHttpPoller$1.run(AbstractHttpPoller.java:119)
	at com.mysql.etools.util.LogServiceTaskDecorator$LoggingRunnable.run(LogServiceTaskDecorator.java:69)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
	at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:280)
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:135)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:65)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:146)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:170)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676)
	at java.lang.Thread.run(Thread.java:595)

How to repeat:
Use credentials, have a support issue with Severity=NS, wait for Support Portal poll, watch logs.

Suggested fix:
Handle.  Investigate not parsing this field, but only displaying whatever string is returned from enterprise.mysql.com.
[1 Oct 2009 15:18] Enterprise Tools JIRA Robot
Marcos Palacios writes: 
Verified as reported in build 2.1.0.1096.
[9 Oct 2009 15:33] Enterprise Tools JIRA Robot
Josh Sled writes: 
revno: 7486
committer: Josh Sled <jsled@asynchronous.org>
branch nick: 2.1-bugs
timestamp: Fri 2009-10-09 11:12:08 -0400
message:
  EM-3611, Bug#47562: handle "N[o Severity ]S[et]" support issue severity code.
[9 Oct 2009 16:24] Enterprise Tools JIRA Robot
Josh Sled writes: 
and on trunk:

revno: 7530 [merge]
revision-id: jsled@asynchronous.org-20091009153723-809pghf6rul1fxcw
parent: bill.weber@sun.com-20091008212330-ohb6dm092b6c5nsu
parent: jsled@asynchronous.org-20091009151208-fv2ll0qaocrbaybc
committer: Josh Sled <jsled@asynchronous.org>
branch nick: local
timestamp: Fri 2009-10-09 11:37:23 -0400
message:
  merge sync with branches/2.1/
    ------------------------------------------------------------
    revno: 7431.3.39
    revision-id: jsled@asynchronous.org-20091009151208-fv2ll0qaocrbaybc
    parent: jsled@asynchronous.org-20091009150143-9baqtmemat9cq1zh
    committer: Josh Sled <jsled@asynchronous.org>
    branch nick: 2.1-bugs
    timestamp: Fri 2009-10-09 11:12:08 -0400
    message:
      EM-3611, Bug#47562: handle "N[o Severity ]S[et]" support issue severity code.
[13 Oct 2009 21:07] Enterprise Tools JIRA Robot
Keith Russell writes: 
Patch installed in versions => 2.2.0.1507.
[17 Nov 2009 19:53] Enterprise Tools JIRA Robot
Keith Russell writes: 
Patch installed in versions => 2.1.1.1108.
[18 Nov 2009 5:52] Enterprise Tools JIRA Robot
Marcos Palacios writes: 
Verified fixed in Monitor build 2.1.1.1108.
[19 Nov 2009 11:18] Tony Bedford
An entry has been added to the 2.1.1 and 2.2.0 changelogs:

Support issues can have a Severity from S1 through S4, but can also have a value of “NS” meaning “No Severity Set”. MySQL Enterprise Monitor was not able to parse this, which resulted in errors such as the following:

2009-09-23 13:53:51,812 ERROR [em-worker-pool-thread-6:monitor.support.DevSpPoller] error
consuming successful response
java.lang.IllegalArgumentException: No enum const class
com.mysql.etools.monitor.support.SpIssue$Severity.NS
	at java.lang.Enum.valueOf(Enum.java:196)
...