azure: /run/cloud-init/cloud-id broken symlink across reboot.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
High
|
Unassigned |
Bug Description
cloud-init 22.4.2
On Azure, datasource details change across reboot cloud-init incorrectly removes /run/cloud-
2022-12-07 04:14:17,920 - util.py[DEBUG]: Creating symbolic link from '/run/cloud-
2022-12-07 04:14:17,920 - util.py[DEBUG]: Attempting to remove /run/cloud-
# FRESH LAUNCH
ubuntu@
lrwxrwxrwx 1 root root 30 Dec 7 04:10 /run/cloud-
ubuntu@
2022-12-07 04:10:34,734 - util.py[DEBUG]: Writing to /run/cloud-
2022-12-07 04:10:34,735 - util.py[DEBUG]: Creating symbolic link from '/run/cloud-
# ACROSS REBOOT
ubuntu@
lrwxrwxrwx 1 root root 30 Dec 7 04:14 /run/cloud-
2022-12-07 04:14:17,920 - util.py[DEBUG]: Writing to /run/cloud-
2022-12-07 04:14:17,920 - util.py[DEBUG]: Creating symbolic link from '/run/cloud-
2022-12-07 04:14:17,920 - util.py[DEBUG]: Attempting to remove /run/cloud-
It looks like the symlink cleanup logic introduced in https:/
Debug logs added to https:/
2022-12-07 04:25:58,162 - __init_
Likely all we need is a correction in logic like the following:
diff --git a/cloudinit/
index 85e094ac5.
--- a/cloudinit/
+++ b/cloudinit/
@@ -439,8 +439,9 @@ class DataSource(
else:
- util.sym_
- if prev_cloud_id_file != cloud_id_file:
+ new_cloud_id_file = f"{cloud_
+ util.sym_
+ if prev_cloud_id_file != new_cloud_id_file:
json_file = self.paths.
Changed in cloud-init: | |
status: | New → Triaged |
importance: | Undecided → High |
tags: | added: bitesize |
This bug is believed to be fixed in cloud-init in version 23.1. If this is still a problem for you, please make a comment and set the state back to New
Thank you.