5
0
mirror of git://git.proxmox.com/git/pve-storage.git synced 2025-01-24 02:04:13 +03:00
Fiona Ebner acff89540a nfs: check connection: support NFSv4-only servers without rpcbind
by simply doing a ping with the expected port as a fallback when the
rpcinfo command fails.

The timeout was chosen to be 2 seconds, because that's what the
existing callers of tcp_ping() in the iSCSI and GlusterFS plugins use.

Alternatively, the existing check could be replaced, but that would
1. Dumb down the check.
2. Risk breakage in some corner case that's yet to be discovered.
3. It would still be necessary to use rpcinfo (or dumb the check down
even further) in case port=0; from 'man 5 nfs' about the NFSv4 'port'
option:
> If the specified port value is 0, then the NFS client uses the NFS
> service port number advertised by the server's rpcbind service.

Reported in the community forum:
https://forum.proxmox.com/threads/118466/post-524449
https://forum.proxmox.com/threads/120774/

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-01-24 17:17:35 +01:00
2023-01-11 16:47:33 +01:00
2021-11-09 17:02:29 +01:00
Description
No description provided
2.1 MiB
Languages
Perl 99.2%
Makefile 0.7%