All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/4] remus: remove old remus script
@ 2014-06-25  7:26 Yang Hongyang
  2014-06-25  7:26 ` [PATCH v2 2/4] remus: move remus README to docs directory Yang Hongyang
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Yang Hongyang @ 2014-06-25  7:26 UTC (permalink / raw)
  To: xen-devel; +Cc: rshriram, Yang Hongyang, ian.jackson

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

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
Acked-by: Shriram Rajagopalan <rshriram@cs.ubc.ca>
---
 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

diff --git a/tools/remus/Makefile b/tools/remus/Makefile
deleted file mode 100644
index ae82376..0000000
--- a/tools/remus/Makefile
+++ /dev/null
@@ -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
diff --git a/tools/remus/remus b/tools/remus/remus
deleted file mode 100644
index 38f0365..0000000
--- a/tools/remus/remus
+++ /dev/null
@@ -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)
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v2 2/4] remus: move remus README to docs directory
  2014-06-25  7:26 [PATCH v2 1/4] remus: remove old remus script Yang Hongyang
@ 2014-06-25  7:26 ` Yang Hongyang
  2014-06-30 12:41   ` Shriram Rajagopalan
  2014-06-30 17:06   ` Ian Jackson
  2014-06-25  7:26 ` [PATCH v2 3/4] remus: add wikipage link to remus README Yang Hongyang
                   ` (4 subsequent siblings)
  5 siblings, 2 replies; 11+ messages in thread
From: Yang Hongyang @ 2014-06-25  7:26 UTC (permalink / raw)
  To: xen-devel; +Cc: rshriram, Yang Hongyang, ian.jackson

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

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
---
 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

diff --git a/docs/README.remus b/docs/README.remus
new file mode 100644
index 0000000..9e8140b
--- /dev/null
+++ b/docs/README.remus
@@ -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.
diff --git a/tools/remus/README b/tools/remus/README
deleted file mode 100644
index 9e8140b..0000000
--- a/tools/remus/README
+++ /dev/null
@@ -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.
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v2 3/4] remus: add wikipage link to remus README
  2014-06-25  7:26 [PATCH v2 1/4] remus: remove old remus script Yang Hongyang
  2014-06-25  7:26 ` [PATCH v2 2/4] remus: move remus README to docs directory Yang Hongyang
@ 2014-06-25  7:26 ` Yang Hongyang
  2014-06-25  7:38   ` Shriram Rajagopalan
  2014-06-25  7:26 ` [PATCH v2 4/4] MAINTAINERS: Update maintained files of REMUS part Yang Hongyang
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Yang Hongyang @ 2014-06-25  7:26 UTC (permalink / raw)
  To: xen-devel; +Cc: rshriram, Yang Hongyang, ian.jackson

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

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
---
 docs/README.remus | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/README.remus b/docs/README.remus
index 9e8140b..9fa00fe 100644
--- a/docs/README.remus
+++ b/docs/README.remus
@@ -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.
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v2 4/4] MAINTAINERS: Update maintained files of REMUS part
  2014-06-25  7:26 [PATCH v2 1/4] remus: remove old remus script Yang Hongyang
  2014-06-25  7:26 ` [PATCH v2 2/4] remus: move remus README to docs directory Yang Hongyang
  2014-06-25  7:26 ` [PATCH v2 3/4] remus: add wikipage link to remus README Yang Hongyang
@ 2014-06-25  7:26 ` Yang Hongyang
  2014-06-30 12:39   ` Shriram Rajagopalan
  2014-06-26  7:57 ` [PATCH v2 1/4] remus: remove old remus script Hongyang Yang
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Yang Hongyang @ 2014-06-25  7:26 UTC (permalink / raw)
  To: xen-devel; +Cc: rshriram, Yang Hongyang, ian.jackson

delete tools/remus and add docs/README.remus

Singed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
---
 MAINTAINERS | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 1865a84..ae5d7b3 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -258,7 +258,7 @@ T:	git git://xenbits.xen.org/qemu-upstream-*.git
 REMUS
 M:	Shriram Rajagopalan <rshriram@cs.ubc.ca>
 S:	Maintained
-F:	tools/remus/
+F:	docs/README.remus
 F:	tools/blktap2/drivers/block-remus.c
 F:	tools/blktap2/drivers/hashtable*
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 3/4] remus: add wikipage link to remus README
  2014-06-25  7:26 ` [PATCH v2 3/4] remus: add wikipage link to remus README Yang Hongyang
@ 2014-06-25  7:38   ` Shriram Rajagopalan
  0 siblings, 0 replies; 11+ messages in thread
From: Shriram Rajagopalan @ 2014-06-25  7:38 UTC (permalink / raw)
  To: FNST-Yang Hongyang; +Cc: ian.jackson, xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 799 bytes --]

On Jun 25, 2014 12:59 PM, "Yang Hongyang" <yanghy@cn.fujitsu.com> wrote:
>
> http://nss.cs.ubc.ca/remus/ does not exists, replace it
> with Remus wikipage.
>
> Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
> ---
>  docs/README.remus | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/docs/README.remus b/docs/README.remus
> index 9e8140b..9fa00fe 100644
> --- a/docs/README.remus
> +++ b/docs/README.remus
> @@ -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.
> --
> 1.9.1
>
Acked-by: Shriram Rajagopalan <rshriram@cs.ubc.ca>

[-- Attachment #1.2: Type: text/html, Size: 1297 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 1/4] remus: remove old remus script
  2014-06-25  7:26 [PATCH v2 1/4] remus: remove old remus script Yang Hongyang
                   ` (2 preceding siblings ...)
  2014-06-25  7:26 ` [PATCH v2 4/4] MAINTAINERS: Update maintained files of REMUS part Yang Hongyang
@ 2014-06-26  7:57 ` Hongyang Yang
  2014-06-30  4:30 ` Hongyang Yang
  2014-07-03 10:03 ` Ian Campbell
  5 siblings, 0 replies; 11+ messages in thread
From: Hongyang Yang @ 2014-06-26  7:57 UTC (permalink / raw)
  To: xen-devel; +Cc: rshriram, ian.jackson

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.

On 06/25/2014 03:26 PM, Yang Hongyang wrote:
> Since xend already deleted, the old remus script which based on
> xend no longer functional, remove it.
>
> Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
> Acked-by: Shriram Rajagopalan <rshriram@cs.ubc.ca>
> ---
>   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
>
> diff --git a/tools/remus/Makefile b/tools/remus/Makefile
> deleted file mode 100644
> index ae82376..0000000
> --- a/tools/remus/Makefile
> +++ /dev/null
> @@ -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
> diff --git a/tools/remus/remus b/tools/remus/remus
> deleted file mode 100644
> index 38f0365..0000000
> --- a/tools/remus/remus
> +++ /dev/null
> @@ -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)
>

-- 
Thanks,
Yang.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 1/4] remus: remove old remus script
  2014-06-25  7:26 [PATCH v2 1/4] remus: remove old remus script Yang Hongyang
                   ` (3 preceding siblings ...)
  2014-06-26  7:57 ` [PATCH v2 1/4] remus: remove old remus script Hongyang Yang
@ 2014-06-30  4:30 ` Hongyang Yang
  2014-07-03 10:03 ` Ian Campbell
  5 siblings, 0 replies; 11+ messages in thread
From: Hongyang Yang @ 2014-06-30  4:30 UTC (permalink / raw)
  To: xen-devel; +Cc: rshriram, ian.jackson

Ping!

On 06/25/2014 03:26 PM, Yang Hongyang wrote:
> Since xend already deleted, the old remus script which based on
> xend no longer functional, remove it.
>
> Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
> Acked-by: Shriram Rajagopalan <rshriram@cs.ubc.ca>
> ---
>   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
>
> diff --git a/tools/remus/Makefile b/tools/remus/Makefile
> deleted file mode 100644
> index ae82376..0000000
> --- a/tools/remus/Makefile
> +++ /dev/null
> @@ -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
> diff --git a/tools/remus/remus b/tools/remus/remus
> deleted file mode 100644
> index 38f0365..0000000
> --- a/tools/remus/remus
> +++ /dev/null
> @@ -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)
>

-- 
Thanks,
Yang.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 4/4] MAINTAINERS: Update maintained files of REMUS part
  2014-06-25  7:26 ` [PATCH v2 4/4] MAINTAINERS: Update maintained files of REMUS part Yang Hongyang
@ 2014-06-30 12:39   ` Shriram Rajagopalan
  0 siblings, 0 replies; 11+ messages in thread
From: Shriram Rajagopalan @ 2014-06-30 12:39 UTC (permalink / raw)
  To: FNST-Yang Hongyang; +Cc: ian.jackson, xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 752 bytes --]

On Jun 25, 2014 12:59 PM, "Yang Hongyang" <yanghy@cn.fujitsu.com> wrote:
>
> delete tools/remus and add docs/README.remus
>
> Singed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
> ---
>  MAINTAINERS | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 1865a84..ae5d7b3 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -258,7 +258,7 @@ T:  git git://xenbits.xen.org/qemu-upstream-*.git
>  REMUS
>  M:     Shriram Rajagopalan <rshriram@cs.ubc.ca>
>  S:     Maintained
> -F:     tools/remus/
> +F:     docs/README.remus
>  F:     tools/blktap2/drivers/block-remus.c
>  F:     tools/blktap2/drivers/hashtable*
>
> --
> 1.9.1
>
Sorry missed this.

Acked-by: Shriram Rajagopalan <rshriram@cs.ubc.ca>

[-- Attachment #1.2: Type: text/html, Size: 1267 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 2/4] remus: move remus README to docs directory
  2014-06-25  7:26 ` [PATCH v2 2/4] remus: move remus README to docs directory Yang Hongyang
@ 2014-06-30 12:41   ` Shriram Rajagopalan
  2014-06-30 17:06   ` Ian Jackson
  1 sibling, 0 replies; 11+ messages in thread
From: Shriram Rajagopalan @ 2014-06-30 12:41 UTC (permalink / raw)
  To: FNST-Yang Hongyang; +Cc: ian.jackson, xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1259 bytes --]

On Jun 25, 2014 12:59 PM, "Yang Hongyang" <yanghy@cn.fujitsu.com> wrote:
>
> We do not need a separate directory to store remus README, just
> move it to docs/ directory.
>
> Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
> ---
>  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
>
> diff --git a/docs/README.remus b/docs/README.remus
> new file mode 100644
> index 0000000..9e8140b
> --- /dev/null
> +++ b/docs/README.remus
> @@ -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.
> diff --git a/tools/remus/README b/tools/remus/README
> deleted file mode 100644
> index 9e8140b..0000000
> --- a/tools/remus/README
> +++ /dev/null
> @@ -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.
> --
> 1.9.1
>

Acked-by: Shriram Rajagopalan <rshriram@cs.ubc.ca>

[-- Attachment #1.2: Type: text/html, Size: 1830 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 2/4] remus: move remus README to docs directory
  2014-06-25  7:26 ` [PATCH v2 2/4] remus: move remus README to docs directory Yang Hongyang
  2014-06-30 12:41   ` Shriram Rajagopalan
@ 2014-06-30 17:06   ` Ian Jackson
  1 sibling, 0 replies; 11+ messages in thread
From: Ian Jackson @ 2014-06-30 17:06 UTC (permalink / raw)
  To: Yang Hongyang; +Cc: rshriram, xen-devel

Yang Hongyang writes ("[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.

I acked v1 but this is good too.

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 1/4] remus: remove old remus script
  2014-06-25  7:26 [PATCH v2 1/4] remus: remove old remus script Yang Hongyang
                   ` (4 preceding siblings ...)
  2014-06-30  4:30 ` Hongyang Yang
@ 2014-07-03 10:03 ` Ian Campbell
  5 siblings, 0 replies; 11+ messages in thread
From: Ian Campbell @ 2014-07-03 10:03 UTC (permalink / raw)
  To: Yang Hongyang; +Cc: rshriram, ian.jackson, xen-devel

On Wed, 2014-06-25 at 15:26 +0800, Yang Hongyang wrote:
> Since xend already deleted, the old remus script which based on
> xend no longer functional, remove it.
> 
> Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
> Acked-by: Shriram Rajagopalan <rshriram@cs.ubc.ca>

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.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-07-03 10:03 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-25  7:26 [PATCH v2 1/4] remus: remove old remus script Yang Hongyang
2014-06-25  7:26 ` [PATCH v2 2/4] remus: move remus README to docs directory Yang Hongyang
2014-06-30 12:41   ` Shriram Rajagopalan
2014-06-30 17:06   ` Ian Jackson
2014-06-25  7:26 ` [PATCH v2 3/4] remus: add wikipage link to remus README Yang Hongyang
2014-06-25  7:38   ` Shriram Rajagopalan
2014-06-25  7:26 ` [PATCH v2 4/4] MAINTAINERS: Update maintained files of REMUS part Yang Hongyang
2014-06-30 12:39   ` Shriram Rajagopalan
2014-06-26  7:57 ` [PATCH v2 1/4] remus: remove old remus script Hongyang Yang
2014-06-30  4:30 ` Hongyang Yang
2014-07-03 10:03 ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.