Package installation unreliable on systems without RTC
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Expired
|
Medium
|
Unassigned |
Bug Description
It seems that when you specify "packages:" to be installed in the cloud-init user-data, it attempts to update the repository files and install the packages straight away, without waiting for date/time to be synchronized through NTP.
This creates problems for systems without RTC (like the Raspberry Pi) that do not have valid date/time at that point yet, as apt throws a fit if the InRelease files are newer than current time.
==
Cloud-init v. 21.3-1-
Get:1 http://
Get:2 http://
Get:3 http://
Get:4 http://
Reading package lists...
E: Release file for http://
E: Release file for http://
E: Release file for http://
E: Release file for http://
==
Think you should wait until systemd reaches time-sync.target before doing anything through apt.
Yes, I think ordering 'cloud- final.service' after 'time-sync.target' would fix this issue.