Public bug reported:
---- Summary -----
Ubuntu Release:
Distributor ID: Ubuntu
Description: Ubuntu 20.04.6 LTS
Release: 20.04
Codename: focal
Package Version: 24.1.3-0ubuntu1~20.04.1
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-0ubuntu1~20.04.1 if you
have Python 3.9.5 install on Ubuntu Focal (20.04)
To reproduce:
Verify that you have python 3.9.5 and a previously working copy of
cloud-init:
root@ip-SOME-IP-ADDRESS:~# python --version
Python 3.9.5
root@ip-SOME-IP-ADDRESS:~# dpkg --list | grep cloud-init
ii cloud-init 23.4.4-0ubuntu0~20.04.1 all
initialization and customization tool for cloud instances
ii cloud-initramfs-copymods 0.45ubuntu2 all
copy initramfs modules into root filesystem for later use
ii cloud-initramfs-dyn-netconf 0.45ubuntu2 all
write a network interface file in /run for BOOTIF
Restart service to confirm it can persist:
root@ip-SOME-IP-ADDRESS:~# systemctl restart cloud-init
root@ip-SOME-IP-ADDRESS:~# systemctl status cloud-init
● cloud-init.service - Initial cloud-init job (metadata service crawler)
Loaded: loaded (/lib/systemd/system/cloud-init.service; enabled; vendor
preset: enabled)
Active: active (exited) since Thu 2024-05-16 22:31:38 EDT; 4s ago
Process: 412986 ExecStart=/usr/bin/cloud-init init (code=exited,
status=0/SUCCESS)
Main PID: 412986 (code=exited, status=0/SUCCESS)
Tasks: 0 (limit: 18814)
Memory: 168.0K
CGroup: /system.slice/cloud-init.service
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 IPv6 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-SOME-IP-ADDRESS:~# apt install cloud-init
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://deb.MYCOMPANYREPO.com/REPOPROVIDER/MYCOMPANYREPO-ubuntu-release-virtual
focal-updates/main amd64 cloud-init all 24.1.3-0ubuntu1~20.04.1 [563 kB]
Fetched 563 kB in 0s (1603 kB/s)
Preconfiguring packages ...
(Reading database ... 170522 files and directories currently installed.)
Preparing to unpack .../cloud-init_24.1.3-0ubuntu1~20.04.1_all.deb ...
Unpacking cloud-init (24.1.3-0ubuntu1~20.04.1) over (23.4.4-0ubuntu0~20.04.1)
...
Setting up cloud-init (24.1.3-0ubuntu1~20.04.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] ?
Installing new version of config file /etc/cloud/cloud.cfg.d/05_logging.cfg ...
Installing new version of config file /etc/cloud/templates/chrony.conf.cos.tmpl
...
Installing new version of config file
/etc/cloud/templates/chrony.conf.debian.tmpl ...
Installing new version of config file
/etc/cloud/templates/chrony.conf.ubuntu.tmpl ...
Installing new version of config file /etc/cloud/templates/hosts.alpine.tmpl ...
Installing new version of config file /etc/cloud/templates/hosts.mariner.tmpl
...
Installing new version of config file /etc/cloud/templates/ntp.conf.ubuntu.tmpl
...
Installing new version of config file
/etc/cloud/templates/sources.list.ubuntu.deb822.tmpl ...
Installing new version of config file /etc/profile.d/Z99-cloud-locale-test.sh
...
Removing obsolete conffile /etc/cloud/clean.d/README ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for rsyslog (8.2001.0-1ubuntu1.3) ...
root@ip-SOME-IP-ADDRESS:~# systemctl status cloud-init
● cloud-init.service - Initial cloud-init job (metadata service crawler)
Loaded: loaded (/lib/systemd/system/cloud-init.service; enabled; vendor
preset: enabled)
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.slice/cloud-init.service
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/system/cloud-init.service:19: Unknown key name
'ConditionEnvironment' in section 'Unit', ignoring.
May 16 22:32:05 ip-SOME-IP-ADDRESS systemd[1]:
/lib/systemd/system/cloud-init.service:19: Unknown key name
'ConditionEnvironment' in section 'Unit', ignoring.
Now restart. You will see it will return a failure:
root@ip-SOME-IP-ADDRESS:~# systemctl restart cloud-init
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-SOME-IP-ADDRESS:~# systemctl status cloud-init
● cloud-init.service - Initial cloud-init job (metadata service crawler)
Loaded: loaded (/lib/systemd/system/cloud-init.service; enabled; vendor
preset: enabled)
Active: failed (Result: exit-code) since Thu 2024-05-16 22:32:18 EDT; 2s
ago
Process: 413683 ExecStart=/usr/bin/cloud-init init (code=exited,
status=1/FAILURE)
Main PID: 413683 (code=exited, status=1/FAILURE)
May 16 22:32:18 ip-SOME-IP-ADDRESS cloud-init[413683]: File
"/usr/lib/python3/dist-packages/cloudinit/stages.py", line 34, in <module>
May 16 22:32:18 ip-SOME-IP-ADDRESS cloud-init[413683]: from
cloudinit.handlers.jinja_template import JinjaTemplatePartHandler
May 16 22:32:18 ip-SOME-IP-ADDRESS cloud-init[413683]: File
"/usr/lib/python3/dist-packages/cloudinit/handlers/jinja_template.py", line 14,
in <module>
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/python3/dist-packages/cloudinit/templater.py", line 21, in <module>
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]: ModuleNotFoundError: No
module named 'jinja2'
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-SOME-IP-ADDRESS:~# dpkg --list | grep cloud-init
ii cloud-init 24.1.3-0ubuntu1~20.04.1 all
initialization and customization tool for cloud instances
ii cloud-initramfs-copymods 0.45ubuntu2 all
copy initramfs modules into root filesystem for later use
ii cloud-initramfs-dyn-netconf 0.45ubuntu2 all
write a network interface file in /run for BOOTIF
Workaround:
We downgraded to 23.4.4-0ubuntu0~20.04.1 and put the package on hold
(pinned ubuntu version)
Actual Behavior: cloud-init did not, in fact, (re)start up successfully
after an update.
** Affects: cloud-init (Ubuntu)
Importance: Undecided
Status: New
** Description changed:
---- Summary -----
Ubuntu Release:
Distributor ID: Ubuntu
Description: Ubuntu 20.04.6 LTS
Release: 20.04
Codename: focal
Package Version: 24.1.3-0ubuntu1~20.04.1
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-0ubuntu1~20.04.1 if you
have Python 3.9.5 install on Ubuntu Focal (20.04)
To reproduce:
Verify that you have python 3.9.5 and a previously working copy of
cloud-init:
root@ip-SOME-IP-ADDRESS:~# python --version
Python 3.9.5
root@ip-SOME-IP-ADDRESS:~# dpkg --list | grep cloud-init
ii cloud-init 23.4.4-0ubuntu0~20.04.1 all
initialization and customization tool for cloud instances
ii cloud-initramfs-copymods 0.45ubuntu2 all
copy initramfs modules into root filesystem for later use
ii cloud-initramfs-dyn-netconf 0.45ubuntu2 all
write a network interface file in /run for BOOTIF
Restart service to confirm it can persist:
root@ip-SOME-IP-ADDRESS:~# systemctl restart cloud-init
root@ip-SOME-IP-ADDRESS:~# systemctl status cloud-init
● cloud-init.service - Initial cloud-init job (metadata service crawler)
- Loaded: loaded (/lib/systemd/system/cloud-init.service; enabled; vendor
preset: enabled)
- Active: active (exited) since Thu 2024-05-16 22:31:38 EDT; 4s ago
- Process: 412986 ExecStart=/usr/bin/cloud-init init (code=exited,
status=0/SUCCESS)
- Main PID: 412986 (code=exited, status=0/SUCCESS)
- Tasks: 0 (limit: 18814)
- Memory: 168.0K
- CGroup: /system.slice/cloud-init.service
+ Loaded: loaded (/lib/systemd/system/cloud-init.service; enabled; vendor
preset: enabled)
+ Active: active (exited) since Thu 2024-05-16 22:31:38 EDT; 4s ago
+ Process: 412986 ExecStart=/usr/bin/cloud-init init (code=exited,
status=0/SUCCESS)
+ Main PID: 412986 (code=exited, status=0/SUCCESS)
+ Tasks: 0 (limit: 18814)
+ Memory: 168.0K
+ CGroup: /system.slice/cloud-init.service
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 IPv6 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-SOME-IP-ADDRESS:~# apt install cloud-init
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
- cloud-init
+ 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://deb.MYCOMPANYREPO.com/REPOPROVIDER/MYCOMPANYREPO-ubuntu-release-virtual
focal-updates/main amd64 cloud-init all 24.1.3-0ubuntu1~20.04.1 [563 kB]
Fetched 563 kB in 0s (1603 kB/s)
Preconfiguring packages ...
(Reading database ... 170522 files and directories currently installed.)
Preparing to unpack .../cloud-init_24.1.3-0ubuntu1~20.04.1_all.deb ...
Unpacking cloud-init (24.1.3-0ubuntu1~20.04.1) over (23.4.4-0ubuntu0~20.04.1)
...
Setting up cloud-init (24.1.3-0ubuntu1~20.04.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.
+ ==> 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/cloud.cfg.d/05_logging.cfg
...
Installing new version of config file
/etc/cloud/templates/chrony.conf.cos.tmpl ...
Installing new version of config file
/etc/cloud/templates/chrony.conf.debian.tmpl ...
Installing new version of config file
/etc/cloud/templates/chrony.conf.ubuntu.tmpl ...
Installing new version of config file /etc/cloud/templates/hosts.alpine.tmpl
...
Installing new version of config file /etc/cloud/templates/hosts.mariner.tmpl
...
Installing new version of config file
/etc/cloud/templates/ntp.conf.ubuntu.tmpl ...
Installing new version of config file
/etc/cloud/templates/sources.list.ubuntu.deb822.tmpl ...
Installing new version of config file /etc/profile.d/Z99-cloud-locale-test.sh
...
Removing obsolete conffile /etc/cloud/clean.d/README ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for rsyslog (8.2001.0-1ubuntu1.3) ...
root@ip-SOME-IP-ADDRESS:~# systemctl status cloud-init
● cloud-init.service - Initial cloud-init job (metadata service crawler)
- Loaded: loaded (/lib/systemd/system/cloud-init.service; enabled; vendor
preset: enabled)
- 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.slice/cloud-init.service
+ Loaded: loaded (/lib/systemd/system/cloud-init.service; enabled; vendor
preset: enabled)
+ 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.slice/cloud-init.service
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/system/cloud-init.service:19: Unknown key name
'ConditionEnvironment' in section 'Unit', ignoring.
May 16 22:32:05 ip-SOME-IP-ADDRESS systemd[1]:
/lib/systemd/system/cloud-init.service:19: Unknown key name
'ConditionEnvironment' in section 'Unit', ignoring.
Now restart. You will see it will return a failure:
root@ip-SOME-IP-ADDRESS:~# systemctl restart cloud-init
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-SOME-IP-ADDRESS:~# systemctl status cloud-init
● cloud-init.service - Initial cloud-init job (metadata service crawler)
- Loaded: loaded (/lib/systemd/system/cloud-init.service; enabled; vendor
preset: enabled)
- Active: failed (Result: exit-code) since Thu 2024-05-16 22:32:18 EDT; 2s
ago
- Process: 413683 ExecStart=/usr/bin/cloud-init init (code=exited,
status=1/FAILURE)
- Main PID: 413683 (code=exited, status=1/FAILURE)
+ Loaded: loaded (/lib/systemd/system/cloud-init.service; enabled; vendor
preset: enabled)
+ Active: failed (Result: exit-code) since Thu 2024-05-16 22:32:18 EDT; 2s
ago
+ Process: 413683 ExecStart=/usr/bin/cloud-init init (code=exited,
status=1/FAILURE)
+ Main PID: 413683 (code=exited, status=1/FAILURE)
May 16 22:32:18 ip-SOME-IP-ADDRESS cloud-init[413683]: File
"/usr/lib/python3/dist-packages/cloudinit/stages.py", line 34, in <module>
May 16 22:32:18 ip-SOME-IP-ADDRESS cloud-init[413683]: from
cloudinit.handlers.jinja_template import JinjaTemplatePartHandler
May 16 22:32:18 ip-SOME-IP-ADDRESS cloud-init[413683]: File
"/usr/lib/python3/dist-packages/cloudinit/handlers/jinja_template.py", line 14,
in <module>
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/python3/dist-packages/cloudinit/templater.py", line 21, in <module>
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]: ModuleNotFoundError:
No module named 'jinja2'
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-SOME-IP-ADDRESS:~# dpkg --list | grep cloud-init
ii cloud-init 24.1.3-0ubuntu1~20.04.1 all
initialization and customization tool for cloud instances
ii cloud-initramfs-copymods 0.45ubuntu2 all
copy initramfs modules into root filesystem for later use
ii cloud-initramfs-dyn-netconf 0.45ubuntu2 all
write a network interface file in /run for BOOTIF
-
Workaround:
We downgraded to 23.4.4-0ubuntu0~20.04.1 and put the package on hold
(pinned ubuntu version)
-
Actual Behavior: cloud-init did not, in fact, (re)start up successfully
after an update.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2066066
Title:
cloud-init startup failure with Python 3.9.5, Ubuntu Focal
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/2066066/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs