Bug #42983 Error message is misleading when deleting an agent/server
Submitted: 18 Feb 2009 18:26 Modified: 21 Jul 2009 12:59
Reporter: Leandro Morgado Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Configuration Severity:S4 (Feature request)
Version:2.0.4.7141 OS:Any
Assigned to: Sloan Childers CPU Architecture:Any

[18 Feb 2009 18:26] Leandro Morgado
Description:
MEM dashboard only allows you to delete agents/servers if they are stopped (in Settings > Manage Servers). However, if the dashboard is not refreshed and the agent is started meanwhile, you will receive an error saying that the agent is running. This can be confusing to the end user as the dashboard says the agent is stopped but the delete operation error message says it's running. See attached screenshot of the error.

How to repeat:
1) Stop the agent

2) Go to Settings > Manage Servers in the dashboard

3) Make sure auto-refresh is off in the dashboard

4) Start the agent again

5) Try to delete the agent in the dashboard

6) You will see the attached error message

Suggested fix:
Add a more suggestive message saying something like:

"You are trying to delete a running instance which has recently been [re]started. While the instance is running you can not delete it.
If you wish to continue please stop the agent on the server where it is running, wait for the dashboard to recognise this condition and then try again."

Having the agent's uptime would also be beneficial since it would give a clear picture that the agent has just been started.
[18 Feb 2009 18:31] Leandro Morgado
error screenshot

Attachment: error.png (image/png, text), 131.91 KiB.

[10 Jun 2009 21:11] Sloan Childers
Although confusing if this race condition exists, I'm not sure what we can do about it without moving to a different UI model.  Possibly AJAX so things refresh by themselves.

The error message (Server \"{0}\" is actively being monitored and cannot be deleted.) is pretty straight forward.  If I saw something in a web application that wasn't in the state I think it should be in my first reflex is usually to refresh the page.

Would you propose adding "Please refresh your web UI to make sure the agent is really not running." to this error message?  Seems like a use case that won't happen very often (and hasn't in years).
[10 Jun 2009 21:28] Sloan Childers
Should have added that I am looking into adding the last contact time to the error message.
[10 Jun 2009 23:32] Sloan Childers
Changed the error message as follows:  

Server \"{0}\" is actively being monitored and cannot be deleted.  The last agent contact for this server was on {1}.

Where {0} is the managed server name and {1} is the last date/time the corresponding MEM agent pinged into the MEM server.
[15 Jun 2009 16:30] Leandro Morgado
Sloan, I think your solution is fine. Adding the host and last contact time will make things clearer.
[15 Jun 2009 22:32] Keith Russell
Patch installed in versions => 2.1.0.1062.
[16 Jun 2009 16:01] Marcos Palacios
Verified fixed in Monitor build 2.1.0.1062 according to previous comments.
[21 Jul 2009 12:59] Tony Bedford
An entry was added to the 2.1.0 changelog:

In the Enterprise Dashboard it is only possible to delete monitored servers if they are stopped. Monitored servers can be deleted in Settings, Manage Servers. However, if after stopping the Agent, the Dashboard was not refreshed and the agent was started again, an error was generated saying that the agent was running and could therefore not be deleted. Although correct, this was confusing as the Dashboard showed the Agent as stopped but the delete operation error message showed the Agent as running.