You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by je...@apache.org on 2010/08/10 19:57:30 UTC
svn commit: r984148 - /incubator/libcloud/trunk/libcloud/drivers/linode.py
Author: jed
Date: Tue Aug 10 17:57:29 2010
New Revision: 984148
URL: http://svn.apache.org/viewvc?rev=984148&view=rev
Log:
Make powered off Linodes appear as TERMINATED
The proper state for powered off is actually TERMINATED, since a
large number of nodes at CK were stuck in REBOOTING (but were
really powered off for good).
Note that this change might make TERMINATED appear briefly during
a reboot, as a rebooting Linode is powered off for a brief window.
Modified:
incubator/libcloud/trunk/libcloud/drivers/linode.py
Modified: incubator/libcloud/trunk/libcloud/drivers/linode.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/drivers/linode.py?rev=984148&r1=984147&r2=984148&view=diff
==============================================================================
--- incubator/libcloud/trunk/libcloud/drivers/linode.py (original)
+++ incubator/libcloud/trunk/libcloud/drivers/linode.py Tue Aug 10 17:57:29 2010
@@ -208,13 +208,12 @@ class LinodeNodeDriver(NodeDriver):
NodeDriver.__init__(self, key)
# Converts Linode's state from DB to a NodeState constant.
- # Some of these are lightly questionable.
LINODE_STATES = {
-2: NodeState.UNKNOWN, # Boot Failed
-1: NodeState.PENDING, # Being Created
0: NodeState.PENDING, # Brand New
1: NodeState.RUNNING, # Running
- 2: NodeState.REBOOTING, # Powered Off
+ 2: NodeState.TERMINATED, # Powered Off
3: NodeState.REBOOTING, # Shutting Down
4: NodeState.UNKNOWN # Reserved
}