From patchwork Thu Feb 23 02:49:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael-Doyle Hudson X-Patchwork-Id: 6892 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 43C182447B for ; Thu, 23 Feb 2012 02:49:17 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id D97E5A18803 for ; Thu, 23 Feb 2012 02:49:16 +0000 (UTC) Received: by iabz7 with SMTP id z7so1289257iab.11 for ; Wed, 22 Feb 2012 18:49:16 -0800 (PST) Received: from mr.google.com ([10.50.163.71]) by 10.50.163.71 with SMTP id yg7mr1013893igb.26.1329965356383 (num_hops = 1); Wed, 22 Feb 2012 18:49:16 -0800 (PST) Received: by 10.50.163.71 with SMTP id yg7mr872673igb.26.1329965356306; Wed, 22 Feb 2012 18:49:16 -0800 (PST) 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.11.10 with SMTP id r10cs922ibr; Wed, 22 Feb 2012 18:49:15 -0800 (PST) Received: by 10.180.78.233 with SMTP id e9mr1521961wix.0.1329965353892; Wed, 22 Feb 2012 18:49:13 -0800 (PST) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id fa5si727900wib.22.2012.02.22.18.49.12 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 22 Feb 2012 18:49:13 -0800 (PST) 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 1S0Ok4-0002ul-Kx for ; Thu, 23 Feb 2012 02:49:12 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 8D7BBE03D7 for ; Thu, 23 Feb 2012 02:49:12 +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: 134 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-scheduler/trunk] Rev 134: change health enum names and set board to unknown health when onlining (Spring Zhang) Message-Id: <20120223024912.18697.92896.launchpad@ackee.canonical.com> Date: Thu, 23 Feb 2012 02:49:12 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="14838"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: ee052ec074028bd4f5b0ab5be12cfef9753cd64a X-Gm-Message-State: ALoCoQm+W5naGDcJH2tkDaJ2+ENpMj3B8cwsBf2/Mra7oEbJZv8krhE1hEmYXM8Li3HbQUWeVOyr Merge authors: Spring Zhang (qzhang) Related merge proposals: https://code.launchpad.net/~qzhang/lava-scheduler/set-unknown-when-online/+merge/93736 proposed by: Spring Zhang (qzhang) review: Approve - Michael Hudson-Doyle (mwhudson) ------------------------------------------------------------ revno: 134 [merge] committer: Michael Hudson-Doyle branch nick: trunk timestamp: Thu 2012-02-23 15:47:34 +1300 message: change health enum names and set board to unknown health when onlining (Spring Zhang) modified: lava_scheduler_app/models.py lava_scheduler_daemon/dbjobsource.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 2012-02-16 01:22:23 +0000 +++ lava_scheduler_app/models.py 2012-02-19 15:21:55 +0000 @@ -51,11 +51,11 @@ ) # A device health shows a device is ready to test or not - HEALTH_UNKNOWN, HEALTH_HEALTHY, HEALTH_SICK = range(3) + HEALTH_UNKNOWN, HEALTH_PASS, HEALTH_FAIL = range(3) HEALTH_CHOICES = ( (HEALTH_UNKNOWN, 'Unknown'), - (HEALTH_HEALTHY, 'Healthy'), - (HEALTH_SICK, 'Sick'), + (HEALTH_PASS, 'Pass'), + (HEALTH_FAIL, 'Fail'), ) hostname = models.CharField( @@ -132,6 +132,7 @@ created_by=user, device=self, old_state=self.status, new_state=new_status, message=reason, job=None).save() self.status = new_status + self.health_status = Device.HEALTH_UNKNOWN self.save() #@classmethod === modified file 'lava_scheduler_daemon/dbjobsource.py' --- lava_scheduler_daemon/dbjobsource.py 2012-02-10 20:08:25 +0000 +++ lava_scheduler_daemon/dbjobsource.py 2012-02-19 15:21:55 +0000 @@ -218,10 +218,10 @@ if job.health_check is True: device.last_health_report_job = job if job.status == TestJob.INCOMPLETE: - device.health_status = Device.HEALTH_SICK + device.health_status = Device.HEALTH_FAIL device.put_into_maintenance_mode(None, "Health Check Job Failed") elif job.status == TestJob.COMPLETE: - device.health_status = Device.HEALTH_HEALTHY + device.health_status = Device.HEALTH_PASS job.end_time = datetime.datetime.utcnow() token = job.submit_token