debuggers.hg

changeset 21285:8559e324941f

Remus: remove obsolete code

Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
author Keir Fraser <keir.fraser@citrix.com>
date Tue May 04 09:31:13 2010 +0100 (2010-05-04)
parents 99a85cb72c9f
children 321dddf767e2
files tools/remus/remus
line diff
     1.1 --- a/tools/remus/remus	Tue May 04 09:30:53 2010 +0100
     1.2 +++ b/tools/remus/remus	Tue May 04 09:31:13 2010 +0100
     1.3 @@ -22,7 +22,6 @@ class Cfg(object):
     1.4          self.port = XendOptions.instance().get_xend_relocation_port()
     1.5          self.interval = 200
     1.6          self.netbuffer = True
     1.7 -        self.nobackup = False
     1.8          self.timer = False
     1.9  
    1.10          parser = optparse.OptionParser()
    1.11 @@ -36,10 +35,6 @@ class Cfg(object):
    1.12                            help='run without net buffering (benchmark option)')
    1.13          parser.add_option('', '--timer', dest='timer', action='store_true',
    1.14                            help='force pause at checkpoint interval (experimental)')
    1.15 -        parser.add_option('', '--no-backup', dest='nobackup',
    1.16 -                          action='store_true',
    1.17 -                          help='prevent backup from starting up (benchmark '
    1.18 -                          'option)')
    1.19          self.parser = parser
    1.20  
    1.21      def usage(self):
    1.22 @@ -106,20 +101,12 @@ class ReplicatedDisk(BufferedDevice):
    1.23      def __del__(self):
    1.24          self.uninstall()
    1.25  
    1.26 -    def setup(self):
    1.27 -        #self.ctlfd.write('buffer')
    1.28 -        #self.ctlfd.flush()
    1.29 -        self.installed = True
    1.30 -
    1.31      def uninstall(self):
    1.32          if self.ctlfd:
    1.33              self.ctlfd.close()
    1.34              self.ctlfd = None
    1.35  
    1.36      def postsuspend(self):
    1.37 -        if not self.installed:
    1.38 -            self.setup()
    1.39 -
    1.40          os.write(self.ctlfd.fileno(), 'flush')
    1.41  
    1.42      def commit(self):
    1.43 @@ -340,11 +327,6 @@ def run(cfg):
    1.44      for buf in bufs:
    1.45          buf.uninstall()
    1.46  
    1.47 -    if cfg.nobackup:
    1.48 -        # lame attempt to kill backup if protection is stopped deliberately.
    1.49 -        # It would be much better to move this into the heartbeat "protocol".
    1.50 -        print util.runcmd(['sudo', '-u', os.getlogin(), 'ssh', cfg.host, 'sudo', 'xm', 'destroy', dom.name])
    1.51 -
    1.52      sys.exit(rc)
    1.53  
    1.54  cfg = Cfg()