http://bugs.winehq.org/show_bug.cgi?id=35946
Bug ID: 35946 Summary: Cannot mark a VM for maintenance if it is running a task Product: Wine-Testbot Version: unspecified Hardware: x86 OS: Linux Status: NEW Severity: normal Priority: P2 Component: unknown Assignee: wine-bugs@winehq.org Reporter: fgouget@codeweavers.com
To mark a VM for maintenance one sets its status to 'maintenance'. The problem is that when a VM runs a task its status is 'running' and once its done the task script blindly sets its status to 'dirty' hence overwriting the 'maintenance' status.
Note that even setting the VM role to 'retired' does not work although the task script does not explicitly change it. It seems like the whole VM's row gets rewritten when the the task script saves the new status.
So the task script should refresh its view of the VM status and check that it's still 'running' before changing it. That still leaves open a small window for races but that's probably acceptable.
The same problem exists in the RevrtVM.pl script with the 'reverting' and 'sleeping' states.
http://bugs.winehq.org/show_bug.cgi?id=35946
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #1 from François Gouget fgouget@codeweavers.com --- This got fixed by the following commit:
commit b1653d3e85f37e711be0e5232e81f063c0d8c7df Author: Francois Gouget fgouget@codeweavers.com Date: Fri Jul 25 11:23:53 2014 +0200
testbot: Don't let the scripts blindly overwrite the VM status.
This makes it possible for the administrator to step in and mark a VM for maintenance while a script is using it.
https://bugs.winehq.org/show_bug.cgi?id=35946
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #2 from Bruno Jesus 00cpxxx@gmail.com --- Closing other products fixed bugs.