From d20fac071c8b7b623b8e9a9a567ff5eaa5ffc0bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tino=20V=C3=A1zquez?= Date: Wed, 22 Dec 2010 15:54:05 +0100 Subject: [PATCH 1/2] bug #441: Fix typo in oneimage help (cherry picked from commit 6c9cdeb2ee8149dbd32744740a3137cb53c42421) --- src/cli/oneimage | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli/oneimage b/src/cli/oneimage index c1a7564fb0..abb6305d7a 100755 --- a/src/cli/oneimage +++ b/src/cli/oneimage @@ -250,7 +250,7 @@ Commands: user --> Images of the user identified by the username * top (Lists Images continuously) - onevm top + oneimage top * show (Gets information about an specific Image) oneimage show From cd05b5a1eff4ec67219dc53d7c8346c001141838 Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Wed, 22 Dec 2010 18:08:04 +0100 Subject: [PATCH 2/2] feature #357: Added on failed hook for VMs --- share/etc/oned.conf | 2 +- src/vm/VirtualMachinePool.cc | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/share/etc/oned.conf b/share/etc/oned.conf index fb6afcc5e6..a0acdd2e30 100644 --- a/share/etc/oned.conf +++ b/share/etc/oned.conf @@ -281,6 +281,7 @@ TM_MAD = [ # - SHUTDOWN, after the VM is shutdown # - STOP, after the VM is stopped (including VM image transfers) # - DONE, after the VM is deleted or shutdown +# - FAILED, when the VM enters the failed state # command : path can be absolute or relative to $ONE_LOCATION/share/hooks # case of self-contained installation or relative to # /usr/share/one/hooks in case of system-wide installation @@ -349,4 +350,3 @@ VM_HOOK = [ #AUTH_MAD = [ # executable = "one_auth_mad" ] - diff --git a/src/vm/VirtualMachinePool.cc b/src/vm/VirtualMachinePool.cc index 2af68f64ca..19060e7140 100644 --- a/src/vm/VirtualMachinePool.cc +++ b/src/vm/VirtualMachinePool.cc @@ -133,6 +133,16 @@ VirtualMachinePool::VirtualMachinePool(SqlDB * db, state_hook = true; } + else if ( on == "FAILED" ) + { + VirtualMachineStateHook * hook; + + hook = new VirtualMachineStateHook(name, cmd, arg, remote, + VirtualMachine::LCM_INIT, VirtualMachine::FAILED); + add_hook(hook); + + state_hook = true; + } else { ostringstream oss;