From e725bee0f4d27fa362d56e4b35f9596a59a67bf9 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Thu, 21 Oct 2010 12:28:33 +0200
Subject: [PATCH] Fix clearing of the default iallocator

And also update the man page.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
---
 lib/cmdlib.py        |  2 +-
 man/gnt-cluster.sgml | 11 ++++++++---
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/lib/cmdlib.py b/lib/cmdlib.py
index 6b887b5a6..ac4eb508c 100644
--- a/lib/cmdlib.py
+++ b/lib/cmdlib.py
@@ -2456,7 +2456,7 @@ class LUSetClusterParams(LogicalUnit):
     ("maintain_node_health", None, ht.TMaybeBool),
     ("nicparams", None, ht.TOr(ht.TDict, ht.TNone)),
     ("drbd_helper", None, ht.TOr(ht.TString, ht.TNone)),
-    ("default_iallocator", None, ht.TMaybeString),
+    ("default_iallocator", None, ht.TOr(ht.TString, ht.TNone)),
     ("reserved_lvs", None, ht.TOr(ht.TListOf(ht.TNonEmptyString), ht.TNone)),
     ("hidden_os", None, ht.TOr(ht.TListOf(\
           ht.TAnd(ht.TList,
diff --git a/man/gnt-cluster.sgml b/man/gnt-cluster.sgml
index 0567b6827..43d660865 100644
--- a/man/gnt-cluster.sgml
+++ b/man/gnt-cluster.sgml
@@ -676,9 +676,8 @@
           <option>--backend-parameters</option>,
           <option>--nic-parameters</option>,
           <option>--maintain-node-health</option>,
-          <option>--uid-pool</option> and
-          <option>-I</option> options are
-          described in the <command>init</command> command.
+          <option>--uid-pool</option> options are described in
+          the <command>init</command> command.
         </para>
 
       <para>
@@ -717,6 +716,12 @@
         or <option>--reserved-lvs ''</option>.
       </para>
 
+      <para>
+        The <option>-I</option> is described in
+        the <command>init</command> command. To clear the default
+        iallocator, just pass an empty string (<literal>''</literal>).
+      </para>
+
     </refsect2>
 
     <refsect2>
-- 
GitLab