From 43e99cff2a78d72a9ca64ea64953a77c6b9f187c Mon Sep 17 00:00:00 2001
From: Guido Trotter <ultrotter@google.com>
Date: Wed, 11 Feb 2009 16:23:11 +0000
Subject: [PATCH] _GenerateDiskTemplate: correct file disk index

Currently when adding disks the base for the index is not taken into
account, and disk 0 is added twice.

Reviewed-by: iustinp
---
 lib/cmdlib.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/cmdlib.py b/lib/cmdlib.py
index 58b4e030a..b709455be 100644
--- a/lib/cmdlib.py
+++ b/lib/cmdlib.py
@@ -4028,7 +4028,7 @@ def _GenerateDiskTemplate(lu, template_name,
                               iv_name="disk/%d" % disk_index,
                               logical_id=(file_driver,
                                           "%s/disk%d" % (file_storage_dir,
-                                                         idx)),
+                                                         disk_index)),
                               mode=disk["mode"])
       disks.append(disk_dev)
   else:
-- 
GitLab