chiark / gitweb /
makebuildserver: settable vm boot timeout, plus longer default
authorHans-Christoph Steiner <hans@eds.org>
Tue, 26 Jan 2016 16:35:25 +0000 (17:35 +0100)
committerHans-Christoph Steiner <hans@eds.org>
Tue, 26 Jan 2016 16:47:17 +0000 (17:47 +0100)
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
makebuildserver

index 1d4bd0d3cca3726fe2693468e2c2a20fd9c4a001..cc536844b5dfb7dec8beaae02755dded096f0420 100644 (file)
@@ -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
index d876a004a1db8d602226d8e71b2c498afd79902f..aeb5ebbc60fad1fc59bd4c99f5a0e60c58dc8613 100755 (executable)
@@ -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'