Description of problem: cloud-init does not make the hostname ec2 metadata changes permanent in /etc/sysconfig/network. Instead it follows the default behavior for Ubuntu and stores the hostname in /etc/hostname. Version-Release number of selected component (if applicable): cloud-init-0.6.2-0.7.bzr457.fc16.noarc How reproducible: every time Steps to Reproduce: 1. yum install cloud-init 2. /usr/bin/cloud-init start 3. cat /etc/hostname ; cat /etc/sysconfig/network-scripts Actual results: /etc/hostname contains the hostname supplied via the ec2 metadata call http://169.254.169.254/latest/meta-data/hostname. /etc/sysconfig/network is unchanged Expected results: I expect the hostname supplied by ec2 meta data to be stored in /etc/sysconfig/network and not /etc/hostname Additional info: /usr/lib/python2.7/site-packages/cloudinit/CloudConfig/cc_set_hostname.py def set_hostanme is the culprit. This needs to be changed to store HOSTNAME=<data from ec2 metadata call> in /etc/sysconfig/network Sorry - I do not have a patch yet.
Storing a value in /etc/hostname is the correct method for persisting the hostname of a system that runs systemd, which consults /etc/sysconfig/network only as a fallback when /etc/hostname does not exist. What problem are you trying to solve? Are hostnames given in cloud-config not persisting properly?
The main cause of this problem seems to be a bug in systemd's transaction ordering that has since been fixed. Since Fedora's EC2 image uses packages from the release without updates, this bug will still occur until a new image is created. Even when that problem is fixed, however, there is another bug that may prevent this from working: /usr/bin/cloud-init returns with the wrong code on EC2, which does not affect upstream's upstart tasks but *does* affect Fedora's systemd units. This was recently fixed with code that should appear in the next update. Sorry for the wait.
cloud-init-0.6.3-0.1.bzr532.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/cloud-init-0.6.3-0.1.bzr532.fc17
cloud-init-0.6.3-0.1.bzr532.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/cloud-init-0.6.3-0.1.bzr532.fc16
Package cloud-init-0.6.3-0.1.bzr532.fc16: * should fix your issue, * was pushed to the Fedora 16 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing cloud-init-0.6.3-0.1.bzr532.fc16' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-3330/cloud-init-0.6.3-0.1.bzr532.fc16 then log in and leave karma (feedback).
cloud-init-0.6.3-0.1.bzr532.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.
cloud-init-0.6.3-0.1.bzr532.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.