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

Steven C Timm timm at fnal.gov
Sun Jan 6 15:21:41 PST 2013


Thanks for the information, Ruben.
One followup:


1)      Does anyone know the right configuration options for libvirtd.conf to make it so that it will log the commands it is receiving such as shutdown, stop, start, etc.  Up until now I haven't been able to get libvirtd to log these at any verbosity.


From: Ruben S. Montero [mailto:rsmontero at opennebula.org]
Sent: Sunday, January 06, 2013 4:24 PM
To: Steven C Timm
Cc: users at lists.opennebula.org
Subject: Re: [one-users] Race condition--onevm shutdown vs. onevm delete

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<tel: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/e0db5bdb2592065514ddda06ef52caf6fc7971f2,
  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<tel: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<tel:%28630%29%20840-8525>
timm at fnal.gov<mailto: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<mailto:Users at lists.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<http://www.OpenNebula.org> | rsmontero at opennebula.org<mailto:rsmontero at opennebula.org> | @OpenNebula
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20130106/8a7b2358/attachment-0002.htm>


More information about the Users mailing list