cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pdube <...@git.apache.org>
Subject [GitHub] cloudstack pull request: Enhance VR performance
Date Tue, 19 Jan 2016 00:00:49 GMT
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.
---

Mime
View raw message