Commit 462d6658 authored by Hrvoje Ribicic's avatar Hrvoje Ribicic
Browse files

Fix failed DRBD disk creation cleanup



When creating a DRBD disk, Ganeti reserves minor numbers on a per-node
basis. In case of a failed disk creation, these reservations should be
released. During the name/uuid refactoring, the invocation of the
function that releases the minors was not updated, resulting in no
minors being released in case of a DRBD disk creation failure.
Ganeti's verification utilities catch this error and rightly complain.
This patch fixes the issue by providing the UUID and not the name.
Signed-off-by: default avatarHrvoje Ribicic <riba@google.com>
Reviewed-by: default avatarHelga Velroyen <helgav@google.com>
parent e9ba7edf
...@@ -1345,7 +1345,7 @@ class LUInstanceCreate(LogicalUnit): ...@@ -1345,7 +1345,7 @@ class LUInstanceCreate(LogicalUnit):
CreateDisks(self, iobj) CreateDisks(self, iobj)
except errors.OpExecError: except errors.OpExecError:
self.LogWarning("Device creation failed") self.LogWarning("Device creation failed")
self.cfg.ReleaseDRBDMinors(self.op.instance_name) self.cfg.ReleaseDRBDMinors(instance_uuid)
raise raise
feedback_fn("adding instance %s to cluster config" % self.op.instance_name) feedback_fn("adding instance %s to cluster config" % self.op.instance_name)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment