cluster-api-provider-aws
cluster-api-provider-aws copied to clipboard
:bug: fix: properly restart cloud-init
What type of PR is this? /kind fix
What this PR does / why we need it:
It seems that systemctl restart clout-init is no longer sufficient to start the cloud-init process again with the secret userdata. After some googling I found the following steps to restart it without needing to reboot the machine. The step comes from here https://cloudinit.readthedocs.io/en/latest/howto/rerun_cloud_init.html
We should move towards an approach that doesn't require a restart of cloud-init to handle secret userdata.
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #5115
Special notes for your reviewer:
Checklist:
- [x] squashed commits
- [ ] includes documentation
- [ ] includes emojis
- [ ] adds unit tests
- [ ] adds or updates e2e tests
Release note:
fix: uses different commands to restart cloud-init