From: Iustin Pop Date: Mon, 9 Mar 2009 15:12:01 +0000 (+0000) Subject: Fix error handling in replace-disks with new node X-Git-Tag: v2.0.0rc2~10 X-Git-Url: https://code.grnet.gr/git/ganeti-local/commitdiff_plain/82759cb10c098723a0543ea2f2347c5559dfbea4 Fix error handling in replace-disks with new node Currently the _CreateSingleBlockDev function only raises OpExecError and not BlockDeviceError. This means that we don't release the instance's temporary minors properly, and this creates problems later if the instance is removed without master restart. We could just use OpExecError, but adding it and leaving BlockDeviceError in seems safer. Reviewed-by: imsnah --- diff --git a/lib/cmdlib.py b/lib/cmdlib.py index 6ad6c04..a3150b1 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -5297,7 +5297,7 @@ class LUReplaceDisks(LogicalUnit): try: _CreateSingleBlockDev(self, new_node, instance, new_drbd, _GetInstanceInfoText(instance), False) - except errors.BlockDeviceError: + except errors.GenericError: self.cfg.ReleaseDRBDMinors(instance.name) raise