cloud-init 21.1-19-gbad84ad4-0ubuntu1~18.04.2 failing to properly detect first boot
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init (Ubuntu) |
Expired
|
Low
|
Unassigned |
Bug Description
I have found that when I upgrade to 21.1-19-
Version 21.1-19-
Looking through the `/var/log/
```
$ lsb_release -rd
Description: Ubuntu 18.04.5 LTS
Release: 18.04
```
Though, now I'm not sure if I understand what is happening. I see in the output of my AMI build that cloud-init was upgraded when I upgraded all packages. (And if I `hold` it, then this problem doesn't occur). But here, I think I see that the package is not installed?
```
$ apt-cache policy cloud-init
cloud-init:
Installed: (none)
Candidate: 21.1-19-
Version table:
21.
500 http://
100 /var/lib/
18.
500 http://
```
Thanks for filing this bug report and helping make cloud-init and ubuntu better.
Each time cloud-init boots, it creates semaphore files and caches the detected datasource so subsequent boots do not take an exhorbitant amount of time. I'm guessing it's your clone and launch that is seeing both the cached datasource and semophore files that is allowing the cloned VM to treat the next boot as dirty.
Generally, when cloning and creating your own AMIs, you need to run `sudo cloud-init clean --logs` to prior to cloning the AMI to make sure that the image is seen as "greenfield" or fresh when that image is next launched. That clean will remove all semaphores and cached artifacts and all full cloud-init setup and datasource detection.
If this does not resolve the problem for you. Please run 'sudo cloud-init collect-logs' and attach them to this bug, setting it back to "New".