Commit c614e5fb authored by Iustin Pop's avatar Iustin Pop
Browse files

Handle ghost instances in temp DRBD map

Currently cluster-verify doesn't handle the (admitedly invalid) case where we
have reservation for instances that were removed in the meantime.

This patch adds a check for this and prevents code errors in cluster-verify in
this case:
 * Verifying node (master candidate)
   - ERROR: ghost instance \'\' in temporary DRBD map

Reviewed-by: imsnah
parent 82759cb1
......@@ -1011,8 +1011,16 @@ class LUVerifyCluster(LogicalUnit):
node_drbd = {}
for minor, instance in all_drbd_map[node].items():
instance = instanceinfo[instance]
node_drbd[minor] = (, instance.admin_up)
if instance not in instanceinfo:
feedback_fn(" - ERROR: ghost instance '%s' in temporary DRBD map" %
# ghost instance should not be running, but otherwise we
# don't give double warnings (both ghost instance and
# unallocated minor in use)
node_drbd[minor] = (instance, False)
instance = instanceinfo[instance]
node_drbd[minor] = (, instance.admin_up)
result = self._VerifyNode(node_i, file_names, local_checksums,
nresult, feedback_fn, master_files,
node_drbd, vg_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