From patchwork Fri Jul 20 22:21:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Doan X-Patchwork-Id: 10161 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 213D419D1D2 for ; Fri, 20 Jul 2012 22:21:15 +0000 (UTC) Received: from mail-gh0-f180.google.com (mail-gh0-f180.google.com [209.85.160.180]) by fiordland.canonical.com (Postfix) with ESMTP id E4970A181CE for ; Fri, 20 Jul 2012 22:21:14 +0000 (UTC) Received: by mail-gh0-f180.google.com with SMTP id z12so4820357ghb.11 for ; Fri, 20 Jul 2012 15:21:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf :content-type:mime-version:x-launchpad-project:x-launchpad-branch :x-launchpad-message-rationale:x-launchpad-branch-revision-number :x-launchpad-notification-type:to:from:subject:message-id:date :reply-to:sender:errors-to:precedence:x-generated-by :x-launchpad-hash:x-gm-message-state; bh=E8AO3xMFkjA3YLpBl9Dv2ZrzY9+zj928yBbk5vn1Cnw=; b=YlQfA+2BYcfZqfUCNTLBtcBFrwNVgqtVPMlgm8l4RGXlKD3AnzQO+JVkh8mC3xuQ7U FXPFn86Oyh3WavkaHHkWQPJZOOYHyyx5D/j2+qlSFo0rSAk5PbNUqXsmxIl7ctn7f9cE Te+2NDuOdfZV0WxubN+tJo+pNNyyuQK2X86tN3CxT1ngaCS7E0Vz01cf85IRQVeDB4QT ggBhSdBzSE4pTqS7/FaA8kyIfRicxOOT240Acb5qT9GvOnLHMhpnpyEmIjtFTkpBFvE+ EW2xmAOh+lMIkBOtzGFZYjf2B+KPFKi9vmpwHfhG6DxTikkfLqEhdEjawJHhHa/yfrp2 KZUw== Received: by 10.50.158.129 with SMTP id wu1mr5611631igb.33.1342822874600; Fri, 20 Jul 2012 15:21:14 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.153.7 with SMTP id i7csp33814ibw; Fri, 20 Jul 2012 15:21:12 -0700 (PDT) Received: by 10.180.106.97 with SMTP id gt1mr29540929wib.5.1342822871781; Fri, 20 Jul 2012 15:21:11 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id f20si103900wiw.5.2012.07.20.15.21.10 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 20 Jul 2012 15:21:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) client-ip=91.189.90.7; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) smtp.mail=bounces@canonical.com Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1SsLZO-0001Mr-Ay for ; Fri, 20 Jul 2012 22:21:10 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 4884DE027C for ; Fri, 20 Jul 2012 22:21:10 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: lava-dispatcher X-Launchpad-Branch: ~linaro-validation/lava-dispatcher/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 351 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dispatcher/trunk] Rev 351: fix cache leak cause by revno 345 Message-Id: <20120720222110.29610.40276.launchpad@ackee.canonical.com> Date: Fri, 20 Jul 2012 22:21:10 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="15654"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 85ebd0db87af7009e712ec5e52a40b719f6ace4e X-Gm-Message-State: ALoCoQl59BgMGvqwam+Cd4BAkF6AdBV5g6Z5ON8RkB0/TGsecVavCsv1mhpWK5zY4zBMlr1F854q ------------------------------------------------------------ revno: 351 committer: Andy Doan branch nick: lava-dispatcher timestamp: Fri 2012-07-20 17:17:45 -0500 message: fix cache leak cause by revno 345 apparently we were never hitting the branch of code for an use_cache=false pre-built image. As can be seen here: http://validation.linaro.org/lava-server/scheduler/job/26005/log_file we are referencing the "lava_cachedir" value and it hadn't been set. Also, there was some logic about cache deletion that didn't work and wasn't needed modified: lava_dispatcher/client/master.py --- lp:lava-dispatcher https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk You are subscribed to branch lp:lava-dispatcher. To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk/+edit-subscription === modified file 'lava_dispatcher/client/master.py' --- lava_dispatcher/client/master.py 2012-07-12 05:55:34 +0000 +++ lava_dispatcher/client/master.py 2012-07-20 22:17:45 +0000 @@ -499,8 +499,8 @@ else: tarball_dir = mkdtemp(dir=LAVA_IMAGE_TMPDIR) os.chmod(tarball_dir, 0755) + lava_cachedir = self.context.lava_cachedir if self.context.job_data.get('health_check', False): - lava_cachedir = self.context.lava_cachedir if self._are_tarballs_cached(image, lava_cachedir): logging.info("Reusing cached tarballs") boot_tgz, root_tgz = self._get_cached_tarballs(image, tarball_dir, lava_cachedir) @@ -521,12 +521,6 @@ else: image_file = download_image(image, self.context, tarball_dir) boot_tgz, root_tgz = self._generate_tarballs(image_file) - # remove the cached tarballs - cache_loc = self._tarball_url_to_cache(image, lava_cachedir) - shutil.rmtree(cache_loc, ignore_errors=True) - # remove the cached image files - cache_loc = url_to_cache - shutil.rmtree(cache_loc, ignore_errors=True) except CriticalError: raise @@ -897,3 +891,4 @@ for line in range(1, len(boot_cmds)): self.proc.expect(bootloader_prompt, timeout=300) self.proc.sendline(boot_cmds[line]) +