001028 Fix: Correct output of "crm_resource --locate" in case of clones.

5 files Authored by Chris Lumens 4 years ago, Committed by Packit Service 4 years ago,
    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
    
    patch_name: 036-crm_resource.patch
    present_in_specfile: true
    location_in_specfile: 36
    squash_commits: true
    
        
file modified
+2 -2
file modified
+2 -1
file modified
+6 -1
file modified
+8 -15
file modified
+36 -15