View Issue Details

IDProjectCategoryView StatusLast Update
0009035Kali LinuxKali Package Bugpublic2024-12-17 14:41
Reporterdominik.borkowski Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status newResolutionopen 
Summary0009035: Upgrading Kali 2024.3 AMI to latest packages results in broken cloud-init service
Description

Kali 2024.3 ships with cloud-init 24.2, while upgrading it to 24.3-1 (and now 24.4-1 as of last week), results in this service reporting failure, and none of the modules in 'config' nor 'final' stages executing.

The problem was reported directly to cloud-init, and debugged with direct assistance from cloud-init developers as https://github.com/canonical/cloud-init/issues/5928 . Their analysis of the sparse log files and upgrade output identified the root cause: beginning with 24.3 there is an additional service, and upgrade process fails to enable it. Current guess is that somehow the upgrade process does not recognize system to be systemd based, and assumes systemV.

To replicate this issue:

  • use latest official Kali 2024.3 AMI
  • perform an upgrade to latest set of packages, or even just install latest cloud-init
  • reboot
  • observe cloud-init status --long to be reporting 'error' state, and none of the 'config' nor 'final' modules being executed per /var/log/cloud-init.log

I've tested Debian Stable AMI and upgrading to latest Testing package for cloud-init, and everything worked there: systemd service was enabled. On Kali it breaks, and this output illustrates the issue:

└─# apt upgrade
The following package was automatically installed and is no longer required:
  python3-serial
Use 'apt autoremove' to remove it.

Upgrading:
  cloud-init

Summary:
  Upgrading: 1, Installing: 0, Removing: 0, Not Upgrading: 0
  Download size: 654 kB
  Space needed: 84.0 kB / 4566 MB available

Continue? [Y/n] y
Get:1 http://kali.download/kali kali-rolling/main amd64 cloud-init all 24.4-1 [654 kB]
Fetched 654 kB in 0s (7206 kB/s)   
(Reading database ... 117950 files and directories currently installed.)
Preparing to unpack .../cloud-init_24.4-1_all.deb ...
Unpacking cloud-init (24.4-1) over (24.2-1) ...
dpkg: warning: unable to delete old directory '/etc/systemd/system/[email protected]': Directory not empty
Setting up cloud-init (24.4-1) ...

Configuration file '/etc/cloud/cloud.cfg'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** cloud.cfg (Y/I/N/O/D/Z) [default=N] ? Y
Installing new version of config file /etc/cloud/cloud.cfg ...
update-rc.d: We have no instructions for the cloud-init-main init script.
update-rc.d: It looks like a non-network service, we enable it.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2024-12-17 14:41 dominik.borkowski New Issue