From 150e978fc450c7953c13579fc27684430b156566 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Wed, 12 Dec 2007 13:13:02 +0000
Subject: [PATCH] Add a new OpVerifyDisks opcode

This patch adds the definition of a new opcode that will be used to
compute the list of instances with not-online disks.

Reviewed-by: imsnah
---
 lib/opcodes.py | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/lib/opcodes.py b/lib/opcodes.py
index 99f44392c..3b248fc30 100644
--- a/lib/opcodes.py
+++ b/lib/opcodes.py
@@ -86,6 +86,28 @@ class OpVerifyCluster(OpCode):
   __slots__ = []
 
 
+class OpVerifyDisks(OpCode):
+  """Verify the cluster disks.
+
+  Parameters: none
+
+  Result: two lists:
+    - list of node names with bad data returned (unreachable, etc.)
+    - list of instances with degraded disks (that should be activated)
+
+  In normal operation, both lists should be empty. A non-empty
+  instance list is still ok (errors were fixed) but non-empty node
+  list means some node is down, and probably there are unfixable drbd
+  errors.
+
+  Note that only instances that are drbd-based are taken into
+  consideration. This might need to be revisited in the future.
+
+  """
+  OP_ID = "OP_CLUSTER_VERIFY_DISKS"
+  __slots__ = []
+
+
 class OpMasterFailover(OpCode):
   """Do a master failover."""
   OP_ID = "OP_CLUSTER_MASTERFAILOVER"
-- 
GitLab