Hide Forgot
Description of problem: I am setting a short hostname in user data --- [fedora@gerritbot etc]$ curl http://169.254.169.254/2009-04-04/user-data #cloud-config hostname: gerritbot disable_root: 0 --- the system boots, and the hostname is set correctly, but /etc/hostname is not updated and remains the very long instance-name e.g. --- [fedora@gerritbot etc]$ cat hostname gerritbot-55968-blahblahblah-oslab-fedora19-20131119232722.noval [fedora@gerritbot etc]$ hostname gerritbot --- thus when the system reboots, it gets the incorrect value from /etc/hostname here is a grep of hostname related things in the logs --- [fedora@gerritbot etc]$ cat /var/log/cloud-init.log | grep hostname Nov 20 05:51:10 localhost [CLOUDINIT] importer.py[DEBUG]: Looking for modules ['cc_set_hostname', 'cloudinit.config.cc_set_hostname'] that have attributes ['handle'] Nov 20 05:51:10 localhost [CLOUDINIT] importer.py[DEBUG]: Found cc_set_hostname with attributes ['handle'] in ['cloudinit.config.cc_set_hostname'] Nov 20 05:51:10 localhost [CLOUDINIT] importer.py[DEBUG]: Looking for modules ['cc_update_hostname', 'cloudinit.config.cc_update_hostname'] that have attributes ['handle'] Nov 20 05:51:10 localhost [CLOUDINIT] importer.py[DEBUG]: Found cc_update_hostname with attributes ['handle'] in ['cloudinit.config.cc_update_hostname'] Nov 20 05:51:13 localhost [CLOUDINIT] util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-00000377/sem/config_set_hostname - wb: [420] 18 bytes Nov 20 05:51:13 localhost [CLOUDINIT] util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-00000377/sem/config_set_hostname (recursive=False) Nov 20 05:51:13 localhost [CLOUDINIT] util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-00000377/sem/config_set_hostname (recursive=False) Nov 20 05:51:13 localhost [CLOUDINIT] helpers.py[DEBUG]: Running config-set_hostname using lock (<FileLock using file '/var/lib/cloud/instances/i-00000377/sem/config_set_hostname'>) Nov 20 05:51:13 localhost [CLOUDINIT] cc_set_hostname.py[DEBUG]: Setting the hostname to gerritbot-55968-blahblahblah-oslab-fedora19-20131119232722.novalocal (gerritbot) Nov 20 05:51:13 localhost [CLOUDINIT] util.py[DEBUG]: Running command ['hostnamectl', 'set-hostname', 'gerritbot-55968-blahblahblah-oslab-fedora19-20131119232722.novalocal'] with allowed return codes [0] (shell=False, capture=True) Nov 20 05:51:13 localhost [CLOUDINIT] __init__.py[DEBUG]: Non-persistently setting the system hostname to gerritbot Nov 20 05:51:13 localhost [CLOUDINIT] util.py[DEBUG]: Running command ['hostname', 'gerritbot'] with allowed return codes [0] (shell=False, capture=True) Nov 20 05:51:13 localhost [CLOUDINIT] helpers.py[DEBUG]: Running config-update_hostname using lock (<cloudinit.helpers.DummyLock object at 0x2fce190>) Nov 20 05:51:13 localhost [CLOUDINIT] cc_update_hostname.py[DEBUG]: Updating hostname to gerritbot-55968-blahblahblah-oslab-fedora19-20131119232722.novalocal (gerritbot) Nov 20 05:51:13 localhost [CLOUDINIT] util.py[DEBUG]: Running command ['hostname'] with allowed return codes [0] (shell=False, capture=True) Nov 20 05:51:13 localhost [CLOUDINIT] __init__.py[DEBUG]: Attempting to update hostname to gerritbot-55968-blahblahblah-oslab-fedora19-20131119232722.novalocal in 1 files Nov 20 05:51:13 localhost [CLOUDINIT] util.py[DEBUG]: Running command ['hostnamectl', 'set-hostname', 'gerritbot-55968-blahblahblah-oslab-fedora19-20131119232722.novalocal'] with allowed return codes [0] (shell=False, capture=True) --- Version-Release number of selected component (if applicable): Installed Packages Name : cloud-init Arch : noarch Version : 0.7.2 Release : 1.fc19 Size : 1.0 M Repo : installed From repo : koji-override-0
Created attachment 826442 [details] full cloud-init log
I think this should work correctly in F20.
This is still occuring in the latest Fedora Atomic Image
This message is a notice that Fedora 19 is now at end of life. Fedora has stopped maintaining and issuing updates for Fedora 19. It is Fedora's policy to close all bug reports from releases that are no longer maintained. Approximately 4 (four) weeks from now this bug will be closed as EOL if it remains open with a Fedora 'version' of '19'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 19 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.