multiplex conserver across hosts
authorGreg Price <price@mit.edu>
Sun, 13 Jul 2008 12:57:03 +0000 (08:57 -0400)
committerGreg Price <price@mit.edu>
Sun, 13 Jul 2008 12:57:03 +0000 (08:57 -0400)
svn path=/trunk/packages/sipb-xen-console-server/; revision=672

debian/changelog
debian/control
debian/control.in
files/usr/sbin/sipb-xen-update-conserver

index 26e041d..e02a594 100644 (file)
@@ -1,3 +1,9 @@
+sipb-xen-console-server (2.03) unstable; urgency=low
+
+  * Multiplex consoles on multiple hosts.
+
+ -- Greg Price <price@mit.edu>  Sun, 13 Jul 2008 08:35:17 -0400
+
 sipb-xen-console-server (2.02) unstable; urgency=low
 
   * And...xm isn't in the path, so give a full path
index 90478eb..dd64a57 100644 (file)
@@ -9,6 +9,6 @@ Package: sipb-xen-console-server
 Architecture: all
 Provides: ${diverted-files}
 Conflicts: ${diverted-files}
-Depends: ${shlibs:Depends}, ${misc:Depends}, conserver-server
+Depends: ${shlibs:Depends}, ${misc:Depends}, conserver-server, remctl-client
 Description: SIPB Xen serial console server server
   This configures the VMM for the server-side of the console server
index 4e4b0f7..85d1963 100644 (file)
@@ -9,6 +9,6 @@ Package: sipb-xen-console-server
 Architecture: all
 Provides: ${diverted-files}
 Conflicts: ${diverted-files}
-Depends: ${shlibs:Depends}, ${misc:Depends}, conserver-server
+Depends: ${shlibs:Depends}, ${misc:Depends}, conserver-server, remctl-client
 Description: SIPB Xen serial console server server
   This configures the VMM for the server-side of the console server
\ No newline at end of file
index 9201024..1d3580b 100755 (executable)
@@ -3,6 +3,7 @@
 import sipb_xen_database
 import subprocess
 import os
+import socket
 
 sipb_xen_database.connect('postgres://sipb-xen@sipb-xen-dev.mit.edu/sipb_xen')
 
@@ -18,7 +19,14 @@ def reload_conserver():
     p.wait()
 
 if __name__ == '__main__':
+    hostname = socket.getfqdn().lower()
+    config = '\n'.join('console %s { master %s; }' % (vm, hostname)
+                       for vm in live_vms())
     f = open('/etc/conserver/sipb-xen-consoles.cf', 'w')
-    f.write('\n'.join('console %s {}' % vm for vm in live_vms()))
+    f.write(config)
     f.close()
     reload_conserver()
+    subprocess.call(['/usr/bin/kinit', '-k', '-t', '/etc/krb5.keytab',
+                     'host/'+hostname+'@ATHENA.MIT.EDU'])
+    subprocess.call(['/usr/bin/remctl', 'sipb-xen-console.mit.edu',
+                     'console', 'update', config])