Bug #27523 agent update on Windows does not wait long enough after stopping the agent
Submitted: 29 Mar 2007 12:52 Modified: 12 Apr 2007 13:29
Reporter: Carsten Segieth Email Updates:
Status: Closed Impact on me:
Category:MySQL Enterprise Monitor: Installing Severity:S2 (Serious)
Version: OS:Microsoft Windows (Windows)
Assigned to: BitRock Merlin CPU Architecture:Any
Tags: Agent, service

[29 Mar 2007 12:52] Carsten Segieth
During the agent update I often (but not always) see the message, that the mysql-service-agent.exe file could not be copied from .../patchtemp to the target dir.
In a GUI update one can click on 'RETRY' and often with the first retry the problem is solved - as the time for being surprised by the error and reading it seems to be enough for really stopping the service.

But in an unattended update install no 'RETRY' is performed, and so often the unattended update fails with a message like this:

Error copying file from C:/Programme/MySQL/MySQL Network 2.0/MySQL Network 2.0/patchtemp/mysql-service-agent.exe to C:/Programme/MySQL/MySQL Network 2.0/MySQL Network 2.0/mysql-service-agent.exe

And - the unattended install then quits with ERRORLEVEL = 0, so there is no way to check in a script for success or not.

How to repeat:
"mysqlserviceagent-"  --optionfile "options.agent.update.DEU.txt"  1>

content of "options.agent.update.DEU.txt":
installdir=C:\Programme\MySQL\MySQL Network 2.0\MySQL Network 2.0

Suggested fix:
1) wait until the 'SC STOP servicename>' (or whatever is used) command was successfull
2) use non-zero returncode in case of errors during unattended update
[5 Apr 2007 16:03] BitRock Merlin
Patch sent to Keith. Though still not addressing the issue of exit codes, this version waits longer enough for the agent to stop
[12 Apr 2007 0:36] Keith Russell
Reported as corrected in versions =>
[12 Apr 2007 13:29] Peter Lavin
Added to changelog.