From patchwork Thu Sep 12 09:31:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Williams X-Patchwork-Id: 19994 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f69.google.com (mail-qe0-f69.google.com [209.85.128.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8234720F59 for ; Thu, 12 Sep 2013 09:31:26 +0000 (UTC) Received: by mail-qe0-f69.google.com with SMTP id 1sf8813227qec.0 for ; Thu, 12 Sep 2013 02:31: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=V4Bj8HVuxRdAHeoV7RGHWEKUtQ6FtlcZntly2guaQyc=; b=GtD584eWNYx4o/Pzo/awyxXk7mG8Fz6Bl2hlqqaM+IIkJ+KLLI55trlmMAYgzFUuA3 XmFKnC7cf9sK0GgdeUnszWCeYkyGDwrlrFEL57FZlwKTzeL4yvuIyFF1FHKqJp4WwKCt G+lzLBNeH9VUBabU4HpCQcHlYxqVjWAvdhN4u+G2hmLa0Yc9tzj3C/JoQLA6vA9gGxTZ nEGdDLouUyGVuSRBe/rG9HlH8BLM8Zjf7Ve+EadmahNhCF6iG62Kabvz8dnHuNmD8SlP c8vGpXHf3OfoCSKhAJgF/lRVXWG9lsQpHTpTqS/q8oLuA/OJerJQHV8yvWNpTuOm3wQJ Oqhg== X-Gm-Message-State: ALoCoQnPCyI5Ft32CzVo+34IxVtHXLC59MWDb6Le5wDdGvOmGmJ3rjmOuVRvf7o3cB49+7Jqr+GQ X-Received: by 10.236.135.79 with SMTP id t55mr2422865yhi.39.1378978286325; Thu, 12 Sep 2013 02:31:26 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.53.103 with SMTP id a7ls564106qep.90.gmail; Thu, 12 Sep 2013 02:31:26 -0700 (PDT) X-Received: by 10.220.244.132 with SMTP id lq4mr70797vcb.31.1378978286066; Thu, 12 Sep 2013 02:31:26 -0700 (PDT) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id oh2si907753vcb.85.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Sep 2013 02:31:25 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.175; Received: by mail-vc0-f175.google.com with SMTP id ia10so6931596vcb.20 for ; Thu, 12 Sep 2013 02:31:25 -0700 (PDT) X-Received: by 10.52.165.131 with SMTP id yy3mr764701vdb.25.1378978285843; Thu, 12 Sep 2013 02:31: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 u4csp9223vcz; Thu, 12 Sep 2013 02:31:25 -0700 (PDT) X-Received: by 10.194.219.1 with SMTP id pk1mr5243840wjc.36.1378978284557; Thu, 12 Sep 2013 02:31:24 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id lu5si8070096wic.2.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 12 Sep 2013 02:31: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 1VK3FE-0001Ai-2R for ; Thu, 12 Sep 2013 09:31:24 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 06431E0554 for ; Thu, 12 Sep 2013 09:31:24 +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: 264 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-scheduler/trunk] Rev 264: Neil Williams 2013-09-12 Fix #1224033 by raising an exception if the group_size would be one or l... Message-Id: <20130912093124.27707.64217.launchpad@ackee.canonical.com> Date: Thu, 12 Sep 2013 09:31:24 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: list X-Generated-By: Launchpad (canonical.com); Revision="16761"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: d187d88c168d9a2296b97e6a16301c29f094e7a1 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.220.175 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/group-size-limit/+merge/185217 proposed by: Neil Williams (codehelp) review: Approve - Senthil Kumaran S (stylesen) ------------------------------------------------------------ revno: 264 [merge] committer: Neil Williams branch nick: lava-scheduler timestamp: Thu 2013-09-12 10:30:32 +0100 message: Neil Williams 2013-09-12 Fix #1224033 by raising an exception if the group_size would be one or less in a MultiNode job. Fix import syntax of original MP. 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-09-12 07:07:01 +0000 +++ lava_scheduler_app/utils.py 2013-09-12 09:30:32 +0000 @@ -22,6 +22,7 @@ import socket import urlparse import simplejson +import models def rewrite_hostname(result_url): @@ -74,6 +75,8 @@ group_count = 0 for clients in json_jobdata["device_group"]: group_count += int(clients["count"]) + if group_count <= 1: + raise models.JSONDataError("Only one device requested in a MultiNode job submission.") for clients in json_jobdata["device_group"]: role = str(clients["role"]) count = int(clients["count"])