[one-users] Race condition--onevm shutdown vs. onevm delete

Ruben S. Montero rsmontero at opennebula.org
Sun Jan 6 14:23:55 PST 2013


Hi Steven


> and libvirtd dies with a segfault.
>
> The strange thing is--according to this template, there is
> nothing to save at all.  Why would it go into "epil" state at all?
>

The epilog state is also used to clean up the host, so even if nothing has
to be saved at all the VMs go through this state (e.g. to remove links, log
out from iSCSI sessions...).


>
> I am presuming that this condition can also exist in OpenNebula 3.x
> versions.  Is there any way to prevent it?


Yes it is there, and we are working in producing a synchronous delete
operation that waits for the cancel of the VM. The current suggested **work
around** is to introduce ad-hoc waiting times in the epilog scripts
to accommodate the cancel operation. This can be easily added to the epilog
scripts.



> As it is, a determined
> user by doing onevm shutdown/onevm delete can crash my whole set
> of VM hosts if he wants to.  A similar race condition can
> exist with onevm stop / onevm delete.
>

Apart from doing a synchronous request we are also evaluating moving the
DELETE operation to the ADMIN set. So only oneadmin and oneadmin group are
granted permissions to delete a VM. Regular users will still have CANCEL to
get rid of running VMs...

Thanks for the feedback!

Ruben


> Steve Timm
>
>
>
>
> [oneadmin at fcl002 one]$ onevm show 3823
> VIRTUAL MACHINE 3823 INFORMATION
> ID             : 3823
> NAME           : gums-5
> STATE          : DONE
> LCM_STATE      : LCM_INIT
> START TIME     : 01/03 14:12:57
> END TIME       : 01/04 07:20:44
> DEPLOY ID:     : one-3823
>
> VIRTUAL MACHINE MONITORING
> NET_TX         : 0
> USED CPU       : 0
> USED MEMORY    : 2097152
> NET_RX         : 0
>
> VIRTUAL MACHINE TEMPLATE
> CONTEXT=[
>   FILES=/cloud/images/**OpenNebula/templates/init.sh /cloud/login/weigand/
> **OpenNebula/k5login,
>   GATEWAY=131.225.154.1,
>   IP_PUBLIC=131.225.154.44,
>   NETMASK=255.255.254.0,
>   NS=131.225.8.120,
>   ROOT_PUBKEY=id_dsa.pub,
>   TARGET=hdc,
>   USERNAME=opennebula,
>   USER_PUBKEY=id_dsa.pub ]
> DISK=[
>   BUS=virtio,
>   CLONE=YES,
>   DISK_ID=0,
>   IMAGE=SLF 5 Base,
>   IMAGE_ID=159,
>   READONLY=NO,
>   SAVE=NO,
>   SOURCE=/var/lib/one/image-**repo/**e0db5bdb2592065514ddda06ef52ca**
> f6fc7971f2,
>   TARGET=vda,
>   TYPE=DISK ]
> DISK=[
>   DISK_ID=1,
>   SIZE=4096,
>   TARGET=vdb,
>   TYPE=swap ]
> FEATURES=[
>   ACPI=yes ]
> GRAPHICS=[
>   AUTOPORT=yes,
>   KEYMAP=en-us,
>   LISTEN=127.0.0.1,
>   PORT=-1,
>   TYPE=vnc ]
> MEMORY=2048
> NAME=gums-5
> NIC=[
>   BRIDGE=br0,
>   IP=131.225.154.44,
>   MAC=54:52:00:02:13:00,
>   MODEL=virtio,
>   NETWORK=FermiCloud,
>   NETWORK_ID=2 ]
> PUBLIC=YES
> RANK=FREEMEMORY
> REQUIREMENTS=HYPERVISOR="kvm"
> VCPU=1
> VMID=3823
> [oneadmin at f
>
>
> ------------------------------**------------------------------**------
> Steven C. Timm, Ph.D  (630) 840-8525
> timm at fnal.gov  http://home.fnal.gov/~timm/
> Fermilab Computing Division, Scientific Computing Facilities,
> Grid Facilities Department, FermiGrid Services Group, Group Leader.
> Lead of FermiCloud project.
> ______________________________**_________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/**listinfo.cgi/users-opennebula.**org<http://lists.opennebula.org/listinfo.cgi/users-opennebula.org>
>



-- 
Ruben S. Montero, PhD
Project co-Lead and Chief Architect
OpenNebula - The Open Source Solution for Data Center Virtualization
www.OpenNebula.org | rsmontero at opennebula.org | @OpenNebula
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20130106/adc4c82b/attachment-0002.htm>


More information about the Users mailing list