Fix OS creation's error handling when pausing sync
authorFaidon Liambotis <faidon@noc.grnet.gr>
Fri, 16 Sep 2011 12:58:41 +0000 (15:58 +0300)
committerMichael Hanselmann <hansmi@google.com>
Tue, 20 Sep 2011 13:35:41 +0000 (15:35 +0200)
commitfac30cead6893b68085b6896d4db2a4f8ae43363
treef462d1e42c9e1315e32d34c198ffa6851da9aaa8
parent6804faa032e855304dec3dd5d264237722ebcd16
Fix OS creation's error handling when pausing sync

Commit 41e1e79 introduced a feature in which when wait_for_sync is not
set, DRBD sync is paused during the OS installation.

Doing so, however, broke OS creation's error handling: the result value
from the instance_os_add RPC call was overwritten by the one of the
blockdev_pause_resume_sync call before there was a chance for it to
be raised and thus masking possible errors in the OS creation.

Note that the wipe method, from which the pause technique was inspired,
does not suffer from this bug.

Signed-off-by: Faidon Liambotis <faidon@noc.grnet.gr>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
lib/cmdlib.py