Fix: Correct output of "crm_resource --locate" in case of clones.
For non-clone resources, the rsc parameter passed to
resource_search_list_* is accurate - it is the resource object for the
name given on the command line. For clone resources, this parameter is
incorrect. It will be a single instance of the clone resource, no
matter which instance might have been asked for on the command line.
This typically doesn't matter, but results in incorrect output when
promotable clones are searched for. For promotable clones, the "Master"
text may not appear for any of the instances. This is because the
single instance passed in as the rsc parameter might not be the master,
but each iteration through the loop will use that same parameter.
The fix is to change cli_resource_search to return a list of
node/promoted pairs so we we already have all the information we need.
Printing is then a simple matter of just walking that list.
The referenced bug has a much better explanation of the cause of the
problem.
See: rhbz#1925681