scripts/vagrant: revert to use sshfs by default

This partially revert commit edc93a246.
Vagrant nfs support is broken in a way it changes /etc/exports
file, but leaves there broken entries. Most probably there
is some kind of race condition.
Keep support for NFSv4 to use it by default if vagrant sshfs
plugin is not installed or if user force to use it.

Signed-off-by: Pawel Piatek <pawelx.piatek@intel.com>
Change-Id: I871fbfa0f33c35d7a2ed3c91d56b39112a5d21ca
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17352
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Pawel Piatek 2023-03-28 02:48:31 +02:00 committed by Jim Harris
parent e641e8f3f6
commit 680ed635b3
2 changed files with 12 additions and 2 deletions

View File

@ -323,7 +323,12 @@ distro_to_use = get_box_type(distro, force_distro)
# local VM we don't need to worry about saturating the local link so skip
# the compression to speed up the whole transfer.
files_sync_backend = {type: "rsync", rsync__auto: false, rsync__args: ["--archive", "--verbose", "--delete"]}
plugins_sync_backend = {type: :nfs, nfs_udp: false, nfs_version: 4}
if ENV['NFS4_BACKEND'] or not Vagrant.has_plugin?("vagrant-sshfs")
plugins_sync_backend = {type: :nfs, nfs_udp: false, nfs_version: 4}
else
plugins_sync_backend = {type: :sshfs}
end
Vagrant.configure(2) do |config|
config.vm.box = distro_to_use

View File

@ -48,6 +48,7 @@ display_help() {
echo " -a Copy spdk/autorun.sh artifacts from VM to host system."
echo " -d Deploy a test vm by provisioning all prerequisites for spdk autotest"
echo " -o Add network interface for openstack tests"
echo " -N Use NFSv4 backend"
echo " --qemu-emulator=<path> Path to custom QEMU binary. Only works with libvirt provider"
echo " --vagrantfiles-dir=<path> Destination directory to put Vagrantfile into."
echo " --package-box Install all dependencies for SPDK and create a local vagrant box version."
@ -97,10 +98,11 @@ VAGRANT_PACKAGE_BOX=0
VAGRANT_HUGE_MEM=0
VAGRANTFILE=$DIR/Vagrantfile
FORCE_DISTRO=false
NFS4_BACKEND=0
VAGRANT_BOX_VERSION=""
EXTRA_VAGRANTFILES=""
while getopts ":b:n:s:x:p:uvcraldoHhf-:" opt; do
while getopts ":b:n:s:x:p:uvcraldoHNhf-:" opt; do
case "${opt}" in
-)
case "${OPTARG}" in
@ -164,6 +166,9 @@ while getopts ":b:n:s:x:p:uvcraldoHhf-:" opt; do
f)
FORCE_DISTRO=true
;;
N)
NFS4_BACKEND=1
;;
*)
echo " Invalid argument: -$OPTARG" >&2
echo " Try: \"$0 -h\"" >&2