1d8cda2 sanlock: fix time calculations for dead host

Authored and Committed by teigland 11 months ago
    sanlock: fix time calculations for dead host
    
    In two places, incorrect time values were used in the
    dead host calculation:
    - When checking if a shared lease holder was dead.
    - When reporting host state flags for info queries.
    
    In both cases, the current local time was compared to
    the local time of the last succesful renewal, with the
    difference compared to other_host_dead_seconds.
    Using the current local time is incorrect, because it
    doesn't necessarily correspond to the time when the
    other lease was checked, e.g. if local renewals were
    delayed.  It must compare the local times of two
    consecutive, successful reads of the other lease.
    If the other lease is unchanged in this interval,
    then the difference can be correctly compared to
    other_host_dead_seconds to determine a host is dead.
    
    (The host dead calculation in paxos_lease_acquire,
    the most important check, was correct.)
    
    New debug messages are added for other host_id lease
    renewals, which can be controlled with debug_hosts
    in sanlock.conf.
    
        
file modified
+2 -0
file modified
+122 -32
file modified
+13 -0
file modified
+149 -31
file modified
+9 -0
file modified
+3 -0
file modified
+3 -0