cloud-init startup failure with Python 3.9.5, Ubuntu Focal
This bug report will be marked for expiration in 50 days if no further activity occurs. (find out why)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init (Ubuntu) |
Incomplete
|
Undecided
|
Unassigned | ||
Focal |
Incomplete
|
Undecided
|
Unassigned |
Bug Description
---- Summary -----
Ubuntu Release:
Distributor ID: Ubuntu
Description: Ubuntu 20.04.6 LTS
Release: 20.04
Codename: focal
Package Version: 24.1.3-
Expected behavior: cloud-init should (re)start up successfully after an update.
Actual behavior: cloud-init did not (re)start up successfully after an update.
---- Summary -----
The details.
It appears that is a breaking change with 24.1.3-
To reproduce:
Verify that you have python 3.9.5 and a previously working copy of cloud-init:
root@ip-
Python 3.9.5
root@ip-
ii cloud-init 23.4.4-
ii cloud-initramfs
ii cloud-initramfs
Restart service to confirm it can persist:
root@ip-
root@ip-
● cloud-init.service - Initial cloud-init job (metadata service crawler)
Loaded: loaded (/lib/systemd/
Active: active (exited) since Thu 2024-05-16 22:31:38 EDT; 4s ago
Process: 412986 ExecStart=
Main PID: 412986 (code=exited, status=0/SUCCESS)
Tasks: 0 (limit: 18814)
Memory: 168.0K
CGroup: /system.
May 16 22:31:38 ip-SOME-IP-ADDRESS cloud-init[412990]: ci-info: +------
May 16 22:31:38 ip-SOME-IP-ADDRESS cloud-init[412990]: ci-info: +++++++
May 16 22:31:38 ip-SOME-IP-ADDRESS cloud-init[412990]: ci-info: +------
May 16 22:31:38 ip-SOME-IP-ADDRESS cloud-init[412990]: ci-info: | Route | Destination | Gateway | Interface | Flags |
May 16 22:31:38 ip-SOME-IP-ADDRESS cloud-init[412990]: ci-info: +------
May 16 22:31:38 ip-SOME-IP-ADDRESS cloud-init[412990]: ci-info: | 1 | fe80::/64 | :: | ens5 | U |
May 16 22:31:38 ip-SOME-IP-ADDRESS cloud-init[412990]: ci-info: | 3 | local | :: | ens5 | U |
May 16 22:31:38 ip-SOME-IP-ADDRESS cloud-init[412990]: ci-info: | 4 | multicast | :: | ens5 | U |
May 16 22:31:38 ip-SOME-IP-ADDRESS cloud-init[412990]: ci-info: +------
May 16 22:31:38 ip-SOME-IP-ADDRESS systemd[1]: Finished Initial cloud-init job (metadata service crawler).
Then upgrade:
root@ip-
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
cloud-init
1 upgraded, 0 newly installed, 0 to remove and 40 not upgraded.
Need to get 563 kB of archives.
After this operation, 55.3 kB of additional disk space will be used.
Get:1 https:/
Fetched 563 kB in 0s (1603 kB/s)
Preconfiguring packages ...
(Reading database ... 170522 files and directories currently installed.)
Preparing to unpack .../cloud-
Unpacking cloud-init (24.1.3-
Setting up cloud-init (24.1.3-
Configuration file '/etc/cloud/
==> 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] ?
Installing new version of config file /etc/cloud/
Installing new version of config file /etc/cloud/
Installing new version of config file /etc/cloud/
Installing new version of config file /etc/cloud/
Installing new version of config file /etc/cloud/
Installing new version of config file /etc/cloud/
Installing new version of config file /etc/cloud/
Installing new version of config file /etc/cloud/
Installing new version of config file /etc/profile.
Removing obsolete conffile /etc/cloud/
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for rsyslog (8.2001.
root@ip-
● cloud-init.service - Initial cloud-init job (metadata service crawler)
Loaded: loaded (/lib/systemd/
Active: active (exited) since Thu 2024-05-16 22:31:38 EDT; 35s ago
Main PID: 412986 (code=exited, status=0/SUCCESS)
Tasks: 0 (limit: 18814)
Memory: 168.0K
CGroup: /system.
May 16 22:31:38 ip-SOME-IP-ADDRESS cloud-init[412990]: ci-info: +------
May 16 22:31:38 ip-SOME-IP-ADDRESS cloud-init[412990]: ci-info: | Route | Destination | Gateway | Interface | Flags |
May 16 22:31:38 ip-SOME-IP-ADDRESS cloud-init[412990]: ci-info: +------
May 16 22:31:38 ip-SOME-IP-ADDRESS cloud-init[412990]: ci-info: | 1 | fe80::/64 | :: | ens5 | U |
May 16 22:31:38 ip-SOME-IP-ADDRESS cloud-init[412990]: ci-info: | 3 | local | :: | ens5 | U |
May 16 22:31:38 ip-SOME-IP-ADDRESS cloud-init[412990]: ci-info: | 4 | multicast | :: | ens5 | U |
May 16 22:31:38 ip-SOME-IP-ADDRESS cloud-init[412990]: ci-info: +------
May 16 22:31:38 ip-SOME-IP-ADDRESS systemd[1]: Finished Initial cloud-init job (metadata service crawler).
May 16 22:31:52 ip-SOME-IP-ADDRESS systemd[1]: /lib/systemd/
May 16 22:32:05 ip-SOME-IP-ADDRESS systemd[1]: /lib/systemd/
Now restart. You will see it will return a failure:
root@ip-
Job for cloud-init.service failed because the control process exited with error code.
See "systemctl status cloud-init.service" and "journalctl -xe" for details.
root@ip-
● cloud-init.service - Initial cloud-init job (metadata service crawler)
Loaded: loaded (/lib/systemd/
Active: failed (Result: exit-code) since Thu 2024-05-16 22:32:18 EDT; 2s ago
Process: 413683 ExecStart=
Main PID: 413683 (code=exited, status=1/FAILURE)
May 16 22:32:18 ip-SOME-IP-ADDRESS cloud-init[413683]: File "/usr/lib/
May 16 22:32:18 ip-SOME-IP-ADDRESS cloud-init[413683]: from cloudinit.
May 16 22:32:18 ip-SOME-IP-ADDRESS cloud-init[413683]: File "/usr/lib/
May 16 22:32:18 ip-SOME-IP-ADDRESS cloud-init[413683]: from cloudinit.templater import (
May 16 22:32:18 ip-SOME-IP-ADDRESS cloud-init[413683]: File "/usr/lib/
May 16 22:32:18 ip-SOME-IP-ADDRESS cloud-init[413683]: from jinja2 import TemplateSyntaxError
May 16 22:32:18 ip-SOME-IP-ADDRESS cloud-init[413683]: ModuleNotFoundE
May 16 22:32:18 ip-SOME-IP-ADDRESS systemd[1]: cloud-init.service: Main process exited, code=exited, status=1/FAILURE
May 16 22:32:18 ip-SOME-IP-ADDRESS systemd[1]: cloud-init.service: Failed with result 'exit-code'.
May 16 22:32:18 ip-SOME-IP-ADDRESS systemd[1]: Failed to start Initial cloud-init job (metadata service crawler).
root@ip-
ii cloud-init 24.1.3-
ii cloud-initramfs
ii cloud-initramfs
Workaround:
We downgraded to 23.4.4-
Actual Behavior: cloud-init did not, in fact, (re)start up successfully after an update.
description: | updated |
Changed in cloud-init (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Critical |
Changed in cloud-init (Ubuntu): | |
importance: | Critical → Undecided |
Note: We are running off the official Ubuntu provided image on AWS. Here is the URL and AMI
https:/ /console. aws.amazon. com/ec2/ home?region= us-east- 1#launchAmi= ami-0e3a6d8ff4c 8fe246