Commit 680ed635 authored by Pawel Piatek's avatar Pawel Piatek Committed by Jim Harris
Browse files

scripts/vagrant: revert to use sshfs by default



This partially revert commit edc93a24.
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: default avatarPawel Piatek <pawelx.piatek@intel.com>
Change-Id: I871fbfa0f33c35d7a2ed3c91d56b39112a5d21ca
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17352


Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: default avatarKarol Latecki <karol.latecki@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent e641e8f3
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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"]}

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
+6 −1
Original line number Diff line number Diff line
@@ -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