From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8009 invoked by alias); 22 Jul 2008 15:02:05 -0000 Received: (qmail 7978 invoked by uid 9476); 22 Jul 2008 15:02:05 -0000 Date: Tue, 22 Jul 2008 15:02:00 -0000 Message-ID: <20080722150205.7963.qmail@sourceware.org> 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 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: b08565edfaf1580ce7e8c41e95d5aeda0c794d6e X-Git-Newrev: a4abbf1dbfd3287ae70f3177d7d878919d80373b Mailing-List: contact cluster-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cluster-cvs-owner@sourceware.org X-SW-Source: 2008-q3/txt/msg00119.txt.bz2 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 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() + + + Path to the snapshot directory where the virtual machine + image will be stored. + + + Path to the snapshot directory where the virtual machine + image will be stored. + + + + 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