Revision a9b42993 lib/cmdlib.py
b/lib/cmdlib.py | ||
---|---|---|
8342 | 8342 |
else: |
8343 | 8343 |
fn = self._ExecDrbd8DiskOnly |
8344 | 8344 |
|
8345 |
return fn(feedback_fn) |
|
8346 |
|
|
8345 |
result = fn(feedback_fn) |
|
8347 | 8346 |
finally: |
8348 | 8347 |
# Deactivate the instance disks if we're replacing them on a |
8349 | 8348 |
# down instance |
8350 | 8349 |
if activate_disks: |
8351 | 8350 |
_SafeShutdownInstanceDisks(self.lu, self.instance) |
8352 | 8351 |
|
8353 |
if __debug__: |
|
8354 |
# Verify owned locks |
|
8355 |
owned_locks = self.lu.context.glm.list_owned(locking.LEVEL_NODE) |
|
8356 |
assert ((self.early_release and not owned_locks) or |
|
8357 |
(not self.early_release and |
|
8358 |
set(owned_locks) == set(self.node_secondary_ip))), \ |
|
8359 |
("Not owning the correct locks, early_release=%s, owned=%r" % |
|
8360 |
(self.early_release, owned_locks)) |
|
8352 |
if __debug__: |
|
8353 |
# Verify owned locks |
|
8354 |
owned_locks = self.lu.context.glm.list_owned(locking.LEVEL_NODE) |
|
8355 |
assert ((self.early_release and not owned_locks) or |
|
8356 |
(not self.early_release and |
|
8357 |
set(owned_locks) == set(self.node_secondary_ip))), \ |
|
8358 |
("Not owning the correct locks, early_release=%s, owned=%r" % |
|
8359 |
(self.early_release, owned_locks)) |
|
8360 |
|
|
8361 |
return result |
|
8361 | 8362 |
|
8362 | 8363 |
def _CheckVolumeGroup(self, nodes): |
8363 | 8364 |
self.lu.LogInfo("Checking volume groups") |
Also available in: Unified diff