Skip to content

Commit

Permalink
ceph-volume: vagrantfile runs storagectl once
Browse files Browse the repository at this point in the history
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 <adeza@redhat.com>
  • Loading branch information
Alfredo Deza authored and andrewschoen committed Aug 8, 2017
1 parent 89ccbd8 commit 476d1f5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/ceph-volume/ceph_volume/tests/functional/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -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}",
Expand Down

0 comments on commit 476d1f5

Please sign in to comment.