From 7f0b57c59fc90a83b4dafee48ff39902054907be Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Thu, 29 Mar 2012 17:04:44 +0000 Subject: [PATCH] Ensure that linux-headers-virtual is installed. Also linux-headers-`uname -r`. This is needed for the stable/diablo branch. And since apt-get doesn't know how to pull down the running version, dkms builds can fail if this isn't installed for the specific running version beforehand. The unversioned package will install the lastest version, but that may not be the kernel the image is currently running. Change-Id: Idb619ed57f6e101001fea3825c328b471d97e092 --- devstack-vm-gate-host.sh | 3 +++ devstack-vm-update-image.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/devstack-vm-gate-host.sh b/devstack-vm-gate-host.sh index 7d587e99..f3c2353c 100755 --- a/devstack-vm-gate-host.sh +++ b/devstack-vm-gate-host.sh @@ -34,6 +34,9 @@ if [ ! -w $DEST ]; then sudo chown `whoami` $DEST fi +# Make sure headers for the currently running kernel are installed: +sudo apt-get install -y --force-yes linux-headers-`uname -r` + # Hpcloud provides no swap, but does have a partition mounted at /mnt # we can use: if [ `cat /proc/meminfo | grep SwapTotal | awk '{ print $2; }'` -eq 0 ] && diff --git a/devstack-vm-update-image.py b/devstack-vm-update-image.py index 6abbe845..9abefbc8 100755 --- a/devstack-vm-update-image.py +++ b/devstack-vm-update-image.py @@ -153,7 +153,7 @@ def configure_server(server, branches): client = SSHClient(utils.get_public_ip(server), 'jenkins') client.ssh('make file cache directory', 'mkdir -p ~/cache/files') client.ssh('make pip cache directory', 'mkdir -p ~/cache/pip') - client.ssh('install build-essential', 'sudo apt-get install -y --force-yes build-essential python-dev') + client.ssh('install build-essential', 'sudo apt-get install -y --force-yes build-essential python-dev linux-headers-virtual linux-headers-`uname -r`') for branch_data in branches: client.ssh('cache debs for branch %s' % branch_data['name'],