1

Why does head -n 1 /var/log/cloud-init.log show the following,

util.py[DEBUG]: Cloud-init v. 21.2-3-g899bfaa9-0ubuntu2~20.04.1 running 'init-local' at Fri, 21 Jan 2022 18:03:44 +0000. Up 48.49 seconds.

Indicating clearly it's Cloud-init v. 21.2-3 but likewise

# /usr/bin/cloud-init --version
/usr/bin/cloud-init 21.4-0ubuntu1~20.04.1

Indicates it's version cloud-init 21.4. Why does one say 21.4 and the other 21.2?


This is a follow up to cloud-init.log shows write_files.0: Additional properties are not allowed ('defer' was unexpected)

1
  • 1
    One function of cloud-init is applying security upgrades. I would check the log to see if it upgrades itself.
    – jordanm
    Mar 17, 2022 at 14:35

1 Answer 1

2

Cloud-init ran as version 21.2 but has since been upgraded to 21.4.

The update might have been a manual sudo apt update && sudo apt upgrade, or it may have upgraded itself.

Sidenote: Your image comes with old versions of cloud-init. To get the latest features and bugfixes, I would suggest sourcing an Ubuntu image of 20.04 with a more recent version of cloud-init. Release 22.1 has been released upstream already and is currently being tested for release into Ubuntu (expected release into Ubuntu within the next couple of weeks).

2
  • It would be a really great idea if they made that run first, and then reexec itself with the newer cloud-init. Mar 17, 2022 at 14:48
  • 1
    I understand the frustration, but I disagree. Cloud-init executes before networking is even up, so it couldn't do it "first". Additionally, this could lead to bugs that are very hard to reproduce, prevent, and reason about. Mar 17, 2022 at 14:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .