From f24a55f6505a87da0b0154d4a1245a84dbc0aa9a Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Tue, 7 Jul 2015 16:42:05 -0600 Subject: [PATCH] get_latest_image_version_deb(): run apt-get update When we were still using Chef, we accidentally ran it twice on downburst VMs during scheduled jobs: once before the kernel task, and once after. Now that we're using Ansible, and not running the one before, and because the kernel task is special and runs before most tasks (even the ansible task that might be part of the job), the kernel task might run before apt has refreshed its cache. This is more likely to be a problem on VMs, because their cache is certainly more stale, but could affect physical hosts as well. Make all deb-based systems update their cache before attempting to install a kernel. Signed-off-by: Zack Cerza --- teuthology/task/kernel.py | 1 + 1 file changed, 1 insertion(+) diff --git a/teuthology/task/kernel.py b/teuthology/task/kernel.py index 62634a6c65..bd4ba431f5 100644 --- a/teuthology/task/kernel.py +++ b/teuthology/task/kernel.py @@ -941,6 +941,7 @@ def get_latest_image_version_deb(remote, ostype): Round-about way to get the newest kernel uname -r compliant version string from the virtual package which is the newest kenel for debian/ubuntu. """ + remote.run(args=['sudo', 'apt-get', 'update']) output = StringIO() newest = '' # Depend of virtual package has uname -r output in package name. Grab that. -- 2.39.5