[one-users] Wrong actions when deleting vm

Nicolas AGIUS nicolas.agius at lps-it.fr
Fri Apr 6 02:08:06 PDT 2012


Hi,

Nope, "onevm shutdown" work fine. The problem is with "onevm delete" on a running vm.

Host is configured with vmm_xen and tm_ssh :

Fri Apr  6 11:05:14 2012 [DiM][D]: Finalizing VM 91
Fri Apr  6 11:05:14 2012 [VMM][D]: Message received: LOG I 91 Driver command for 91 cancelled
Fri Apr  6 11:05:14 2012 [ReM][D]: VirtualMachineInfo method invoked
Fri Apr  6 11:05:15 2012 [ReM][D]: HostPoolInfo method invoked
Fri Apr  6 11:05:15 2012 [ReM][D]: VirtualMachinePoolInfo method invoked
Fri Apr  6 11:05:15 2012 [ReM][D]: AclInfo method invoked
Fri Apr  6 11:05:15 2012 [TM][D]: Message received: LOG I 91 tm_delete.sh: Deleting /var/lib/one//91/images
Fri Apr  6 11:05:15 2012 [TM][D]: Message received: LOG I 91 tm_delete.sh: Executed "ssh xen0vburo01 rm -rf /var/lib/one//91/images".
Fri Apr  6 11:05:15 2012 [TM][D]: Message received: LOG I 91 ExitCode: 0
Fri Apr  6 11:05:15 2012 [TM][D]: Message received: TRANSFER SUCCESS 91 -
Fri Apr  6 11:05:15 2012 [HKM][D]: Message received: LOG I 91 ExitCode: 0
Fri Apr  6 11:05:20 2012 [VMM][D]: Message received: LOG I 91 cancel: Executed "sudo /usr/sbin/xm destroy one-91".
Fri Apr  6 11:05:20 2012 [VMM][D]: Message received: LOG I 91 ExitCode: 0
Fri Apr  6 11:05:20 2012 [VMM][D]: Message received: LOG I 91 Successfully execute virtualization driver operation: cancel.
Fri Apr  6 11:05:20 2012 [VMM][D]: Message received: LOG I 91 ExitCode: 0
Fri Apr  6 11:05:20 2012 [VMM][D]: Message received: LOG I 91 Successfully execute network driver operation: clean.
Fri Apr  6 11:05:20 2012 [VMM][D]: Message received: CANCEL SUCCESS 91 -

Nicolas AGIUS


--- En date de : Mer 4.4.12, Tino Vazquez <tinova79 at gmail.com> a écrit :

De: Tino Vazquez <tinova79 at gmail.com>
Objet: Re: [one-users] Wrong actions when deleting vm
À: nicolas.agius at lps-it.fr
Cc: users at lists.opennebula.org
Date: Mercredi 4 avril 2012, 11h44

Hi,
OpenNebula should wait for the VM to be shutdown before it removes the files. Did you use "onevm shutdown"? Can you send the complete log for the VM?
Regards,


-Tino
--
Constantino Vázquez Blanco, MSc | dsa-research.org/tinova
Virtualization Technology Engineer / Researcher


OpenNebula - The Open-Source Solution for Data Center Virtualization
www.OpenNebula.org | @tinova79 | @OpenNebula




On Tue, Apr 3, 2012 at 10:56 AM, Nicolas AGIUS <nicolas.agius at lps-it.fr> wrote:


Hi, 

I still have a bug when I try to delete a vm.

With no persistent disk image, OpenNebula is deleting the disks before it shutdown the vm. Using tm_lvm and phy: devices, the delete fail because it can't remove an open file.



Where is this action sequence in the source code ?

Thanks,
Nicolas AGIUS



--- En date de : Ven 23.3.12, Nicolas AGIUS <nicolas.agius at lps-it.fr> a écrit :



De: Nicolas AGIUS <nicolas.agius at lps-it.fr>
Objet: [one-users] Bug with delete action and persistent storage


À: users at lists.opennebula.org
Date: Vendredi 23 mars 2012, 18h26



Hi,
I found a small bug in OpenNebula v3.2.1.

When I try to delete a VM with a persistent image, the image switch in the ERROR state and the following trace appear in the log :

------
[ImM][I]: Moving disk /var/lib/one/64/disk.0 to repository image 15


[VMM][D]: Message received: LOG I 64 Driver command for 64 cancelled
[ImG][D]: Message received: LOG I 15 Command execution fail: /var/lib/one/remotes/image/fs/mv /var/lib/one/64/disk.0 /var/lib/one/images/5f4cc7519564396f02e99a59e5bd45c0 15 15


[ImM][I]: Command execution fail: /var/lib/one/remotes/image/fs/mv /var/lib/one/64/disk.0 /var/lib/one/images/5f4cc7519564396f02e99a59e5bd45c0 15 15
[ImG][D]: Message received: LOG I 15 mv: Moving local image /var/lib/one/64/disk.0 to the image repository


[ImM][I]: mv: Moving local image /var/lib/one/64/disk.0 to the image
 repository
[ImG][D]: Message received: LOG E 15 mv: Command "mv -f /var/lib/one/64/disk.0 /var/lib/one/images/5f4cc7519564396f02e99a59e5bd45c0" failed.
[ImM][E]: mv: Command "mv -f /var/lib/one/64/disk.0 /var/lib/one/images/5f4cc7519564396f02e99a59e5bd45c0" failed.


[ImG][D]: Message received: LOG E 15 mv: mv: cannot stat `/var/lib/one/64/disk.0': No such file or directory
[ImM][E]: mv: mv: cannot stat `/var/lib/one/64/disk.0': No such file or directory
[ImG][D]: Message received: LOG E 15 Could not move /var/lib/one/64/disk.0 to /var/lib/one/images/5f4cc7519564396f02e99a59e5bd45c0


[ImM][E]: Could not move /var/lib/one/64/disk.0 to /var/lib/one/images/5f4cc7519564396f02e99a59e5bd45c0
[ImG][D]: Message received: LOG I 15 ExitCode: 1
[ImM][I]: ExitCode: 1
[ImG][D]: Message received: MV FAILURE 15 Could not move /var/lib/one/64/disk.0 to /var/lib/one/images/5f4cc7519564396f02e99a59e5bd45c0


[ImM][E]: Error saving image to the
 repository: Could not move /var/lib/one/64/disk.0 to /var/lib/one/images/5f4cc7519564396f02e99a59e5bd45c0
--------

It seems that the delete action is doing the following steps :
 - Move image to the repo


 - Delete image on the host
 - Destroy the vm

But the image is not transferred and cause the error. I thinks steps should be :
 - Destroy the vm
 - Copy back the image from the host
 - Move image to the repo



 - Delete image on the host

I've tried to fix it,  but I got lost somewhere between C++ and Ruby...

Subsidiary question, why is the core written in C++ and not in Ruby ?

Thanks,
Nicolas AGIUS




-----La pièce jointe associée suit-----

_______________________________________________
Users mailing list
Users at lists.opennebula.org


http://lists.opennebula.org/listinfo.cgi/users-opennebula.org

_______________________________________________



Users mailing list

Users at lists.opennebula.org

http://lists.opennebula.org/listinfo.cgi/users-opennebula.org




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20120406/3c9763f9/attachment-0001.htm>


More information about the Users mailing list