← Back to team overview

cloud-init-dev team mailing list archive

[Merge] lp:~wido/cloud-init/cloudstack-dhcp into lp:cloud-init

 

Dan Watkins has proposed merging lp:~wido/cloud-init/cloudstack-dhcp into lp:cloud-init.

Requested reviews:
  cloud init development team (cloud-init-dev)
Related bugs:
  Bug #1576273 in cloud-init: "CloudStack datasource fails to find DHCP lease if IPv6 present"
  https://bugs.launchpad.net/cloud-init/+bug/1576273

For more details, see:
https://code.launchpad.net/~wido/cloud-init/cloudstack-dhcp/+merge/293379
-- 
Your team cloud init development team is requested to review the proposed merge of lp:~wido/cloud-init/cloudstack-dhcp into lp:cloud-init.
=== modified file 'cloudinit/sources/DataSourceCloudStack.py'
--- cloudinit/sources/DataSourceCloudStack.py	2016-04-04 16:31:28 +0000
+++ cloudinit/sources/DataSourceCloudStack.py	2016-04-29 10:50:55 +0000
@@ -206,7 +206,8 @@
     latest_mtime = -1
     latest_file = None
     for file_name in lease_files:
-        if file_name.endswith(".lease") or file_name.endswith(".leases"):
+        if file_name.startswith("dhclient.") and \
+           (file_name.endswith(".lease") or file_name.endswith(".leases")):
             abs_path = os.path.join(lease_d, file_name)
             mtime = os.path.getmtime(abs_path)
             if mtime > latest_mtime:


Follow ups