From tashi-commits-return-351-apmail-incubator-tashi-commits-archive=incubator.apache.org@incubator.apache.org Thu Jan 26 19:54:40 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 101E59045 for ; Thu, 26 Jan 2012 19:54:40 +0000 (UTC) Received: (qmail 27752 invoked by uid 500); 26 Jan 2012 19:54:40 -0000 Delivered-To: apmail-incubator-tashi-commits-archive@incubator.apache.org Received: (qmail 27727 invoked by uid 500); 26 Jan 2012 19:54:39 -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 27717 invoked by uid 99); 26 Jan 2012 19:54:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Jan 2012 19:54:39 +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; Thu, 26 Jan 2012 19:54:37 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 62D5023888FE; Thu, 26 Jan 2012 19:54:17 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1236368 - /incubator/tashi/branches/stroucki-accounting/src/tashi/nodemanager/vmcontrol/qemu.py Date: Thu, 26 Jan 2012 19:54:17 -0000 To: tashi-commits@incubator.apache.org From: stroucki@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120126195417.62D5023888FE@eris.apache.org> Author: stroucki Date: Thu Jan 26 19:54:16 2012 New Revision: 1236368 URL: http://svn.apache.org/viewvc?rev=1236368&view=rev Log: qemu: don't leak fds to lvremove, quiet lvm commands Modified: incubator/tashi/branches/stroucki-accounting/src/tashi/nodemanager/vmcontrol/qemu.py Modified: incubator/tashi/branches/stroucki-accounting/src/tashi/nodemanager/vmcontrol/qemu.py URL: http://svn.apache.org/viewvc/incubator/tashi/branches/stroucki-accounting/src/tashi/nodemanager/vmcontrol/qemu.py?rev=1236368&r1=1236367&r2=1236368&view=diff ============================================================================== --- incubator/tashi/branches/stroucki-accounting/src/tashi/nodemanager/vmcontrol/qemu.py (original) +++ incubator/tashi/branches/stroucki-accounting/src/tashi/nodemanager/vmcontrol/qemu.py Thu Jan 26 19:54:16 2012 @@ -205,8 +205,8 @@ class Qemu(VmControlInterface): try: if self.scratchVg is not None: log.info("Removing any scratch for %s" % (name)) - cmd = "/sbin/lvremove -f %s" % self.scratchVg - result = subprocess.Popen(cmd.split(), executable=cmd.split()[0], stdout=subprocess.PIPE).wait() + cmd = "/sbin/lvremove --quiet -f %s" % self.scratchVg + result = subprocess.Popen(cmd.split(), executable=cmd.split()[0], stdout=subprocess.PIPE, close_fds=True).wait() except: pass @@ -463,7 +463,7 @@ class Qemu(VmControlInterface): scratchName = "lv%s" % instance.name # XXXstroucki hold lock # XXXstroucki check for capacity - cmd = "/sbin/lvcreate -n%s -L %dG %s" % (scratchName, scratchSize, self.scratchVg) + cmd = "/sbin/lvcreate --quiet -n%s -L %dG %s" % (scratchName, scratchSize, self.scratchVg) # XXXstroucki check result result = subprocess.Popen(cmd.split(), executable=cmd.split()[0], stdout=subprocess.PIPE).wait() index += 1