script/vagrant: Change plugins_sync_backend to nfs for clearlinux

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Ie00ca3d18ebbe94baa272da1bca4baf43df6903a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3110
Community-CI: Mellanox Build Bot
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Maciej Wawryk 2020-06-29 11:46:30 +02:00 committed by Tomasz Zawadzki
parent 14ce25ab00
commit 2ba684aa20

View File

@ -59,7 +59,7 @@ Vagrant.configure(2) do |config|
# service so use sshfs+rsync combo instead.
plugins_sync_backend = {type: :sshfs}
files_sync_backend = {type: "rsync", rsync__auto: false}
if distro.include? "freebsd"
if (distro.include? "freebsd") || (distro.include? "clearlinux")
plugins_sync_backend = {type: :nfs, nfs_udp: false}
files_sync_backend = {type: :nfs, nfs_udp: false, mount_options: ['ro']}
end
@ -117,11 +117,12 @@ Vagrant.configure(2) do |config|
end
end
# freebsd boxes in order to have spdk sources synced from host properly
# will use NFS with "ro" option enabled to prevent changes on host filesystem.
# freebsd and clearlinux boxes in order to have spdk sources synced from
# host properly will use NFS with "ro" option enabled to prevent changes
# on host filesystem.
# To make sources usable in the guest VM we need to unmount them and use
# local copy.
if distro.include?("freebsd")
if distro.include? "freebsd"
$freebsd_spdk_repo = <<-SCRIPT
sudo -s
cp -R /home/vagrant/spdk_repo/spdk /tmp/spdk
@ -130,6 +131,15 @@ Vagrant.configure(2) do |config|
chown -R vagrant:vagrant /home/vagrant/spdk_repo/spdk
SCRIPT
config.vm.provision "shell", inline: $freebsd_spdk_repo
elsif distro.include? "clearlinux"
$clearlinux_spdk_repo = <<-SCRIPT
sudo -s
cp -R /home/vagrant/spdk_repo/spdk /tmp/spdk
umount /home/vagrant/spdk_repo/spdk && rm -rf /home/vagrant/spdk_repo/spdk
mv /tmp/spdk /home/vagrant/spdk_repo/spdk
chown -R clear:clear /home/vagrant/spdk_repo/spdk
SCRIPT
config.vm.provision "shell", inline: $clearlinux_spdk_repo
end
config.ssh.forward_agent = true