public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
From: lhh@sourceware.org
To: cluster-cvs@sources.redhat.com, cluster-devel@redhat.com
Subject: Cluster Project branch, master, updated. cluster-2.99.06-45-ga4abbf1
Date: Tue, 22 Jul 2008 15:02:00 -0000	[thread overview]
Message-ID: <20080722150205.7963.qmail@sourceware.org> (raw)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Cluster Project".

http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=a4abbf1dbfd3287ae70f3177d7d878919d80373b

The branch, master has been updated
       via  a4abbf1dbfd3287ae70f3177d7d878919d80373b (commit)
      from  b08565edfaf1580ce7e8c41e95d5aeda0c794d6e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a4abbf1dbfd3287ae70f3177d7d878919d80373b
Author: Lon Hohberger <lhh@redhat.com>
Date:   Tue Jul 22 11:01:53 2008 -0400

    [rgmanager] Add optional save/restore to vm resource
    
    This patch adds optional save/restore support to virtual machines.
    Patch Federico Simoncelli federico dot simoncelli at gmail dot com

-----------------------------------------------------------------------

Summary of changes:
 rgmanager/src/resources/vm.sh |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/rgmanager/src/resources/vm.sh b/rgmanager/src/resources/vm.sh
index 15e1f2a..e72cbbb 100644
--- a/rgmanager/src/resources/vm.sh
+++ b/rgmanager/src/resources/vm.sh
@@ -211,6 +211,18 @@ meta_data()
             <content type="string" default="live"/>
         </parameter>
 
+	<parameter name="snapshot">
+	    <longdesc lang="en">
+	    	Path to the snapshot directory where the virtual machine
+		image will be stored.
+	    </longdesc>
+	    <shortdesc lang="en">
+	    	Path to the snapshot directory where the virtual machine
+		image will be stored.
+	    </shortdesc>
+            <content type="string" default=""/>
+        </parameter>
+
         <parameter name="depend">
             <longdesc lang="en">
 		Top-level service this depends on, in "service:name" format.
@@ -346,6 +358,8 @@ build_xm_cmdline()
 			;;
 		migrate)
 			;;
+		snapshot)
+			;;
 		*)
 			cmdline="$cmdline $varp=\"$val\""
 			;;
@@ -370,9 +384,21 @@ do_start()
 	# doesn't exist...
 	#
 	declare cmdline
+	declare snapshotimage
 
 	status && return 0
 
+	snapshotimage="$OCF_RESKEY_snapshot/$OCF_RESKEY_name"
+
+        if [ -n "$OCF_RESKEY_snapshot" -a -f "$snapshotimage" ]; then
+		eval xm restore $snapshotimage
+		if [ $? -eq 0 ]; then
+			rm -f $snapshotimage
+			return 0
+		fi
+		return 1
+	fi
+
 	cmdline="`build_xm_cmdline`"
 
 	echo "# xm command line: $cmdline"
@@ -392,6 +418,10 @@ do_stop()
 	declare -i ret=1
 	declare st
 
+	if [ -n "$OCF_RESKEY_snapshot" ]; then
+		xm save $OCF_RESKEY_name "$OCF_RESKEY_snapshot/$OCF_RESKEY_name"
+	fi
+
 	for op in $*; do
 		echo xm $op $OCF_RESKEY_name ...
 		xm $op $OCF_RESKEY_name


hooks/post-receive
--
Cluster Project


                 reply	other threads:[~2008-07-22 15:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080722150205.7963.qmail@sourceware.org \
    --to=lhh@sourceware.org \
    --cc=cluster-cvs@sources.redhat.com \
    --cc=cluster-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).