Return-Path: X-Original-To: apmail-cloudstack-dev-archive@www.apache.org Delivered-To: apmail-cloudstack-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8A3AC1832B for ; Tue, 19 Jan 2016 00:00:50 +0000 (UTC) Received: (qmail 85912 invoked by uid 500); 19 Jan 2016 00:00:50 -0000 Delivered-To: apmail-cloudstack-dev-archive@cloudstack.apache.org Received: (qmail 85869 invoked by uid 500); 19 Jan 2016 00:00:50 -0000 Mailing-List: contact dev-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list dev@cloudstack.apache.org Received: (qmail 85858 invoked by uid 99); 19 Jan 2016 00:00:49 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jan 2016 00:00:49 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id C89C9E00FF; Tue, 19 Jan 2016 00:00:49 +0000 (UTC) From: pdube To: dev@cloudstack.apache.org Reply-To: dev@cloudstack.apache.org References: In-Reply-To: Subject: [GitHub] cloudstack pull request: Enhance VR performance Content-Type: text/plain Message-Id: <20160119000049.C89C9E00FF@git1-us-west.apache.org> Date: Tue, 19 Jan 2016 00:00:49 +0000 (UTC) Github user pdube commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1346#discussion_r50058474 --- Diff: systemvm/patches/debian/config/opt/cloud/bin/cs/CsDhcp.py --- @@ -96,29 +96,8 @@ def configure_server(self): self.conf.search(sline, line) def delete_leases(self): - changed = [] - leases = [] try: - for line in open(LEASES): - bits = line.strip().split(' ') - to = {"device": bits[0], - "mac": bits[1], - "ip": bits[2], - "host": bits[3:], - "del": False - } - changed.append(to) - - for v in changed: - if v['mac'] == to['mac'] or v['ip'] == to['ip'] or v['host'] == to['host']: - to['del'] = True - leases.append(to) - - for o in leases: - if o['del']: - cmd = "dhcp_release eth%s %s %s" % (o['device'], o['ip'], o['mac']) - logging.info(cmd) - CsHelper.execute(cmd) + open(LEASES, 'w').close() --- End diff -- This truncates the file, but what about the cmd that was executed before? Is that handled elsewhere? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---