From tashi-commits-return-414-apmail-incubator-tashi-commits-archive=incubator.apache.org@incubator.apache.org Tue Feb 28 00:20:28 2012 Return-Path: X-Original-To: apmail-incubator-tashi-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-tashi-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8FF55993A for ; Tue, 28 Feb 2012 00:20:28 +0000 (UTC) Received: (qmail 75440 invoked by uid 500); 28 Feb 2012 00:20:28 -0000 Delivered-To: apmail-incubator-tashi-commits-archive@incubator.apache.org Received: (qmail 75416 invoked by uid 500); 28 Feb 2012 00:20:28 -0000 Mailing-List: contact tashi-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: tashi-dev@incubator.apache.org Delivered-To: mailing list tashi-commits@incubator.apache.org Received: (qmail 75408 invoked by uid 99); 28 Feb 2012 00:20:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Feb 2012 00:20:28 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_FRT_STOCK2 X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Feb 2012 00:20:26 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id B9DAE23888E4; Tue, 28 Feb 2012 00:20:05 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1294409 - /incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py Date: Tue, 28 Feb 2012 00:20:05 -0000 To: tashi-commits@incubator.apache.org From: stroucki@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120228002005.B9DAE23888E4@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: stroucki Date: Tue Feb 28 00:20:05 2012 New Revision: 1294409 URL: http://svn.apache.org/viewvc?rev=1294409&view=rev Log: qemu: readlink only works on links, follow links until resolved Modified: incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py Modified: incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py?rev=1294409&r1=1294408&r2=1294409&view=diff ============================================================================== --- incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py (original) +++ incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py Tue Feb 28 00:20:05 2012 @@ -132,7 +132,10 @@ class Qemu(VmControlInterface): def __getHostPids(self): """Utility function to get a list of system PIDs that match the QEMU_BIN specified (/proc/nnn/exe)""" pids = [] - real_bin = os.readlink(self.QEMU_BIN) + real_bin = self.QEMU_BIN + while os.path.islink(real_bin): + real_bin = os.readlink(self.QEMU_BIN) + for f in os.listdir("/proc"): try: bin = os.readlink("/proc/%s/exe" % (f))