svn path=/trunk/packages/invirt-remote/; revision=2113
+invirt-remote (0.3.4) unstable; urgency=low
+
+ * modified host/usr/sbin/invirt-availability and invirt-vmcontrol to stat
+ /etc/invirt/nocreate; if it exists, they advertise zero free memory and
+ refuse to create VMs
+
+ -- Peter A. Iannucci <iannucci@mit.edu> Sat, 14 Feb 2009 18:10:54 -0500
+
invirt-remote (0.3.3) unstable; urgency=low
* added remctl web availability to calculate memory available to new VMs
The numbers in /proc/xen/balloon have nice units
All math is done in kilobytes for consistency
Output is in MB
+
+ Bail if /etc/invirt/nocreate exists
"""
+ try:
+ os.stat('/etc/invirt/nocreate')
+ print 0
+ return 0
+ except OSError:
+ pass
+
p = Popen(['/usr/sbin/xm', 'info'], stdout=PIPE)
output = p.communicate()[0]
if p.returncode != 0:
;;
install|create)
shift; shift;
+ if [ -f "/etc/invirt/nocreate" ]; then
+ echo "Host $HOSTNAME is currently refusing VM creation." && exit 2
+ fi
xm list "$MACHINE" >/dev/null 2>/dev/null && echo "$MACHINE already exists" && exit 1
if [ "$ACTION" = "install" ]; then
xm create invirt-database machine_name="$ORIGMACHINE" installer_options="$(printf '%q ' "$@")"