From: Alfredo Deza Date: Tue, 8 Aug 2017 15:07:02 +0000 (-0400) Subject: ceph-volume: vagrantfile runs storagectl once X-Git-Tag: v13.0.0~173^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=476d1f50b82f81addd0de218c57b773f81883b0f;p=ceph.git ceph-volume: vagrantfile runs storagectl once It assumes that if there is a disk left it has already run. This avoids issues when reloading/restarting machines with vagrant. Signed-off-by: Alfredo Deza --- diff --git a/src/ceph-volume/ceph_volume/tests/functional/Vagrantfile b/src/ceph-volume/ceph_volume/tests/functional/Vagrantfile index 351663595585..4a7949573a9a 100644 --- a/src/ceph-volume/ceph_volume/tests/functional/Vagrantfile +++ b/src/ceph-volume/ceph_volume/tests/functional/Vagrantfile @@ -333,9 +333,13 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # Virtualbox osd.vm.provider :virtualbox do |vb| # Create our own controller for consistency and to remove VM dependency - vb.customize ['storagectl', :id, - '--name', 'OSD Controller', - '--add', 'scsi'] + # but only do it once, otherwise it would fail when rebooting machines. + # We assume this has run if one disk was created before + unless File.exist?("disk-#{i}-0.vdi") + vb.customize ['storagectl', :id, + '--name', 'OSD Controller', + '--add', 'scsi'] + end (0..2).each do |d| vb.customize ['createhd', '--filename', "disk-#{i}-#{d}",