I have several CoreOS instances on GCE. I configure them with --metadata-from-file user-data=my-cloud-config.yaml
Last week, I found that I had the wrong hostname for one of my rabbit instances. So, I vi'd the .service file in /etc/systemd/system, did a systemctl daemon-reload, followed by systemctl restart myservice.service. All was well. Now I realize I shouldn't just be hacking on the service files as there are a million more elegant solutions, but it was production, I was in a hurry and it worked.
Until ...
When CoreOS did an auto-update, I found it restarted my docker service, as expected, but it seemed to reload the original configuration from my-cloud-config.yaml and did not preserve the ugly vi hack on the service file. The result? A hundred thousand messages backed up on Rabbit. Ugh.
Is this normal behavior? When CoreOS updates, does it go back in time, grab the original cloud-config and discard any changes I might have manually of made in the .service files? And perhaps more importantly, the next time I do some misguided ugly service-file hack, do I need to hack it in both the service file and wherever GCE puts the original cloud-config.yaml file?