Revision de9d75c8 src/Ganeti/HTools/Types.hs
b/src/Ganeti/HTools/Types.hs | ||
---|---|---|
370 | 370 |
|
371 | 371 |
-- | The possible auto-repair results. |
372 | 372 |
$(THH.declareSADT "AutoRepairResult" |
373 |
[ ("ArSuccess", 'C.autoRepairSuccess) |
|
373 |
-- Order is important here: higher results take precedence when an object |
|
374 |
-- has several result annotations attached. |
|
375 |
[ ("ArEnoperm", 'C.autoRepairEnoperm) |
|
376 |
, ("ArSuccess", 'C.autoRepairSuccess) |
|
374 | 377 |
, ("ArFailure", 'C.autoRepairFailure) |
375 |
, ("ArEnoperm", 'C.autoRepairEnoperm) |
|
376 | 378 |
]) |
377 | 379 |
|
378 | 380 |
-- | The possible auto-repair policy for a given instance. |
... | ... | |
389 | 391 |
|
390 | 392 |
-- | The possible auto-repair states for any given instance. |
391 | 393 |
data AutoRepairStatus |
392 |
= ArHealthy -- ^ No problems detected with the instance
|
|
394 |
= ArHealthy (Maybe AutoRepairData) -- ^ No problems detected with the instance
|
|
393 | 395 |
| ArNeedsRepair AutoRepairData -- ^ Instance has problems, no action taken |
394 | 396 |
| ArPendingRepair AutoRepairData -- ^ Repair jobs ongoing for the instance |
395 | 397 |
| ArFailedRepair AutoRepairData -- ^ Some repair jobs for the instance failed |
398 |
deriving (Eq, Show) |
|
396 | 399 |
|
397 | 400 |
-- | The data accompanying a repair operation (future, pending, or failed). |
398 | 401 |
data AutoRepairData = AutoRepairData { arType :: AutoRepairType |
... | ... | |
400 | 403 |
, arTime :: ClockTime |
401 | 404 |
, arJobs :: [JobId] |
402 | 405 |
, arResult :: Maybe AutoRepairResult |
406 |
, arTag :: String |
|
403 | 407 |
} |
408 |
deriving (Eq, Show) |
Also available in: Unified diff