I've been trying to launch a vanilla role::labs::mediawiki_vagrant for T257322: Provision test instance for "Templates" projects, and am stuck at the "Mounting NFS shared folders" step. Behavior is the same with both stretch and buster images.
The error is generally like this,
==> default: Mounting NFS shared folders... The following SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed! mount -o vers=3,udp,noatime,rsize=32767,wsize=32767,async 10.0.3.1:/srv/mediawiki-vagrant /vagrant result=$? if test $result -eq 0; then if test -x /sbin/initctl && command -v /sbin/init && /sbin/init 2>/dev/null --version | grep upstart; then /sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT=/vagrant fi else exit $result fi Stdout from the command: Stderr from the command: mesg: ttyname failed: Inappropriate ioctl for device mount.nfs: mount to NFS server '10.0.3.1:/srv/mediawiki-vagrant' failed: RPC Error: Unable to receive
One point worth investigating is that the client is trying to use NFSv3 (-o vers=3), but I believe we're only set up to support NFSv4. For example, in T241710 we've disabled rpcbind on the assumption that we can serve NFSv4 only.
Experimenting with commands inside the VM, I discovered:
$ mount.nfs4 -o async 10.0.3.1:/srv/mediawiki-vagrant /vagrant -> Succeeds!
However,
$ mount.nfs -o vers=3,async 10.0.3.1:/srv/mediawiki-vagrant /vagrant mount.nfs: mount to NFS server '10.0.3.1:/srv/mediawiki-vagrant' failed: RPC Error: Unable to receive $ mount.nfs4 -o udp,noatime,rsize=32767,wsize=32767,async 10.0.3.1:/srv/mediawiki-vagrant /vagrant mount.nfs4: mount to NFS server '10.0.3.1:/srv/mediawiki-vagrant' failed: RPC Error: Unable to receive
It looks like we need to configure the client to use TCP and NFSv4. Allegedly this can be done via settings[:nfs_shares].