diff options
Diffstat (limited to 'cloudinit/sources')
-rw-r--r-- | cloudinit/sources/DataSourceCloudStack.py | 3 | ||||
-rw-r--r-- | cloudinit/sources/DataSourceConfigDrive.py | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/cloudinit/sources/DataSourceCloudStack.py b/cloudinit/sources/DataSourceCloudStack.py index 455a4652..4ba019df 100644 --- a/cloudinit/sources/DataSourceCloudStack.py +++ b/cloudinit/sources/DataSourceCloudStack.py @@ -206,7 +206,8 @@ def get_latest_lease(): 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: diff --git a/cloudinit/sources/DataSourceConfigDrive.py b/cloudinit/sources/DataSourceConfigDrive.py index 3fa62ef3..52a9f543 100644 --- a/cloudinit/sources/DataSourceConfigDrive.py +++ b/cloudinit/sources/DataSourceConfigDrive.py @@ -155,7 +155,7 @@ class DataSourceConfigDrive(openstack.SourceMixin, sources.DataSource): return True - def check_instance_id(self): + def check_instance_id(self, sys_cfg): # quickly (local check only) if self.instance_id is still valid return sources.instance_id_matches_system_uuid(self.get_instance_id()) |