Hello,
After upgrading to latest Kali 2024.1 we noticed that cloud-init status started to exit with error code 2. Upon closer inspection, and confirming it with cloud-init developers, we found the following problematic keys:
- /etc/cloud/cloud.cfg:
- reset_rmc
- refresh_rmc_and_interface
- /etc/cloud/cloud.cfg.d/01_debian_cloud.cfg
- apt_preserve_sources_list
root@kali:~# cloud-init status --long ; echo $?
status: done
extended_status: degraded done
boot_status_code: enabled-by-generator
last_update: Wed, 10 Apr 2024 14:13:52 +0000
detail: DataSourceEc2Local
errors: []
recoverable_errors:
DEPRECATED:
- The following config key(s): ['apt_preserve_sources_list'] is deprecated in 22.1 and scheduled to be removed in 27.1.
- Support for combined old and new apt module keys is deprecated in 22.1 and scheduled to be removed in 27.1.
WARNING:
- Could not find module named cc_refresh_rmc_and_interface (searched ['cc_refresh_rmc_and_interface', 'cloudinit.config.cc_refresh_rmc_and_interface'])
2
Removing the rmc keys from cloud.cfg, and renaming apt_preserve_sources_list in 01_debian_cloud.cfg to preserve_sources_list allows cloud-init schema --system to pass, and cloud-init status to report a success exit code 0. |