Skip to content

apt.py will not attempt to install i386 packages on an amd64 system #7077

Description

@Kingwad

Bug report

On an amd64 systems with i386 architecture enabled, cloud-init will not install packages only available in i386

Steps to reproduce the problem

Enable i386 arch in early boot before apt update:

bootcmd:
- [ cloud-init-per, once, dpkgi386, dpkg, --add-architecture, i386]

Add package available to apt in i386

packages:
- steamcmd

cloud-init will not find the package to install. Package will install successfully from command line:

apt install steamcmd

Cause: cloud-init searches for packages using apt-cache pkgnames before attempting to install, which only lists packages for the primary architecture. Adding the --all-names flag to the call in apt.py does include packages for i386, but also includes virtual packages unavailable for installation.

Environment details

  • Cloud-init version: 25.1.4
  • Operating System Distribution: Debian 13 Trixie
  • Cloud provider, platform or installer type: vultr

cloud-init logs

2026-09-07 17:24:37,859 - apt.py[DEBUG]: The following packages were not found by APT so APT will not attempt to install them: ['steamcmd']
2026-09-07 17:24:37,859 - distros[INFO]: Failed to install the following packages: ['steamcmd']. See associated package manager logs for more details.
2026-09-07 17:24:37,859 - log_util.py[WARNING]: Failure when attempting to install packages: ['steamcmd']
2026-09-07 17:24:37,860 - log_util.py[DEBUG]: Failure when attempting to install packages: ['steamcmd']
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/cloudinit/config/cc_package_update_upgrade_install.py", line 95, in handle
cloud.distro.install_packages(pkglist)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/usr/lib/python3/dist-packages/cloudinit/distros/init.py", line 286, in install_packages
raise PackageInstallerError(error_message % total_failed)
cloudinit.distros.PackageInstallerError: Failed to install the following packages: {'steamcmd'}. See associated package manager logs for more details.
2026-09-07 17:24:37,863 - cc_package_update_upgrade_install.py[WARNING]: 1 failed with exceptions, re-raising the last one
2026-09-07 17:24:37,863 - handlers.py[DEBUG]: finish: modules-final/config-package-update-upgrade-install: FAIL: running config-package-update-upgrade-install with frequency once-per-instance
2026-09-07 17:24:37,863 - log_util.py[WARNING]: Running module package-update-upgrade-install (<module 'cloudinit.config.cc_package_update_upgrade_install' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_package_update_upgrade_install.py'>) failed
2026-09-07 17:24:37,864 - log_util.py[DEBUG]: Running module package-update-upgrade-install (<module 'cloudinit.config.cc_package_update_upgrade_install' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_package_update_upgrade_install.py'>) failed
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/cloudinit/config/modules.py", line 297, in _run_modules
ran, _r = cc.run(
~~~~~~^
run_name, mod.handle, func_args, freq=freq
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/lib/python3/dist-packages/cloudinit/cloud.py", line 71, in run
return self._runners.run(name, functor, args, freq, clear_on_fail)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/cloudinit/helpers.py", line 156, in run
results = functor(**args)
File "/usr/lib/python3/dist-packages/cloudinit/config/cc_package_update_upgrade_install.py", line 127, in handle
raise errors[-1]
File "/usr/lib/python3/dist-packages/cloudinit/config/cc_package_update_upgrade_install.py", line 95, in handle
cloud.distro.install_packages(pkglist)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/usr/lib/python3/dist-packages/cloudinit/distros/init.py", line 286, in install_packages
raise PackageInstallerError(error_message % total_failed)
cloudinit.distros.PackageInstallerError: Failed to install the following packages: {'steamcmd'}. See associated package manager logs for more details.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working correctlynewAn issue that still needs triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions