mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
bitkeeper revision 1.1533 (429379beNzrMmx_MJCmvdmLhK3EMfw)
migrate.py, params.py, SrvDaemon.py, xend, Makefile: Remove xfrd now that save/restore doesn't use xfrd anymore. console.py: Remove/disable debug output. .del-check_twisted~f74b05eb88f208a1: Delete: tools/check/check_twisted xend: Twisted is no longer used -- remove check whether it's installed or not. .del-Makefile~474b093f3e64d016: Delete: tools/xfrd/Makefile .del-xfrdClient.py~d1d33f981191dfa: Delete: tools/xfrd/xfrdClient.py .del-xfrd.h~54f8ea6e77cf4f26: Delete: tools/xfrd/xfrd.h .del-xfrd.c~e3be851c3a4297a5: Delete: tools/xfrd/xfrd.c .del-xen_domain.h~4a0c609ff18c63a8: Delete: tools/xfrd/xen_domain.h .del-xen_domain.c~cd85f330a909fbce: Delete: tools/xfrd/xen_domain.c .del-select.h~348b2b069dd5748: Delete: tools/xfrd/select.h .del-select.c~373282d5f920303d: Delete: tools/xfrd/select.c .del-marshal.h~9929a72563171372: Delete: tools/xfrd/marshal.h .del-marshal.c~3108fab658d2220: Delete: tools/xfrd/marshal.c .del-lzi_stream.h~49308e7b16ba42e3: Delete: tools/xfrd/lzi_stream.h .del-lzi_stream.c~e1870394f081f255: Delete: tools/xfrd/lzi_stream.c .del-debug.h~c268d8f144e5e4da: Delete: tools/xfrd/debug.h .del-connection.h~ac7cb6a42316a421: Delete: tools/xfrd/connection.h .del-connection.c~c025e96fc5649424: Delete: tools/xfrd/connection.c .del-Make.xfrd~5a18d2f63aad1d40: Delete: tools/xfrd/Make.xfrd Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
This commit is contained in:
1 parent
b9e6d0f2ed
commit
50f2601af9
25 files changed
+4
-3190
No files matched your search
@@ -128,21 +128,16 @@ class Daemon:
|
||||
def cleanup_xend(self, kill=False):
|
||||
return self.cleanup_process(XEND_PID_FILE, "xend", kill)
|
||||
|
||||
def cleanup_xfrd(self, kill=False):
|
||||
return self.cleanup_process(XFRD_PID_FILE, "xfrd", kill)
|
||||
|
||||
def cleanup(self, kill=False):
|
||||
self.cleanup_xend(kill=kill)
|
||||
self.cleanup_xfrd(kill=kill)
|
||||
|
||||
def status(self):
|
||||
"""Returns the status of the xend and xfrd daemons.
|
||||
"""Returns the status of the xend daemon.
|
||||
The return value is defined by the LSB:
|
||||
0 Running
|
||||
3 Not running
|
||||
"""
|
||||
if (self.cleanup_process(XEND_PID_FILE, "xend", False) == 0 or
|
||||
self.cleanup_process(XFRD_PID_FILE, "xfrd", False) == 0):
|
||||
if self.cleanup_process(XEND_PID_FILE, "xend", False) == 0:
|
||||
return 3
|
||||
else:
|
||||
return 0
|
||||
@@ -171,17 +166,6 @@ class Daemon:
|
||||
pidfile.close()
|
||||
return pid
|
||||
|
||||
def start_xfrd(self):
|
||||
"""Fork and exec xfrd, writing its pid to XFRD_PID_FILE.
|
||||
"""
|
||||
if self.fork_pid(XFRD_PID_FILE):
|
||||
# Parent
|
||||
pass
|
||||
else:
|
||||
# Child
|
||||
self.daemonize()
|
||||
os.execl("/usr/sbin/xfrd", "xfrd")
|
||||
|
||||
def daemonize(self):
|
||||
if not DAEMONIZE: return
|
||||
# Detach from TTY.
|
||||
@@ -212,15 +196,11 @@ class Daemon:
|
||||
4 Insufficient privileges
|
||||
"""
|
||||
xend_pid = self.cleanup_xend()
|
||||
xfrd_pid = self.cleanup_xfrd()
|
||||
|
||||
|
||||
if self.set_user():
|
||||
return 4
|
||||
os.chdir("/")
|
||||
|
||||
if xfrd_pid == 0:
|
||||
self.start_xfrd()
|
||||
if xend_pid > 0:
|
||||
# Trying to run an already-running service is a success.
|
||||
return 0
|
||||
|
||||
@@ -246,7 +246,6 @@ class ConsoleDev(Dev, protocol.ServerFactory):
|
||||
def disconnect(self, conn=None):
|
||||
"""Disconnect the TCP connection to the console.
|
||||
"""
|
||||
print 'ConsoleDev>disconnect>', conn
|
||||
try:
|
||||
self.lock.acquire()
|
||||
if conn and conn != self.conn: return
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# The following parameters could be placed in a configuration file.
|
||||
XEND_PID_FILE = '/var/run/xend.pid'
|
||||
XFRD_PID_FILE = '/var/run/xfrd.pid'
|
||||
XEND_TRACE_FILE = '/var/log/xend.trace'
|
||||
|
||||
XEND_USER = 'root'
|
||||
|
||||
@@ -14,8 +14,7 @@ DOM0_ID = '0'
|
||||
gopts = Opts(use="""[options] DOM HOST
|
||||
|
||||
Migrate domain DOM to host HOST.
|
||||
The transfer daemon xfrd must be running on the
|
||||
local host and on HOST.
|
||||
Xend must be running on the local host and on HOST.
|
||||
""")
|
||||
|
||||
gopts.opt('help', short='h',
|
||||
|
||||