This patch fixes the error message that is displayed when the user tries
to use a non-existing volume group. Instead of advising to use
'--no-lvm-storage' when not using lvm storage, we now advise him to
disable the lvm-based disk templates.

Signed-off-by: Helga Velroyen <[email protected]>
---
 lib/bootstrap.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/bootstrap.py b/lib/bootstrap.py
index 40da336..581a6f4 100644
--- a/lib/bootstrap.py
+++ b/lib/bootstrap.py
@@ -466,9 +466,10 @@ def InitCluster(cluster_name, mac_prefix, # pylint: 
disable=R0913, R0914
     vgstatus = utils.CheckVolumeGroupSize(utils.ListVolumeGroups(), vg_name,
                                           constants.MIN_VG_SIZE)
     if vgstatus:
-      raise errors.OpPrereqError("Error: %s\nspecify --no-lvm-storage if"
-                                 " you are not using lvm" % vgstatus,
-                                 errors.ECODE_INVAL)
+      raise errors.OpPrereqError(
+        "Error: %s\nDisable all lvm-based disk-templates with"
+        "'--enabled-disk-templates', if you are not using lvm" % vgstatus,
+        errors.ECODE_INVAL)
 
   if drbd_helper is not None:
     try:
-- 
1.8.1.3

Reply via email to