vagrantfile: remove disk path of OSD nodes

osd node's disks will remain on vagrant host,when run "vagrant destroy",
because we use time as a part of disk path, and time on delete not equal time on create.

we already use random_hostname in Libvirt backend,it will create disk
use the hostname as a part of diskname. for example: vagrant_osd2_1539159988_065f15e3e1fa6ceb0770-hda.qcow2.

Signed-off-by: binhong.hua <binhong.hua@gmail.com>
pull/3230/head
binhong.hua 2018-10-10 23:24:30 +08:00 committed by Guillaume Abrioux
parent 60bc1e38db
commit dc020058a3
1 changed files with 1 additions and 3 deletions

4
Vagrantfile vendored
View File

@ -2,7 +2,6 @@
# vi: set ft=ruby : # vi: set ft=ruby :
require 'yaml' require 'yaml'
require 'time'
VAGRANTFILE_API_VERSION = '2' VAGRANTFILE_API_VERSION = '2'
config_file=File.expand_path(File.join(File.dirname(__FILE__), 'vagrant_variables.yml')) config_file=File.expand_path(File.join(File.dirname(__FILE__), 'vagrant_variables.yml'))
@ -33,7 +32,6 @@ DEBUG = settings['debug']
ASSIGN_STATIC_IP = !(BOX == 'openstack' or BOX == 'linode') ASSIGN_STATIC_IP = !(BOX == 'openstack' or BOX == 'linode')
DISABLE_SYNCED_FOLDER = settings.fetch('vagrant_disable_synced_folder', false) DISABLE_SYNCED_FOLDER = settings.fetch('vagrant_disable_synced_folder', false)
DISK_UUID = Time.now.utc.to_i
ansible_provision = proc do |ansible| ansible_provision = proc do |ansible|
@ -516,7 +514,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# always make /dev/sd{a/b/c} so that CI can ensure that # always make /dev/sd{a/b/c} so that CI can ensure that
# virtualbox and libvirt will have the same devices to use for OSDs # virtualbox and libvirt will have the same devices to use for OSDs
(0..2).each do |d| (0..2).each do |d|
lv.storage :file, :device => "hd#{driverletters[d]}", :path => "disk-#{i}-#{d}-#{DISK_UUID}.disk", :size => '50G', :bus => "ide" lv.storage :file, :device => "hd#{driverletters[d]}", :size => '50G', :bus => "ide"
end end
lv.memory = MEMORY lv.memory = MEMORY
lv.random_hostname = true lv.random_hostname = true