From fc5ce57debed166529e11d331fec8f6fc2b7ecc4 Mon Sep 17 00:00:00 2001 From: Greg Price Date: Sun, 13 Jul 2008 08:57:03 -0400 Subject: [PATCH] multiplex conserver across hosts svn path=/trunk/packages/sipb-xen-console-server/; revision=672 --- debian/changelog | 6 ++++++ debian/control | 2 +- debian/control.in | 2 +- files/usr/sbin/sipb-xen-update-conserver | 10 +++++++++- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 26e041d..e02a594 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +sipb-xen-console-server (2.03) unstable; urgency=low + + * Multiplex consoles on multiple hosts. + + -- Greg Price 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 diff --git a/debian/control b/debian/control index 90478eb..dd64a57 100644 --- a/debian/control +++ b/debian/control @@ -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 diff --git a/debian/control.in b/debian/control.in index 4e4b0f7..85d1963 100644 --- a/debian/control.in +++ b/debian/control.in @@ -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 diff --git a/files/usr/sbin/sipb-xen-update-conserver b/files/usr/sbin/sipb-xen-update-conserver index 9201024..1d3580b 100755 --- a/files/usr/sbin/sipb-xen-update-conserver +++ b/files/usr/sbin/sipb-xen-update-conserver @@ -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]) -- 1.7.9.5