autofs-5.1.3 - add some more debug logging to get_supported_ver_and_cost() From: Ian Kent Add some additional debug logging to get_supported_ver_and_cost() for failure cases. Signed-off-by: Ian Kent --- CHANGELOG | 1 + modules/replicated.c | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index a21da121..94e79a0c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -15,6 +15,7 @@ xx/xx/2017 autofs-5.1.4 - fix mount.nfs blocks on first mount. - fix some man page problems. - add some more debug logging to get_nfs_info(). +- add some more debug logging to get_supported_ver_and_cost(). 24/05/2017 autofs-5.1.3 ======================= diff --git a/modules/replicated.c b/modules/replicated.c index 86635ff1..7aa35ff6 100644 --- a/modules/replicated.c +++ b/modules/replicated.c @@ -615,16 +615,20 @@ static int get_supported_ver_and_cost(unsigned logopt, struct host *host, int ret = rpc_portmap_getclient(&pm_info, host->name, host->addr, host->addr_len, proto, RPC_CLOSE_DEFAULT); - if (ret) + if (ret) { + debug(logopt, "failed to get portmap client"); return 0; + } memset(&parms, 0, sizeof(struct pmap)); parms.pm_prog = NFS_PROGRAM; parms.pm_prot = rpc_info.proto; parms.pm_vers = vers; ret = rpc_portmap_getport(&pm_info, &parms, &rpc_info.port); - if (ret < 0) + if (ret < 0) { + debug(logopt, "failed to get service port"); goto done; + } } if (rpc_info.proto == IPPROTO_UDP) @@ -633,6 +637,7 @@ static int get_supported_ver_and_cost(unsigned logopt, struct host *host, status = rpc_tcp_getclient(&rpc_info, NFS_PROGRAM, vers); if (status == -EHOSTUNREACH) { status = 0; + debug(logopt, "host not reachable getting RPC client"); goto done; } else if (!status) { clock_gettime(CLOCK_MONOTONIC, &start);