Commit 9158a1dd authored by Jose A. Lopes's avatar Jose A. Lopes

Add instance state 'USER_down'

Add instance state 'USER_down' which is a state used in reporting only
and it represents the situation in which the user has shutdown the
instance but Ganeti's configuration still has this instance marked as
'ADMIN_up'.
Signed-off-by: default avatarJose A. Lopes <jabolopes@google.com>
Reviewed-by: default avatarHrvoje Ribicic <riba@google.com>
parent 931419e5
......@@ -3033,6 +3033,9 @@ inststNodeoffline = Types.instanceStatusToRaw NodeOffline
inststRunning :: String
inststRunning = Types.instanceStatusToRaw Running
inststUserdown :: String
inststUserdown = Types.instanceStatusToRaw UserDown
inststWrongnode :: String
inststWrongnode = Types.instanceStatusToRaw WrongNode
......
......@@ -330,8 +330,7 @@ $(THH.declareLADT ''String "AllocPolicy"
])
$(THH.makeJSONInstance ''AllocPolicy)
-- | The Instance real state type. FIXME: this could be improved to
-- just wrap a /NormalState AdminStatus | ErrorState ErrorCondition/.
-- | The Instance real state type.
$(THH.declareLADT ''String "InstanceStatus"
[ ("StatusDown", "ADMIN_down")
, ("StatusOffline", "ADMIN_offline")
......@@ -340,6 +339,7 @@ $(THH.declareLADT ''String "InstanceStatus"
, ("NodeDown", "ERROR_nodedown")
, ("NodeOffline", "ERROR_nodeoffline")
, ("Running", "running")
, ("UserDown", "USER_down")
, ("WrongNode", "ERROR_wrongnode")
])
$(THH.makeJSONInstance ''InstanceStatus)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment