e491921 - fix for bug #137021 ccs doesn't find most recent cluster.conf

Authored and Committed by Jonathan Brassow 19 years ago
    - fix for bug #137021 ccs doesn't find most recent cluster.conf
    
    This boiled down to a timing issue.  ccsd processes request serially (broadcast, or otherwise).
    
    When cman_tool was started, it issued a connect.  While not yet quorate, ccsd must broadcast to see if there are any more recent versions of the config file.  This happens as part of the connect.  select is used to set a timeout on just how long it waits for replies.
    
    2 problems were encountered.  1) the timeout was not being properly reset after the select returned.  2) everyone uses the same timeout
    
    What results is that if a connect is issued simultaneously on every node, they first try to process the connect - then any broadcast requests.  Because they all have the same timeout, they never recieve broadcast responses from their peers (because they are also stuck processing connects).
    
    The current solution is to add a random component to the timeout and make sure to set the timeout properly after the select returns.
    
        
file modified
+12 -7