From patchwork Thu Sep 5 12:39:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Williams X-Patchwork-Id: 19771 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f71.google.com (mail-qa0-f71.google.com [209.85.216.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E423A24692 for ; Thu, 5 Sep 2013 12:39:26 +0000 (UTC) Received: by mail-qa0-f71.google.com with SMTP id hu16sf1958502qab.10 for ; Thu, 05 Sep 2013 05:39:26 -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=YCUO8D6I/T+WKGHC7StpqVXjwr8zfkG2pYkIUZc8u6o=; b=c1j2H0I4YWxwMOUhUt8bisUvjpac/jmLw23R8MRiigQEuQ1EG0HZHDlKRXMYU7ERxN 9Lex4hccyURjJhOUXl3WkiY9ONy7iAEJd9mdd3ZZ8kFnkgLchIXScMhrtIN+Zzp+V3qj rEbT+HCLZnDgQIUTvIKFKirVbK7DlX74FfRDT9Jst6IuC5AA+qdLhdH95ZyMMFaozq1D ZXq+zZUvK2NOY8FJn7524WCkbeEC+1IMkJFAIaarobBX4hLvmkkz1a07XJ3ei7VIfHZf 7Yl5y2b2Ig4+0FINK/XWFMQ9wW+7lcBPiY17a4/34cgBRlJ3m1WfD/Zc/R+y0WqwBAcj Z7pQ== X-Received: by 10.236.156.138 with SMTP id m10mr2958614yhk.26.1378384766227; Thu, 05 Sep 2013 05:39:26 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.4.41 with SMTP id h9ls470240qeh.79.gmail; Thu, 05 Sep 2013 05:39:26 -0700 (PDT) X-Received: by 10.52.173.200 with SMTP id bm8mr2450702vdc.10.1378384766106; Thu, 05 Sep 2013 05:39:26 -0700 (PDT) Received: from mail-vb0-f51.google.com (mail-vb0-f51.google.com [209.85.212.51]) by mx.google.com with ESMTPS id wp10si6735701vdb.32.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 05 Sep 2013 05:39:26 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.51 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.51; Received: by mail-vb0-f51.google.com with SMTP id x16so1104345vbf.10 for ; Thu, 05 Sep 2013 05:39:26 -0700 (PDT) X-Gm-Message-State: ALoCoQk7IVDbK7v2zap/hujz3jhfqIOtwRfGWDKetOCBjAfH6suleWcFlZW1Gm5/ajHg8oILIiMi X-Received: by 10.58.165.70 with SMTP id yw6mr7720949veb.19.1378384765978; Thu, 05 Sep 2013 05:39:25 -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 u4csp277718vcz; Thu, 5 Sep 2013 05:39:25 -0700 (PDT) X-Received: by 10.194.94.10 with SMTP id cy10mr141003wjb.66.1378384764672; Thu, 05 Sep 2013 05:39:24 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id gm6si3023080wib.47.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 05 Sep 2013 05:39:24 -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 1VHYqJ-0008Sh-Ud for ; Thu, 05 Sep 2013 12:39:23 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id D429BE05E4 for ; Thu, 5 Sep 2013 12:39:23 +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: 259 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-scheduler/trunk] Rev 259: Neil Williams 2013-09-04 Change to an explicit check for boards which Message-Id: <20130905123923.30909.58657.launchpad@ackee.canonical.com> Date: Thu, 05 Sep 2013 12:39:23 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: list X-Generated-By: Launchpad (canonical.com); Revision="16758"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 08c24e410bef52b35aa02ad8ec8a8df092cce154 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.51 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/submitting-offline/+merge/183854 proposed by: Neil Williams (codehelp) review: Approve - Neil Williams (codehelp) review: Approve - Antonio Terceiro (terceiro) ------------------------------------------------------------ revno: 259 [merge] committer: Neil Williams branch nick: lava-scheduler timestamp: Thu 2013-09-05 13:37:47 +0100 message: Neil Williams 2013-09-04 Change to an explicit check for boards which are offlining, reserved or already offline to allow job submission as long as the boards are not retired. Clarify exception message. Neil Williams 2013-09-03 Allow submission of jobs when devices are offline by only excluding devices which are retired from the calculation of available devices. modified: lava_scheduler_app/models.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/models.py' --- lava_scheduler_app/models.py 2013-09-02 15:42:27 +0000 +++ lava_scheduler_app/models.py 2013-09-04 14:46:59 +0000 @@ -62,7 +62,9 @@ device_types = DeviceType.objects.values_list('name').filter( models.Q(device__status=Device.IDLE) | models.Q(device__status=Device.RUNNING) | - models.Q(device__status=Device.RESERVED) + models.Q(device__status=Device.RESERVED) | + models.Q(device__status=Device.OFFLINE) | + models.Q(device__status=Device.OFFLINING) ).annotate( num_count=models.Count('name') ).order_by('name') @@ -79,7 +81,7 @@ continue else: raise DevicesUnavailableException( - "Required number of device(s) unavailable.") + "Requested %d %s device(s) - only %d available." % (count, board, all_devices[board])) return True