Submitted by sfatula on Fri, 03/15/2013 - 18:13
I have noticed that using the Cloudmin menu option Shutdown System simply does a KVM shutdown, it does not execute the normal shutdown sequence on the virtual host itself. This has caused some MySQL corruption for us. I had seen that it shuts down in a second or two, seemed too fast, so, looked in the /var/log directory on the Vm and sure enough, not shut down normally.
So, I guess I need to log into each VM and execute shutdown -h now, however, shouldn't Cloudmin do this?
Status:
Closed (fixed)
Comments
Submitted by JamieCameron on Fri, 03/15/2013 - 18:23 Comment #1
Yes, Cloudmin should do this, if it can.
Before you shut down the VM, what state is it shown as on the left menu? It has to be something like "SSH" or "Webmin" for Cloudmin to be able to login and perform a clean shutdown.
Submitted by sfatula on Fri, 03/15/2013 - 18:24 Comment #2
It shows status "VIrtualmin" in green.
Submitted by JamieCameron on Fri, 03/15/2013 - 18:43 Comment #3
Ok .. and when you perform the shutdown in Cloudmin, did you have the "Force immediate termination" box checked? If so, that will bypass the clean shutdown.
Also, which Linux distribution and version is on the VM?
Submitted by sfatula on Fri, 03/15/2013 - 18:44 Comment #4
Same, Centos 6.3, current.
Submitted by JamieCameron on Fri, 03/15/2013 - 19:30 Comment #5
I had a look at the code, and found that Cloudmin uses the command
poweroff -f
to shut down the VM.If you run that manually, does it perform an immediate shutdown?
Submitted by sfatula on Fri, 03/15/2013 - 19:45 Comment #6
Yes, executing that command on the VM does in fact kill it immediately. Which is much different than a shutdown -h now which DOES execute the rc scripts to shut things down properly.
Submitted by JamieCameron on Sat, 03/16/2013 - 01:03 Comment #7
Ok, it looks like the
-f
flag to poweroff is a mistake - it causes the clean shutdown process to be skipped. I will remove this in the next Cloudmin release.Submitted by sfatula on Sat, 03/16/2013 - 01:09 Comment #8
Actually, that's fine (-f) if the user checks the box that says "Force Immediate Termination". Which of course I am not!
Submitted by JamieCameron on Sat, 03/16/2013 - 01:32 Comment #9
The force option is even more brutal - it just kills the KVM process, which is the equivalent of pulling the plug on a physical machine. I only recommend using that if the VM is totally hung.
Submitted by sfatula on Sat, 03/16/2013 - 01:33 Comment #10
I agree, just saying the code should still support -f if you check that box. Assuming you keep the box. If you do not check the box, which should (almost) always be the case, yes, please remove -f.
Submitted by Issues on Mon, 04/01/2013 - 00:47 Comment #11
Automatically closed -- issue fixed for 2 weeks with no activity.