HomeClusterLabs Projects

cfgtool: Fix link status display

Description

cfgtool: Fix link status display

instead of the nodeid, this displayed arbitrary values (usually '1')
from other cmap keys under nodelist.node.XX.

sscanf returns the number of conversions even on mismatch, e.g. it also
returns 1 for

nodelist.node.2.quorum_votes
nodelist.node.2.ring0_addr
nodelist.node.2.name
...

instead of just

nodelist.node.2.nodeid

which leads to the value of (at least) quorum_votes being stored in
nodeid_list in addition to the actual nodeid.

storing the returned int in a cs_error_t enum also potentially masks
errors, so just compare the result with the expectation directly.

Fixes: c0d14485c3ebdeb2332f7c48acd155163e5b7fc1

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>

Details

Provenance
Fabian Grünbichler <f.gruenbichler@proxmox.com>Authored on May 29 2019, 8:57 AM
jfriesseCommitted on May 30 2019, 9:23 AM
Parents
rC9bba026bcd99: knet: Use block_unlisted_ips
Branches
Unknown
Tags
Unknown

Event Timeline