Revision 57bcb172 lib/cmdlib.py
b/lib/cmdlib.py | ||
---|---|---|
9600 | 9600 |
@param lu: the logical unit on whose behalf we execute |
9601 | 9601 |
@type instance: L{objects.Instance} |
9602 | 9602 |
@param instance: the instance whose disks we should create |
9603 |
@return: the success of the wipe |
|
9603 |
@type disks: None or list of tuple of (number, L{objects.Disk}, number) |
|
9604 |
@param disks: Disk details; tuple contains disk index, disk object and the |
|
9605 |
start offset |
|
9604 | 9606 |
|
9605 | 9607 |
""" |
9606 | 9608 |
node = instance.primary_node |
... | ... | |
14132 | 14134 |
self.LogWarning("Failed to create volume %s (%s) on node '%s': %s", |
14133 | 14135 |
disk.iv_name, disk, node, err) |
14134 | 14136 |
|
14137 |
if self.cluster.prealloc_wipe_disks: |
|
14138 |
# Wipe new disk |
|
14139 |
_WipeDisks(self, instance, |
|
14140 |
disks=[(idx, disk, 0)]) |
|
14141 |
|
|
14135 | 14142 |
return (disk, [ |
14136 | 14143 |
("disk/%d" % idx, "add:size=%s,mode=%s" % (disk.size, disk.mode)), |
14137 | 14144 |
]) |
Also available in: Unified diff