Index: trunk/packages/invirt-remote/server/usr/sbin/invirt-remote-lvm
===================================================================
--- trunk/packages/invirt-remote/server/usr/sbin/invirt-remote-lvm	(revision 2495)
+++ trunk/packages/invirt-remote/server/usr/sbin/invirt-remote-lvm	(revision 2495)
@@ -0,0 +1,24 @@
+#!/usr/bin/python
+
+"""
+Run an LVM command on one host, with failover for downed hosts.
+"""
+
+from invirt.remote import monocast
+import sys
+import os
+
+def main(argv):
+    # Query each of the hosts.
+    if(os.path.exists("/etc/invirt/nolvm")):
+        sys.stderr.write("LVM operations are temporarily disabled for maintenance, sorry.\n")
+        return 2
+    result = monocast(argv[1:])
+    #print "Hostname: %s; down=%s" % (result[0], result[1])
+    sys.stdout.write(result[3]) # stdout
+    sys.stderr.write(result[4]) # stderr
+
+if __name__ == '__main__':
+    sys.exit(main(sys.argv))
+
+# vim:et:sw=4:ts=4
Index: trunk/packages/invirt-remote/server/usr/sbin/invirt-remote-proxy
===================================================================
--- trunk/packages/invirt-remote/server/usr/sbin/invirt-remote-proxy	(revision 2473)
+++ trunk/packages/invirt-remote/server/usr/sbin/invirt-remote-proxy	(revision 2495)
@@ -1,4 +1,4 @@
-#!/bin/bash
-# invoke as invirt-remote-proxy-$TYPE, with "TYPE" in the remctl sense.
+#!/bin/bash                                                                                         
+# invoke as invirt-remote-proxy-$TYPE, with "TYPE" in the remctl sense.                             
 
 klist -s || kinit -k
@@ -7,12 +7,12 @@
 case "$TYPE" in
     control )
-	MACHINE="$1"; SERVICE="$2"; shift; shift ;;
+        MACHINE="$1"; SERVICE="$2"; shift; shift ;;
     * )
-	SERVICE="$1"; shift ;;
+        SERVICE="$1"; shift ;;
 esac
 
 case "$TYPE/$SERVICE" in
     web/listvms )
-	invirt-remote-listvms "$@" ;;
+        invirt-remote-listvms "$@" ;;
     web/vnccert )
         invirt-remote-vnccert "$@" ;;
@@ -20,9 +20,6 @@
         invirt-remote-availability "$@" ;;
     web/lvcreate | web/lvremove | web/lvrename | web/lvresize )
-        if [ -f "/etc/invirt/nolvm" ]; then
-            echo "LVM operations are temporarily disabled for maintenance, sorry." >&2
-            exit 2
-        fi
-        remctl "$(invirt-getconf hosts.0.hostname)" remote "$TYPE" "$SERVICE" "$@" ;;
+        invirt-remote-lvm "$SERVICE" "$@"
+        ;;
     control/help )
         invirt-remctl-help ;;
@@ -32,12 +29,12 @@
             exit 2
         fi
-	invirt-remote-create "$SERVICE" "$MACHINE" "$@" ;;
+        invirt-remote-create "$SERVICE" "$MACHINE" "$@" ;;
     control/listhost|control/list-host )
-	invirt-remote-listhost "$MACHINE" "$@" ;;
+        invirt-remote-listhost "$MACHINE" "$@" ;;
     control/* )
-	# Everything but create must go where the VM is already running.
-	invirt-remote-control "$MACHINE" "$SERVICE" "$@" ;;
+        # Everything but create must go where the VM is already running.
+        invirt-remote-control "$MACHINE" "$SERVICE" "$@" ;;
     * )
-        echo "ERROR: invalid subcommand"
+        echo "ERROR: invalid subcommand $TYPE/$SERVICE"
         exit 34
         ;;
