Commit 715a89c2 authored by Thomas Thrainer's avatar Thomas Thrainer
Browse files

Fix output of gnt-instance info after migration

After migrating a DRBD based instance, the output of gnt-instance info
was wrong wrt. DRBD minors. This patch fixes the output in such cases.
Signed-off-by: default avatarThomas Thrainer <>
Reviewed-by: default avatarHrvoje Ribicic <>
parent 2dc0acb9
......@@ -343,13 +343,17 @@ class LUInstanceQueryData(NoHooksLU):
# we change the snode then (otherwise we use the one passed in)
if dev.logical_id[0] == instance.primary_node:
snode_uuid = dev.logical_id[1]
snode_minor = dev.logical_id[4]
pnode_minor = dev.logical_id[3]
snode_uuid = dev.logical_id[0]
snode_minor = dev.logical_id[3]
pnode_minor = dev.logical_id[4]
drbd_info = {
"primary_node": node_uuid2name_fn(instance.primary_node),
"primary_minor": dev.logical_id[3],
"primary_minor": pnode_minor,
"secondary_node": node_uuid2name_fn(snode_uuid),
"secondary_minor": dev.logical_id[4],
"secondary_minor": snode_minor,
"port": dev.logical_id[2],
"secret": dev.logical_id[5],
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