From 27711777d6cf1639f69d1e9afeaf88e80f7c162d Mon Sep 17 00:00:00 2001 From: "Peter V. Saveliev" Date: Thu, 23 Jun 2016 13:50:02 +0200 Subject: [PATCH] contrib/vagrant: fix env vars type conversion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Explicitly set type for integer environment variables: * VAGRANT_KURYR_VM_MEMORY * VAGRANT_KURYR_VM_CPUS Despite there is a fix in the Vagrant git repo for that issue, still exist systems where the issue is not fixed. On those systems trying to limit the VM memory one will get «no implicit conversion of String into Integer». Thus convert the environment variables to int explicitly. Change-Id: I80a39e0b072159b601dd8cadf839e596ea64e644 Bug-Url: https://github.com/vagrant-libvirt/vagrant-libvirt/issues/525 Bug-Url: https://github.com/vagrant-libvirt/vagrant-libvirt/pull/526 --- contrib/vagrant/Vagrantfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/vagrant/Vagrantfile b/contrib/vagrant/Vagrantfile index e697671f..66a0aa00 100644 --- a/contrib/vagrant/Vagrantfile +++ b/contrib/vagrant/Vagrantfile @@ -2,8 +2,8 @@ VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| - VM_MEMORY = ENV.fetch('VAGRANT_KURYR_VM_MEMORY', 6144) - VM_CPUS = ENV.fetch('VAGRANT_KURYR_VM_CPUS', 2) + VM_MEMORY = ENV.fetch('VAGRANT_KURYR_VM_MEMORY', 6144).to_i + VM_CPUS = ENV.fetch('VAGRANT_KURYR_VM_CPUS', 2).to_i RUN_DEVSTACK = ENV.fetch('VAGRANT_KURYR_RUN_DEVSTACK', 'true') config.vm.hostname = 'devstack'