_GenerateDiskTemplate: correct file disk index
authorGuido Trotter <ultrotter@google.com>
Wed, 11 Feb 2009 16:23:11 +0000 (16:23 +0000)
committerGuido Trotter <ultrotter@google.com>
Wed, 11 Feb 2009 16:23:11 +0000 (16:23 +0000)
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

index 58b4e03..b709455 100644 (file)
@@ -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: