Return-Path: X-Original-To: apmail-deltacloud-dev-archive@www.apache.org Delivered-To: apmail-deltacloud-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 32898EA54 for ; Wed, 23 Jan 2013 12:36:46 +0000 (UTC) Received: (qmail 75065 invoked by uid 500); 23 Jan 2013 12:36:46 -0000 Delivered-To: apmail-deltacloud-dev-archive@deltacloud.apache.org Received: (qmail 74886 invoked by uid 500); 23 Jan 2013 12:36:41 -0000 Mailing-List: contact dev-help@deltacloud.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@deltacloud.apache.org Delivered-To: mailing list dev@deltacloud.apache.org Received: (qmail 74823 invoked by uid 99); 23 Jan 2013 12:36:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Jan 2013 12:36:39 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [116.50.57.190] (HELO cluster-k.mailcontrol.com) (116.50.57.190) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Jan 2013 12:36:29 +0000 Received: from mail2.fujitsu.com.au (mail2.fujitsu.com.au [216.14.192.226]) by rly08k.srv.mailcontrol.com (MailControl) with ESMTP id r0NCa3jf009111 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Wed, 23 Jan 2013 12:36:04 GMT Received: from localhost (localhost.localdomain [127.0.0.1]) by mail2.fujitsu.com.au (Postfix) with ESMTP id ED2554DB203 for ; Wed, 23 Jan 2013 23:36:02 +1100 (EST) X-Virus-Scanned: amavisd-new at mail2.fujitsu.com.au Received: from mail2.fujitsu.com.au ([127.0.0.1]) by localhost (mail2.fujitsu.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 4ezzHzd-Tx8r for ; Wed, 23 Jan 2013 23:36:02 +1100 (EST) Received: from SYD0633.au.fujitsu.com (unknown [137.172.78.132]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client did not present a certificate) by mail2.fujitsu.com.au (Postfix) with ESMTP id C870C4DB201 for ; Wed, 23 Jan 2013 23:36:02 +1100 (EST) Received: from mailfilter2.au.fjanz.com (137.172.19.76) by SYD0633.au.fujitsu.com (137.172.78.132) with Microsoft SMTP Server id 8.3.83.0; Wed, 23 Jan 2013 23:35:59 +1100 Received: from RadwareLoad Balancer (137.172.78.70) [137.172.78.70] by mailfilter2.au.fjanz.com - Websense Email Security (7.0.0); Wed, 23 Jan 2013 23:36:02 +1100 Received: from FALEX03.au.fjanz.com ([137.172.72.103]) by SYD0665.au.fjanz.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 23 Jan 2013 23:35:52 +1100 Received: from localhost ([10.44.213.90]) by FALEX03.au.fjanz.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 23 Jan 2013 23:35:51 +1100 From: To: Subject: [PATCH] Fgcp: remap instance error states according to allowed actions Date: Wed, 23 Jan 2013 23:35:51 +1100 Message-ID: <1358944551-4448-1-git-send-email-diesk@fast.au.fujitsu.com> X-Mailer: git-send-email 1.8.0.msysgit.0 X-OriginalArrivalTime: 23 Jan 2013 12:35:51.0948 (UTC) FILETIME=[2E2094C0:01CDF966] X-SEF-Processed: 7_0_0_00239__2013_01_23_23_36_02 MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MailControl 11783.69 (www.mailcontrol.com) on 10.75.0.118 X-Virus-Checked: Checked by ClamAV on apache.org From: Dies Koper --- server/lib/deltacloud/drivers/fgcp/fgcp_driver.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server/lib/deltacloud/drivers/fgcp/fgcp_driver.rb b/server/lib/deltacloud/drivers/fgcp/fgcp_driver.rb index cbda9ea..558771b 100644 --- a/server/lib/deltacloud/drivers/fgcp/fgcp_driver.rb +++ b/server/lib/deltacloud/drivers/fgcp/fgcp_driver.rb @@ -60,6 +60,7 @@ class FgcpDriver < Deltacloud::BaseDriver stopping.to( :stopped ) .automatically # stopping an instance does not automatically destroy it stopped.to(:running) .on( :start ) # obvious stopped.to(:finish) .on( :destroy ) # only destroy removes an instance, and it has to be stopped first + error.from( :pending :starting, :running, :stopping) # not including STOP_ERROR and START_ERROR as they are as :running and :stopped end ###################################################################### @@ -1705,9 +1706,9 @@ eofwopxml 'UNEXPECTED_STOP' => 'STOPPED', 'RESTORING' => 'PENDING', 'BACKUP_ING' => 'PENDING', - 'ERROR' => 'STOPPED', - 'START_ERROR' => 'STOPPED', # not sure about this one - 'STOP_ERROR' => 'STOPPING', + 'ERROR' => 'ERROR', # allowed actions limited + 'START_ERROR' => 'STOPPED', # allowed actions are same as for STOPPED + 'STOP_ERROR' => 'RUNNING', # allowed actions are same as for RUNNING 'REGISTERING' => 'PENDING', 'CHANGE_TYPE' => 'PENDING' } -- 1.8.0.msysgit.0