From patchwork Tue Sep 3 11:41:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Williams X-Patchwork-Id: 19706 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f198.google.com (mail-ve0-f198.google.com [209.85.128.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BDC8024869 for ; Tue, 3 Sep 2013 11:41:29 +0000 (UTC) Received: by mail-ve0-f198.google.com with SMTP id 15sf6445877vea.5 for ; Tue, 03 Sep 2013 04:41:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mime-version:to:from:subject :message-id:date:reply-to:sender:errors-to:precedence :x-original-sender:x-original-authentication-results:mailing-list :list-id:list-post:list-help:list-archive:list-unsubscribe :content-type; bh=/DZZe5SyigJB5VekVPALFHRIX8EZ9QWb3E21p3Bb1ck=; b=maKzP6FTUf1eU4yeQHCuyVAwde1WQ5sKWm9VLvXd6dQ6VCz2Osq3Mi1aqROCUl5ekC qcrAD4VEClf6FkD7JAv9/bnBztFqm4BfaWr6Fso36AlNUOTrTzJhwWiFbP6irv2vG5hN YskDrWFsGWqNmVkBwZv8GrWUmyaZ6GMH/4HUqCpxvkmyfrzo0KFAATKT+F+DVJehAN+d uXbXWgU40Nxv7qmJhRlbsIlr6NycDMI5UoZXBMWetvg4v0kutukRnxy6ns+6aQeg/liO lUrzFrxx4Mi/sE8XMvq8dlddBl1ODY3KGXZW7JThk7Y3jYBdHdk9ge2hdyX3Fy2+ax2C 3EQQ== X-Received: by 10.236.116.135 with SMTP id g7mr451964yhh.53.1378208489247; Tue, 03 Sep 2013 04:41:29 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.82.114 with SMTP id h18ls2489132qey.12.gmail; Tue, 03 Sep 2013 04:41:29 -0700 (PDT) X-Received: by 10.220.91.16 with SMTP id k16mr7986967vcm.21.1378208489060; Tue, 03 Sep 2013 04:41:29 -0700 (PDT) Received: from mail-vb0-f41.google.com (mail-vb0-f41.google.com [209.85.212.41]) by mx.google.com with ESMTPS id ui8si4340684vcb.79.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Sep 2013 04:41:29 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.41 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.41; Received: by mail-vb0-f41.google.com with SMTP id g17so3945508vbg.28 for ; Tue, 03 Sep 2013 04:41:29 -0700 (PDT) X-Gm-Message-State: ALoCoQkdiP8ezy2tHfVBptaFRfnlsOAcz1RwPwxLT5iKJ5vFVTynGaptLpZ+zENW6lWS8XDrGkou X-Received: by 10.220.10.194 with SMTP id q2mr27605388vcq.2.1378208488879; Tue, 03 Sep 2013 04:41:28 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp166139vcz; Tue, 3 Sep 2013 04:41:27 -0700 (PDT) X-Received: by 10.180.182.74 with SMTP id ec10mr18025087wic.4.1378208487229; Tue, 03 Sep 2013 04:41:27 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id ef5si6961290wic.16.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 03 Sep 2013 04:41:27 -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; Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1VGoz8-0004Y4-Lj for ; Tue, 03 Sep 2013 11:41:26 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 976D0EB55B for ; Tue, 3 Sep 2013 11:41:26 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: lava-scheduler X-Launchpad-Branch: ~linaro-validation/lava-scheduler/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 258 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-scheduler/trunk] Rev 258: Neil Williams 2013-09-02 Fix regression in #1202285 Message-Id: <20130903114126.26788.90819.launchpad@ackee.canonical.com> Date: Tue, 03 Sep 2013 11:41:26 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: list X-Generated-By: Launchpad (canonical.com); Revision="16753"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 4226443931231ecd29605c7d53f9f27be51b5422 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: noreply@launchpad.net X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.41 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Merge authors: Neil Williams (codehelp) Related merge proposals: https://code.launchpad.net/~codehelp/lava-scheduler/regression-1202285/+merge/183498 proposed by: Neil Williams (codehelp) review: Approve - Antonio Terceiro (terceiro) ------------------------------------------------------------ revno: 258 [merge] committer: Neil Williams branch nick: lava-scheduler timestamp: Tue 2013-09-03 12:39:38 +0100 message: Neil Williams 2013-09-02 Fix regression in #1202285 by ensuring that the count of devices in roles which use the same device_type as another role is aggregated, not ignored. modified: lava_scheduler_app/utils.py --- lp:lava-scheduler https://code.launchpad.net/~linaro-validation/lava-scheduler/trunk You are subscribed to branch lp:lava-scheduler. To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-scheduler/trunk/+edit-subscription === modified file 'lava_scheduler_app/utils.py' --- lava_scheduler_app/utils.py 2013-08-28 09:34:40 +0000 +++ lava_scheduler_app/utils.py 2013-09-02 16:22:57 +0000 @@ -113,5 +113,8 @@ for device_group in job_data['device_group']: device_type = device_group['device_type'] count = device_group['count'] - requested_devices[device_type] = count + if device_type in requested_devices: + requested_devices[device_type] += count + else: + requested_devices[device_type] = count return requested_devices