Skip to content

set_hostname and hostname cause reboot loop #172

Open

Description

@roflhouse

I am running 1_1_6 and have noticed that set_hostname and hostname are constantly setting the hostname and rebooting the machine during deployment. Eventually the loop gets broken by something and it continues but it is adding 3-10 mins to my VMs launching.

I have also noticed this is some kind of race condition. Sometimes it will go right through but others it will reboot 30 times.

here is the snippet from the log which is repeated many times. Disabling the reboot functionality of cloud init works but some of these options like hostname change requires a reboot to actually work.

2025-08-25 20:58:06.805 5412 INFO cloudbaseinit.utils.hostname [-] Setting hostname: jump-lax
2025-08-25 20:58:07.061 5412 INFO cloudbaseinit.init [-] Rebooting
2025-08-25 20:58:07.162 4984 INFO cloudbaseinit.init [-] Process execution ended with exit code: 0

Activity

  1. ader1990 commented on Sep 11, 2025

    @ader1990
    Member

    Hello,

    The hostname rename can be run every time if the metadata provider does not work as expected. Can you please provide the cloudbase-init config files and the full logs?

    Thanks.

  2. roflhouse commented on Sep 15, 2025

    @roflhouse
    Author

    Here is an example of me using the set_hostname option in cloudinit. I will try and get a version which uses the plugin and not the set_hostname way as well but this will take some more time. The behavior is exactly the same just calling it through the plugin instead. I have confirmed that if i remove the set_hostname and sethostname plugin then the boot time is 3.5 mins and only requires 2-3 reboots, not the 30+ reboots and the 20-30 mins i am seeing.

    Logs.zip

  3. roflhouse commented on Oct 14, 2025

    @roflhouse
    Author

    Any updates on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions