replica-conncheck: log when failed to RPC connect

It's nearly impossible to find out what happened when doing
replica connection check and it fails during the RPC phase.
The error is now logged.

Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Stanislav Laznicka 2017-07-26 15:51:52 +02:00 committed by Pavel Vomacka
parent fc7e2565bd
commit 06fbf4b312

View File

@ -586,7 +586,8 @@ def main():
finally:
if api.Backend.rpcclient.isconnected():
api.Backend.rpcclient.disconnect()
except Exception:
except Exception as e:
logger.debug("RPC connection failed: %s", e)
logger.info("Retrying using SSH...")
# Ticket 5812 Always qualify requests for admin