Revision cad0723b lib/cmdlib.py
b/lib/cmdlib.py | ||
---|---|---|
11683 | 11683 |
for node in instance.all_nodes: |
11684 | 11684 |
self.cfg.SetDiskID(disk, node) |
11685 | 11685 |
result = self.rpc.call_blockdev_grow(node, (disk, instance), self.delta, |
11686 |
True) |
|
11686 |
True, True)
|
|
11687 | 11687 |
result.Raise("Grow request failed to node %s" % node) |
11688 | 11688 |
|
11689 | 11689 |
# We know that (as far as we can test) operations across different |
11690 |
# nodes will succeed, time to run it for real |
|
11690 |
# nodes will succeed, time to run it for real on the backing storage
|
|
11691 | 11691 |
for node in instance.all_nodes: |
11692 | 11692 |
self.cfg.SetDiskID(disk, node) |
11693 | 11693 |
result = self.rpc.call_blockdev_grow(node, (disk, instance), self.delta, |
11694 |
False) |
|
11694 |
False, True)
|
|
11695 | 11695 |
result.Raise("Grow request failed to node %s" % node) |
11696 | 11696 |
|
11697 |
# TODO: Rewrite code to work properly
|
|
11698 |
# DRBD goes into sync mode for a short amount of time after executing the
|
|
11699 |
# "resize" command. DRBD 8.x below version 8.0.13 contains a bug whereby
|
|
11700 |
# calling "resize" in sync mode fails. Sleeping for a short amount of
|
|
11701 |
# time is a work-around.
|
|
11702 |
time.sleep(5)
|
|
11697 |
# And now execute it for logical storage, on the primary node
|
|
11698 |
node = instance.primary_node
|
|
11699 |
self.cfg.SetDiskID(disk, node)
|
|
11700 |
result = self.rpc.call_blockdev_grow(node, (disk, instance), self.delta,
|
|
11701 |
False, False)
|
|
11702 |
result.Raise("Grow request failed to node %s" % node)
|
|
11703 | 11703 |
|
11704 | 11704 |
disk.RecordGrow(self.delta) |
11705 | 11705 |
self.cfg.Update(instance, feedback_fn) |
Also available in: Unified diff