]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: vagrantfile runs storagectl once
authorAlfredo Deza <adeza@redhat.com>
Tue, 8 Aug 2017 15:07:02 +0000 (11:07 -0400)
committerAndrew Schoen <aschoen@redhat.com>
Tue, 8 Aug 2017 15:18:45 +0000 (10:18 -0500)
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>
src/ceph-volume/ceph_volume/tests/functional/Vagrantfile

index 351663595585c5a34e89da0e8019943d8b7df35b..4a7949573a9a8e042fcabd3f760324c9eefe24b2 100644 (file)
@@ -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}",