From 90d81eba2d136721bdf33557e5cb5dbd931c954b Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Tue, 26 Jan 2016 17:35:25 +0100 Subject: [PATCH] makebuildserver: settable vm boot timeout, plus longer default On slow machines or VMs like the Debian jenkins box, the VM boot timeout needs to be a lot longer, otherwise vagrant times out before setting up the VM. --- examples/makebuildserver.config.py | 6 ++++++ makebuildserver | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/examples/makebuildserver.config.py b/examples/makebuildserver.config.py index 1d4bd0d3..cc536844 100644 --- a/examples/makebuildserver.config.py +++ b/examples/makebuildserver.config.py @@ -38,3 +38,9 @@ # Set to True if your base box is 64 bit (e.g. testing32.box isn't) # arch64 = True + +# If this is running on an older machine or on a virtualized system, +# it can run a lot slower. If the provisioning fails with a warning +# about the timeout, extend the timeout here. (default: 600 seconds) +# +# boot_timeout = 1200 diff --git a/makebuildserver b/makebuildserver index d876a004..aeb5ebbc 100755 --- a/makebuildserver +++ b/makebuildserver @@ -54,6 +54,7 @@ config = { 'https://f-droid.org/jessie32.box', ], 'debian_mirror': 'http://http.debian.net/debian/', + 'boot_timeout': 600, 'cachedir': cachedir, 'cpus': 1, 'memory': 3584, @@ -353,11 +354,14 @@ Vagrant.configure("2") do |config| v.customize ["modifyvm", :id, "--cpus", "{3}"] end + config.vm.boot_timeout = {4} + config.vm.provision :shell, :path => "fixpaths.sh" """.format(config['basebox'], baseboxurl, config['memory'], - config.get('cpus', 1)) + config.get('cpus', 1), + config['boot_timeout']) if 'aptproxy' in config and config['aptproxy']: vagrantfile += """ config.vm.provision :shell, :inline => 'sudo echo "Acquire::http {{ Proxy \\"{0}\\"; }};" > /etc/apt/apt.conf.d/02proxy && sudo apt-get update' -- 2.30.2