Skip to contentSkip to conversation

remus: remove old remus script

PATCH In review Yang Hongyang 4 participants 11 messages Jun 25, 2014 – Jul 3, 2014

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/4 remus: remove old remus script

Since xend already deleted, the old remus script which based on xend no longer functional, remove it.

---
 tools/remus/Makefile |  15 ----
 tools/remus/remus    | 230 ---------------------------------------------------
 2 files changed, 245 deletions(-)
 delete mode 100644 tools/remus/Makefile
 delete mode 100644 tools/remus/remus
tools/remus/Makefile deleted +0 -15
deleted file mode 100644
index ae82376..0000000
@@ -1,15 +0,0 @@
-XEN_ROOT=$(CURDIR)/../..
-include $(XEN_ROOT)/tools/Rules.mk
-
-SCRIPTS = remus
-
-.PHONY: all
-all: subdirs-all
-
-.PHONY: install
-install: subdirs-install
-	$(INSTALL_DIR) $(DESTDIR)$(BINDIR)
-	$(INSTALL_PYTHON_PROG) $(SCRIPTS) $(DESTDIR)$(BINDIR)
-
-.PHONY: clean
-clean: subdirs-clean
tools/remus/remus deleted +0 -230

230 lines not on this page · raw message

Signature · 1 line
1.9.1
#1 lore raw

PATCH v2 2/4 remus: move remus README to docs directory

We do not need a separate directory to store remus README, just move it to docs/ directory.

---
 docs/README.remus  | 4 ++++
 tools/remus/README | 4 ----
 2 files changed, 4 insertions(+), 4 deletions(-)
 create mode 100644 docs/README.remus
 delete mode 100644 tools/remus/README
docs/README.remus new file +4 -0
new file mode 100644
index 0000000..9e8140b
@@ -0,0 +1,4 @@
+Remus provides fault tolerance for virtual machines by sending continuous
+checkpoints to a backup, which will activate if the target VM fails.
+
+See the website at http://nss.cs.ubc.ca/remus/ for details.
tools/remus/README deleted +0 -4
deleted file mode 100644
index 9e8140b..0000000
@@ -1,4 +0,0 @@
-Remus provides fault tolerance for virtual machines by sending continuous
-checkpoints to a backup, which will activate if the target VM fails.
-
-See the website at http://nss.cs.ubc.ca/remus/ for details.
Signature · 1 line
1.9.1
Acked-by on v2 2/4
#2 lore raw

Re: [PATCH v2 2/4] remus: move remus README to docs directory

Quoted 33 lines · Yang Hongyang

We do not need a separate directory to store remus README, just move it to docs/ directory.

---
 docs/README.remus  | 4 ++++
 tools/remus/README | 4 ----
 2 files changed, 4 insertions(+), 4 deletions(-)
 create mode 100644 docs/README.remus
 delete mode 100644 tools/remus/README
docs/README.remus new file +4 -0
new file mode 100644
index 0000000..9e8140b
@@ -0,0 +1,4 @@
+Remus provides fault tolerance for virtual machines by sending continuous
+checkpoints to a backup, which will activate if the target VM fails.
+
+See the website at http://nss.cs.ubc.ca/remus/ for details.
tools/remus/README deleted +0 -5
deleted file mode 100644
index 9e8140b..0000000
@@ -1,4 +0,0 @@
-Remus provides fault tolerance for virtual machines by sending continuous
-checkpoints to a backup, which will activate if the target VM fails.
-
-See the website at http://nss.cs.ubc.ca/remus/ for details.
--
Quoted 2 lines

1.9.1

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

Acked-by on v2 2/4
#3 lore raw

Re: [PATCH v2 2/4] remus: move remus README to docs directory

In reply to Yang Hongyang

Yang Hongyang writes ("[PATCH v2 2/4] remus: move remus README to docs directory"):

Quoted 2 lines

We do not need a separate directory to store remus README, just move it to docs/ directory.

I acked v1 but this is good too.

#4 lore raw

PATCH v2 3/4 remus: add wikipage link to remus README

In reply to Yang Hongyang

http://nss.cs.ubc.ca/remus/ does not exists, replace it with Remus wikipage.

---
 docs/README.remus | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
docs/README.remus +1 -1
index 9e8140b..9fa00fe 100644
@@ -1,4 +1,4 @@
 Remus provides fault tolerance for virtual machines by sending continuous
 checkpoints to a backup, which will activate if the target VM fails.
 
-See the website at http://nss.cs.ubc.ca/remus/ for details.
+See the website at http://wiki.xen.org/wiki/Remus for details.
Signature · 1 line
1.9.1
Acked-by on v2 3/4
#5 lore raw

Re: [PATCH v2 3/4] remus: add wikipage link to remus README

Quoted 20 lines · Yang Hongyang

http://nss.cs.ubc.ca/remus/ does not exists, replace it with Remus wikipage.

---
 docs/README.remus | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
docs/README.remus +1 -2
index 9e8140b..9fa00fe 100644
@@ -1,4 +1,4 @@
 Remus provides fault tolerance for virtual machines by sending continuous
 checkpoints to a backup, which will activate if the target VM fails.
 
-See the website at http://nss.cs.ubc.ca/remus/ for details.
+See the website at http://wiki.xen.org/wiki/Remus for details.
--
Quoted 2 lines

1.9.1

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#6 lore raw

PATCH v2 4/4 MAINTAINERS: Update maintained files of REMUS part

In reply to Yang Hongyang

delete tools/remus and add docs/README.remus

---
 MAINTAINERS | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
MAINTAINERS +1 -1
index 1865a84..ae5d7b3 100644
@@ -258,7 +258,7 @@ T:	git git://xenbits.xen.org/qemu-upstream-*.git
 REMUS
 M:	Shriram Rajagopalan <[email protected]>
 S:	Maintained
-F:	tools/remus/
+F:	docs/README.remus
 F:	tools/blktap2/drivers/block-remus.c
 F:	tools/blktap2/drivers/hashtable*
 
Signature · 1 line
1.9.1
Acked-by on v2 4/4
#7 lore raw

Re: [PATCH v2 4/4] MAINTAINERS: Update maintained files of REMUS part

Quoted 22 lines · Yang Hongyang

delete tools/remus and add docs/README.remus

---
 MAINTAINERS | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
MAINTAINERS +1 -2
index 1865a84..ae5d7b3 100644
@@ -258,7 +258,7 @@ T:  git git://xenbits.xen.org/qemu-upstream-*.git
 REMUS
 M:     Shriram Rajagopalan <[email protected]>
 S:     Maintained
-F:     tools/remus/
+F:     docs/README.remus
 F:     tools/blktap2/drivers/block-remus.c
 F:     tools/blktap2/drivers/hashtable*
 
--
Quoted 2 lines

1.9.1

Sorry missed this.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#8 lore raw
In reply to Yang Hongyang

Hi Ian,

Just to confirm that will you apply this patch series first, if so, I
shall rebase my other patchs on top of this.

Quoted 270 lines · Yang Hongyang

Since xend already deleted, the old remus script which based on xend no longer functional, remove it.

---
  tools/remus/Makefile |  15 ----
  tools/remus/remus    | 230 ---------------------------------------------------
  2 files changed, 245 deletions(-)

delete mode 100644 tools/remus/Makefile
delete mode 100644 tools/remus/remus

tools/remus/Makefile deleted +0 -15
deleted file mode 100644
index ae82376..0000000
@@ -1,15 +0,0 @@
-XEN_ROOT=$(CURDIR)/../..
-include $(XEN_ROOT)/tools/Rules.mk
-
-SCRIPTS = remus
-
-.PHONY: all
-all: subdirs-all
-
-.PHONY: install
-install: subdirs-install
-	$(INSTALL_DIR) $(DESTDIR)$(BINDIR)
-	$(INSTALL_PYTHON_PROG) $(SCRIPTS) $(DESTDIR)$(BINDIR)
-
-.PHONY: clean
-clean: subdirs-clean
tools/remus/remus deleted +0 -230
deleted file mode 100644
index 38f0365..0000000
@@ -1,230 +0,0 @@
-#!/usr/bin/env python
-#
-# This is a save process which also buffers outgoing I/O between
-# rounds, so that external viewers never see anything that hasn't
-# been committed at the backup
-#
-# TODO: fencing.
-
-import optparse, os, re, select, signal, sys, time
-
-from xen.remus import save, util, vm
-from xen.remus.device import ReplicatedDisk, ReplicatedDiskException
-from xen.remus.device import BufferedNIC, BufferedNICException
-from xen.xend import XendOptions
-
-class CfgException(Exception): pass
-
-class Cfg(object):
-
-    REMUS_FLAGS_COMPRESSION = 1
-
-    def __init__(self):
-        # must be set
-        self.domid = 0
-
-        self.host = 'localhost'
-        self.nullremus = False
-        self.port = XendOptions.instance().get_xend_relocation_port()
-        self.interval = 200
-        self.netbuffer = True
-        self.flags = self.REMUS_FLAGS_COMPRESSION
-        self.timer = False
-
-        parser = optparse.OptionParser()
-        parser.usage = '%prog [options] domain [destination]'
-        parser.add_option('-i', '--interval', dest='interval', type='int',
-                          metavar='MS',
-                          help='checkpoint every MS milliseconds')
-        parser.add_option('-p', '--port', dest='port', type='int',
-                          help='send stream to port PORT', metavar='PORT')
-        parser.add_option('', '--blackhole', dest='nullremus', action='store_true',
-                          help='replicate to /dev/null (no disk checkpoints, only memory & net buffering)')
-        parser.add_option('', '--no-net', dest='nonet', action='store_true',
-                          help='run without net buffering (benchmark option)')
-        parser.add_option('', '--no-compression', dest='nocompress', action='store_true',
-                          help='run without checkpoint compression')
-        parser.add_option('', '--timer', dest='timer', action='store_true',
-                          help='force pause at checkpoint interval (experimental)')
-        self.parser = parser
-
-    def usage(self):
-        self.parser.print_help()
-
-    def getargs(self):
-        opts, args = self.parser.parse_args()
-
-        if opts.interval:
-            self.interval = opts.interval
-        if opts.port:
-            self.port = opts.port
-        if opts.nullremus:
-            self.nullremus = True
-        if opts.nonet:
-            self.netbuffer = False
-        if opts.nocompress:
-            self.flags &= ~self.REMUS_FLAGS_COMPRESSION
-        if opts.timer:
-            self.timer = True
-
-        if not args:
-            raise CfgException('Missing domain')
-        self.domid = args[0]
-        if (len(args) > 1):
-            self.host = args[1]
-
-class SignalException(Exception): pass
-
-def run(cfg):
-    closure = lambda: None
-    closure.cmd = None
-
-    def sigexception(signo, frame):
-        raise SignalException(signo)
-
-    def die():
-        # I am not sure what the best way to die is. xm destroy is another option,
-        # or we could attempt to trigger some instant reboot.
-        print "dying..."
-        print util.runcmd(['sudo', 'ifdown', 'eth2'])
-        # dangling imq0 handle on vif locks up the system
-        for buf in bufs:
-            buf.uninstall()
-        print util.runcmd(['sudo', 'xm', 'destroy', cfg.domid])
-        print util.runcmd(['sudo', 'ifup', 'eth2'])
-
-    def getcommand():
-        """Get a command to execute while running.
-        Commands include:
-          s: die prior to postsuspend hook
-          s2: die after postsuspend hook
-          r: die prior to preresume hook
-          r2: die after preresume hook
-          c: die prior to commit hook
-          c2: die after commit hook
-          """
-        r, w, x = select.select([sys.stdin], [], [], 0)
-        if sys.stdin not in r:
-            return
-
-        cmd = sys.stdin.readline().strip()
-        if cmd not in ('s', 's2', 'r', 'r2', 'c', 'c2'):
-            print "unknown command: %s" % cmd
-        closure.cmd = cmd
-
-    signal.signal(signal.SIGTERM, sigexception)
-
-    dom = vm.VM(cfg.domid)
-
-    # set up I/O buffers
-    bufs = []
-
-    # disks must commit before network can be released
-    if not cfg.nullremus:
-        for disk in dom.disks:
-            try:
-                bufs.append(ReplicatedDisk(disk))
-            except ReplicatedDiskException, e:
-                print e
-                continue
-
-    if cfg.netbuffer:
-        for vif in dom.vifs:
-            bufs.append(BufferedNIC(vif))
-
-    if cfg.nullremus:
-        fd = save.NullSocket((cfg.host, cfg.port))
-    else:
-        fd = save.MigrationSocket((cfg.host, cfg.port))
-
-    def postsuspend():
-        'Begin external checkpointing after domain has paused'
-        if not cfg.timer:
-            # when not using a timer thread, sleep until now + interval
-            closure.starttime = time.time()
-
-        if closure.cmd == 's':
-            die()
-
-        for buf in bufs:
-            buf.postsuspend()
-
-        if closure.cmd == 's2':
-            die()
-
-    def preresume():
-        'Complete external checkpointing before domain resumes'
-        if closure.cmd == 'r':
-            die()
-
-        for buf in bufs:
-            buf.preresume()
-
-        if closure.cmd == 'r2':
-            die()
-
-    def commit():
-        'commit network buffer'
-        if closure.cmd == 'c':
-            die()
-
-        print >> sys.stderr, "PROF: flushed memory at %0.6f" % (time.time())
-
-        for buf in bufs:
-            buf.commit()
-
-        if closure.cmd == 'c2':
-            die()
-
-        # Since the domain is running at this point, it's a good time to
-        # check for control channel commands
-        getcommand()
-
-        if not cfg.timer:
-            endtime = time.time()
-            elapsed = (endtime - closure.starttime) * 1000
-
-            if elapsed < cfg.interval:
-                time.sleep((cfg.interval - elapsed) / 1000.0)
-
-        # False ends checkpointing
-        return True
-
-    if cfg.timer:
-        interval = cfg.interval
-    else:
-        interval = 0
-
-    rc = 0
-
-    checkpointer = save.Saver(cfg.domid, fd, postsuspend, preresume, commit,
-                              interval, cfg.flags)
-
-    try:
-        checkpointer.start()
-    except save.CheckpointError, e:
-        print e
-        rc = 1
-    except KeyboardInterrupt:
-        pass
-    except SignalException:
-        print '*** signalled ***'
-
-    for buf in bufs:
-        buf.uninstall()
-
-    sys.exit(rc)
-
-cfg = Cfg()
-try:
-    cfg.getargs()
-except CfgException, inst:
-    print str(inst)
-    cfg.usage()
-    sys.exit(1)
-
-try:
-    run(cfg)
-except vm.VMException, inst:
-    print str(inst)
-    sys.exit(1)
Signature · 2 lines
Thanks,
Yang.
#9 lore raw
In reply to Yang Hongyang

Ping!

Quoted 270 lines · Yang Hongyang

Since xend already deleted, the old remus script which based on xend no longer functional, remove it.

---
  tools/remus/Makefile |  15 ----
  tools/remus/remus    | 230 ---------------------------------------------------
  2 files changed, 245 deletions(-)

delete mode 100644 tools/remus/Makefile
delete mode 100644 tools/remus/remus

tools/remus/Makefile deleted +0 -15
deleted file mode 100644
index ae82376..0000000
@@ -1,15 +0,0 @@
-XEN_ROOT=$(CURDIR)/../..
-include $(XEN_ROOT)/tools/Rules.mk
-
-SCRIPTS = remus
-
-.PHONY: all
-all: subdirs-all
-
-.PHONY: install
-install: subdirs-install
-	$(INSTALL_DIR) $(DESTDIR)$(BINDIR)
-	$(INSTALL_PYTHON_PROG) $(SCRIPTS) $(DESTDIR)$(BINDIR)
-
-.PHONY: clean
-clean: subdirs-clean
tools/remus/remus deleted +0 -230
deleted file mode 100644
index 38f0365..0000000
@@ -1,230 +0,0 @@
-#!/usr/bin/env python
-#
-# This is a save process which also buffers outgoing I/O between
-# rounds, so that external viewers never see anything that hasn't
-# been committed at the backup
-#
-# TODO: fencing.
-
-import optparse, os, re, select, signal, sys, time
-
-from xen.remus import save, util, vm
-from xen.remus.device import ReplicatedDisk, ReplicatedDiskException
-from xen.remus.device import BufferedNIC, BufferedNICException
-from xen.xend import XendOptions
-
-class CfgException(Exception): pass
-
-class Cfg(object):
-
-    REMUS_FLAGS_COMPRESSION = 1
-
-    def __init__(self):
-        # must be set
-        self.domid = 0
-
-        self.host = 'localhost'
-        self.nullremus = False
-        self.port = XendOptions.instance().get_xend_relocation_port()
-        self.interval = 200
-        self.netbuffer = True
-        self.flags = self.REMUS_FLAGS_COMPRESSION
-        self.timer = False
-
-        parser = optparse.OptionParser()
-        parser.usage = '%prog [options] domain [destination]'
-        parser.add_option('-i', '--interval', dest='interval', type='int',
-                          metavar='MS',
-                          help='checkpoint every MS milliseconds')
-        parser.add_option('-p', '--port', dest='port', type='int',
-                          help='send stream to port PORT', metavar='PORT')
-        parser.add_option('', '--blackhole', dest='nullremus', action='store_true',
-                          help='replicate to /dev/null (no disk checkpoints, only memory & net buffering)')
-        parser.add_option('', '--no-net', dest='nonet', action='store_true',
-                          help='run without net buffering (benchmark option)')
-        parser.add_option('', '--no-compression', dest='nocompress', action='store_true',
-                          help='run without checkpoint compression')
-        parser.add_option('', '--timer', dest='timer', action='store_true',
-                          help='force pause at checkpoint interval (experimental)')
-        self.parser = parser
-
-    def usage(self):
-        self.parser.print_help()
-
-    def getargs(self):
-        opts, args = self.parser.parse_args()
-
-        if opts.interval:
-            self.interval = opts.interval
-        if opts.port:
-            self.port = opts.port
-        if opts.nullremus:
-            self.nullremus = True
-        if opts.nonet:
-            self.netbuffer = False
-        if opts.nocompress:
-            self.flags &= ~self.REMUS_FLAGS_COMPRESSION
-        if opts.timer:
-            self.timer = True
-
-        if not args:
-            raise CfgException('Missing domain')
-        self.domid = args[0]
-        if (len(args) > 1):
-            self.host = args[1]
-
-class SignalException(Exception): pass
-
-def run(cfg):
-    closure = lambda: None
-    closure.cmd = None
-
-    def sigexception(signo, frame):
-        raise SignalException(signo)
-
-    def die():
-        # I am not sure what the best way to die is. xm destroy is another option,
-        # or we could attempt to trigger some instant reboot.
-        print "dying..."
-        print util.runcmd(['sudo', 'ifdown', 'eth2'])
-        # dangling imq0 handle on vif locks up the system
-        for buf in bufs:
-            buf.uninstall()
-        print util.runcmd(['sudo', 'xm', 'destroy', cfg.domid])
-        print util.runcmd(['sudo', 'ifup', 'eth2'])
-
-    def getcommand():
-        """Get a command to execute while running.
-        Commands include:
-          s: die prior to postsuspend hook
-          s2: die after postsuspend hook
-          r: die prior to preresume hook
-          r2: die after preresume hook
-          c: die prior to commit hook
-          c2: die after commit hook
-          """
-        r, w, x = select.select([sys.stdin], [], [], 0)
-        if sys.stdin not in r:
-            return
-
-        cmd = sys.stdin.readline().strip()
-        if cmd not in ('s', 's2', 'r', 'r2', 'c', 'c2'):
-            print "unknown command: %s" % cmd
-        closure.cmd = cmd
-
-    signal.signal(signal.SIGTERM, sigexception)
-
-    dom = vm.VM(cfg.domid)
-
-    # set up I/O buffers
-    bufs = []
-
-    # disks must commit before network can be released
-    if not cfg.nullremus:
-        for disk in dom.disks:
-            try:
-                bufs.append(ReplicatedDisk(disk))
-            except ReplicatedDiskException, e:
-                print e
-                continue
-
-    if cfg.netbuffer:
-        for vif in dom.vifs:
-            bufs.append(BufferedNIC(vif))
-
-    if cfg.nullremus:
-        fd = save.NullSocket((cfg.host, cfg.port))
-    else:
-        fd = save.MigrationSocket((cfg.host, cfg.port))
-
-    def postsuspend():
-        'Begin external checkpointing after domain has paused'
-        if not cfg.timer:
-            # when not using a timer thread, sleep until now + interval
-            closure.starttime = time.time()
-
-        if closure.cmd == 's':
-            die()
-
-        for buf in bufs:
-            buf.postsuspend()
-
-        if closure.cmd == 's2':
-            die()
-
-    def preresume():
-        'Complete external checkpointing before domain resumes'
-        if closure.cmd == 'r':
-            die()
-
-        for buf in bufs:
-            buf.preresume()
-
-        if closure.cmd == 'r2':
-            die()
-
-    def commit():
-        'commit network buffer'
-        if closure.cmd == 'c':
-            die()
-
-        print >> sys.stderr, "PROF: flushed memory at %0.6f" % (time.time())
-
-        for buf in bufs:
-            buf.commit()
-
-        if closure.cmd == 'c2':
-            die()
-
-        # Since the domain is running at this point, it's a good time to
-        # check for control channel commands
-        getcommand()
-
-        if not cfg.timer:
-            endtime = time.time()
-            elapsed = (endtime - closure.starttime) * 1000
-
-            if elapsed < cfg.interval:
-                time.sleep((cfg.interval - elapsed) / 1000.0)
-
-        # False ends checkpointing
-        return True
-
-    if cfg.timer:
-        interval = cfg.interval
-    else:
-        interval = 0
-
-    rc = 0
-
-    checkpointer = save.Saver(cfg.domid, fd, postsuspend, preresume, commit,
-                              interval, cfg.flags)
-
-    try:
-        checkpointer.start()
-    except save.CheckpointError, e:
-        print e
-        rc = 1
-    except KeyboardInterrupt:
-        pass
-    except SignalException:
-        print '*** signalled ***'
-
-    for buf in bufs:
-        buf.uninstall()
-
-    sys.exit(rc)
-
-cfg = Cfg()
-try:
-    cfg.getargs()
-except CfgException, inst:
-    print str(inst)
-    cfg.usage()
-    sys.exit(1)
-
-try:
-    run(cfg)
-except vm.VMException, inst:
-    print str(inst)
-    sys.exit(1)
Signature · 2 lines
Thanks,
Yang.
#10 lore raw
In reply to Yang Hongyang
Quoted 5 lines · Yang Hongyang

Since xend already deleted, the old remus script which based on xend no longer functional, remove it.

I've applied this series with the acks gathered here and against v1.

In this patch I needed to add:

        --- a/tools/Makefile
        +++ b/tools/Makefile
        @@ -30,7 +30,6 @@ endif
         
         SUBDIRS-y += xenpmd
         SUBDIRS-y += libxl
        -SUBDIRS-y += remus

otherwise:
make -C remus install
make: Entering an unknown directory
make: *** remus: No such file or directory. Stop.
make: Leaving an unknown directory

In the final one I did s/Singed/Signed/ in the s-o-b.

I also applied the other one adding you as a MAINTAINER.

Ian.