Results 1 to 6 of 6

Thread: retaining hostname after new infrastructure

  1. #1

    retaining hostname after new infrastructure

    Greetings,

    After updating some of our SLES 11 sp3 AWS instances to use the new infrastructure (per instructions in this blog post: https://www.suse.com/communities/con...es-shellshock/) our instances no longer retain their hostname. After rebooting, our systems hostnames are reset. For example, our test box was called "susetest" but after a reboot:

    jfriesen@ip-10-16-31-137:~> hostname
    ip-10-16-31-137

    Even though in "yast network" --> Network Card --> Hostname/DNS we ensure that the "Change Hostname via DHCP" checkbox is de-selected. Every time we reboot now, we lose our hostnames, and it seems like no settings in yast can fix the problem. This was not an issue before the infrastructure change. Anyone have any ideas?

  2. #2

    Re: retaining hostname after new infrastructure

    On 10/08/2014 09:34 AM, monoclesys wrote:
    >
    > Greetings,
    >
    > After updating some of our SLES 11 sp3 AWS instances to use the new
    > infrastructure (per instructions in this blog post:
    > https://www.suse.com/communities/con...es-shellshock/)
    > our instances no longer retain their hostname. After rebooting, our
    > systems hostnames are reset. For example, our test box was called
    > "susetest" but after a reboot:
    >
    > jfriesen@ip-10-16-31-137:~> hostname
    > ip-10-16-31-137


    Besides unchecking that checkbox, did you set a new hostname value on the NIC?

    Do you need the hostname for anything other than the prompt of your shell?
    If not, you could hack that pretty easily. Similarly, you could have
    your old hostname work with new IPs via an /etc/hosts hack. Still, I do
    not know of any reason why setting the hostname would be something lost
    during a reboot unless the new infrastructure had some odd tentacles that
    forced a change back, which doesn't make sense to me.

    --
    Good luck.

    If you find this post helpful and are logged into the web interface,
    show your appreciation and click on the star below...

  3. #3

    Re: retaining hostname after new infrastructure

    I'm guessing you're on AWS since your hostname looks similar to mind; I
    have not tried this out yet, just FYI:

    http://docs.aws.amazon.com/AWSEC2/la...-hostname.html

    --
    Good luck.

    If you find this post helpful and are logged into the web interface,
    show your appreciation and click on the star below...

  4. #4

    Re: retaining hostname after new infrastructure

    Thanks for your thoughts ab. Yes, this issue only affects our AWS-based SuSE instances, which used to work just fine, until a couple weeks ago when SuSE upgraded their infrastructure. That upgrade replaced a lot of the startup scripts and seem to have broken the part that allowed us to preserve hostnames across reboots. (hostname is import to us as the software running on them expects the "hostname" command to return the configured hostname and not ip-a.b.c.d). I'm hoping someone from SuSE reads these forums. In the meantime I'm looking for the part of the script that is overwriting /etc/HOSTNAME so that I can fix it myself.

  5. #5

    Re: retaining hostname after new infrastructure

    I think I found it. The new SuSE AWS infrastructure uses the cloud-init package and there is a new config file associated with it, /etc/cloud/cloud.cfg, with a parameter that must be set:

    preserve_hostname: true

    I'm not sure if the setting in YaST is completely ignored or if it must be set in conjunction with /etc/cloud/cloud.cfg.

  6. #6

    Re: retaining hostname after new infrastructure

    Quote Originally Posted by ab View Post
    I'm guessing you're on AWS since your hostname looks similar to mind; I
    have not tried this Jasa Seo out yet, just FYI:

    http://docs.aws.amazon.com/AWSEC2/la...-hostname.html

    --
    Good luck.

    If you find this post helpful and are logged into the web interface,
    show your appreciation and click on the star below...
    thanks for usefull information

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •