-
Notifications
You must be signed in to change notification settings - Fork 1
Description
At the risk of being told this is actually an upstream issue (!), I've noticed that setting package_update: true fails due to it running too early in the boot process (before Initial clock synchronization):
/var/log/cloud-init-output.log
Cloud-init v. 25.2 running 'modules:config' at Mon, 24 Nov 2025 02:07:38 +0000. Up 22.66 seconds.
Cloud-init v. 25.2 running 'modules:final' at Mon, 24 Nov 2025 02:07:38 +0000. Up 22.74 seconds.
2025-11-24 02:07:38,843 - modules.py[WARNING]: Could not find module named cc_netplan_nm_patch (searched ['cc_netplan_nm_patch', 'cloudinit.config.cc_netplan_nm_patch'])
Hit:1 http://deb.debian.org/debian trixie InRelease
Get:2 http://deb.debian.org/debian trixie-updates InRelease [47.3 kB]
Get:3 http://archive.raspberrypi.com/debian trixie InRelease [54.8 kB]
Get:4 http://deb.debian.org/debian-security trixie-security InRelease [43.4 kB]
Err:2 http://deb.debian.org/debian trixie-updates InRelease
Sub-process /usr/bin/sqv returned an error code (1), error message is: Verifying signature: Not live until 2025-12-13T07:44:39Z Verifying signature: Not live until 2025-12-13T07:45:11Z
Err:3 http://archive.raspberrypi.com/debian trixie InRelease
Sub-process /usr/bin/sqv returned an error code (1), error message is: Verifying signature: Not live until 2025-12-12T16:16:43Z
Err:4 http://deb.debian.org/debian-security trixie-security InRelease
Sub-process /usr/bin/sqv returned an error code (1), error message is: Verifying signature: Not live until 2025-12-12T12:01:29Z Verifying signature: Not live until 2025-12-12T12:01:29Z
Fetched 146 kB in 0s (1,157 kB/s)
Reading package lists...
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. OpenPGP signature verification failed: http://deb.debian.org/debian trixie-updates InRelease: Sub-process /usr/bin/sqv returned an error code (1), error message is: Verifying signature: Not live until 2025-12-13T07:44:39Z Verifying signature: Not live until 2025-12-13T07:45:11Z
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. OpenPGP signature verification failed: http://archive.raspberrypi.com/debian trixie InRelease: Sub-process /usr/bin/sqv returned an error code (1), error message is: Verifying signature: Not live until 2025-12-12T16:16:43Z
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. OpenPGP signature verification failed: http://deb.debian.org/debian-security trixie-security InRelease: Sub-process /usr/bin/sqv returned an error code (1), error message is: Verifying signature: Not live until 2025-12-12T12:01:29Z Verifying signature: Not live until 2025-12-12T12:01:29Z
W: Failed to fetch http://deb.debian.org/debian/dists/trixie-updates/InRelease Sub-process /usr/bin/sqv returned an error code (1), error message is: Verifying signature: Not live until 2025-12-13T07:44:39Z Verifying signature: Not live until 2025-12-13T07:45:11Z
W: Failed to fetch http://deb.debian.org/debian-security/dists/trixie-security/InRelease Sub-process /usr/bin/sqv returned an error code (1), error message is: Verifying signature: Not live until 2025-12-12T12:01:29Z Verifying signature: Not live until 2025-12-12T12:01:29Z
W: Failed to fetch http://archive.raspberrypi.com/debian/dists/trixie/InRelease Sub-process /usr/bin/sqv returned an error code (1), error message is: Verifying signature: Not live until 2025-12-12T16:16:43Z
W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Note this actually booted on Dec 13 12:22 — the 24 Nov 2025 02:07:38 time matches the image I'm using: 2025-11-24-raspios-trixie-arm64-lite.img, so is presumably the "last known time" it uses before contacting the time server.
journalctl
Nov 24 02:07:41 pi5 cloud-init[668]: Reading package lists...
Nov 24 02:07:41 pi5 cloud-init[668]: W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. OpenPGP signature verification failed: http://deb.debian.org/debian trixie-updates InRelease: Sub-process /usr/bin/sqv returned an error code (1), error message is: Verifying signature: Not live until 2025-12-13T07:44:39Z Verifying signature: Not live until 2025-12-13T07:45:11Z
Nov 24 02:07:41 pi5 cloud-init[668]: W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. OpenPGP signature verification failed: http://archive.raspberrypi.com/debian trixie InRelease: Sub-process /usr/bin/sqv returned an error code (1), error message is: Verifying signature: Not live until 2025-12-12T16:16:43Z
Nov 24 02:07:41 pi5 cloud-init[668]: W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. OpenPGP signature verification failed: http://deb.debian.org/debian-security trixie-security InRelease: Sub-process /usr/bin/sqv returned an error code (1), error message is: Verifying signature: Not live until 2025-12-12T12:01:29Z Verifying signature: Not live until 2025-12-12T12:01:29Z
Nov 24 02:07:41 pi5 cloud-init[668]: W: Failed to fetch http://deb.debian.org/debian/dists/trixie-updates/InRelease Sub-process /usr/bin/sqv returned an error code (1), error message is: Verifying signature: Not live until 2025-12-13T07:44:39Z Verifying signature: Not live until 2025-12-13T07:45:11Z
Nov 24 02:07:41 pi5 cloud-init[668]: W: Failed to fetch http://deb.debian.org/debian-security/dists/trixie-security/InRelease Sub-process /usr/bin/sqv returned an error code (1), error message is: Verifying signature: Not live until 2025-12-12T12:01:29Z Verifying signature: Not live until 2025-12-12T12:01:29Z
Nov 24 02:07:41 pi5 cloud-init[668]: W: Failed to fetch http://archive.raspberrypi.com/debian/dists/trixie/InRelease Sub-process /usr/bin/sqv returned an error code (1), error message is: Verifying signature: Not live until 2025-12-12T16:16:43Z
Nov 24 02:07:41 pi5 cloud-init[668]: W: Some index files failed to download. They have been ignored, or old ones used instead.
Nov 24 02:07:41 pi5 cloud-init[668]: Reading package lists...
Nov 24 02:07:41 pi5 cloud-init[668]: Building dependency tree...
Nov 24 02:07:41 pi5 cloud-init[668]: Reading state information...
Nov 24 02:07:42 pi5 cloud-init[668]: Calculating upgrade...
Nov 24 02:07:42 pi5 cloud-init[668]: 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[…]
Dec 13 12:22:13 pi5 systemd-timesyncd[416]: Contacted time server 178.62.68.79:123 (2.debian.pool.ntp.org).
Dec 13 12:22:13 pi5 systemd-timesyncd[416]: Initial clock synchronization to Sat 2025-12-13 12:22:13.715210 GMT.
I'm using dtoverlay=disable-bt,disable-wifi, I've applied patch #1 to fix issue #2, and I'm using an NVMe SSD for the OS rather than a memory card, all of which may be causing things to run a bit faster than usual, triggering these race conditions which may not otherwise be happening.
It also appears there are other risks from having the time sync while cloud-init is running: I see this log shortly after the clock sync occurs (which might be caused by me specifying packages: [vim], or by me using a few raspi-config commands in the runcmd section):
Dec 13 12:22:15 pi5 cloud-init[668]: ERROR: rpi-eeprom-update -d -i -f /tmp/tmp20d6wcmb/pieeprom.upd timeout
Which suggests the eeprom update is perhaps timing out based on wall clock time (I don't know what the timeout is supposed to be set to, but the system hasn't been running for very long at that point; maybe 30 seconds in total). Update: tracked down and reported this particular sub-issue on the eeprom repo raspberrypi/rpi-eeprom#790, but since many commands a user may add to runcmd may expect a somewhat stable wall clock time, it's probably best to make sure the time has synced (if possible) before running them anyway.