Discussion:
DHCP hostname
Mauricio Tavares
2014-07-02 08:43:58 UTC
Permalink
How can I define the hostname for a coreos host such that when it does pick
its IP from a DHCP server it also passes its hostname to said DHCP? In
CentOS/RH, that would be done using DHCP_HOSTNAME, and something like

sudo hostnamectl set-hostname coreos

in coreos does not work.
Brandon Philips
2014-07-02 16:56:44 UTC
Permalink
Hello Mauricio-

We added a patch to systemd-networkd to support this[1] and it was
merged a few days ago. It will appear in CoreOS alpha in the coming
weeks.

Thanks!

Brandon

[1] https://github.com/systemd/systemd/commit/4cc7a82c9490a3c5ae03b1d6d168ce40ba499e23
Post by Mauricio Tavares
How can I define the hostname for a coreos host such that when it does pick
its IP from a DHCP server it also passes its hostname to said DHCP? In
CentOS/RH, that would be done using DHCP_HOSTNAME, and something like
sudo hostnamectl set-hostname coreos
in coreos does not work.
Vince Telvary
2014-08-11 15:32:10 UTC
Permalink
Hello,

any idea when this will be added in alpha ? :)

Thanks,

Vincent
Post by Brandon Philips
Hello Mauricio-
We added a patch to systemd-networkd to support this[1] and it was
merged a few days ago. It will appear in CoreOS alpha in the coming
weeks.
Thanks!
Brandon
[1]
https://github.com/systemd/systemd/commit/4cc7a82c9490a3c5ae03b1d6d168ce40ba499e23
Post by Mauricio Tavares
How can I define the hostname for a coreos host such that when it does
pick
Post by Mauricio Tavares
its IP from a DHCP server it also passes its hostname to said DHCP? In
CentOS/RH, that would be done using DHCP_HOSTNAME, and something like
sudo hostnamectl set-hostname coreos
in coreos does not work.
Michael Marineau
2014-08-11 20:02:10 UTC
Permalink
Support for sending the host name to the DHCP server has been in alpha for
a little while now but it may not happen on first boot if you are setting
the host name via cloud config.
Post by Vince Telvary
Hello,
any idea when this will be added in alpha ? :)
Thanks,
Vincent
Post by Brandon Philips
Hello Mauricio-
We added a patch to systemd-networkd to support this[1] and it was
merged a few days ago. It will appear in CoreOS alpha in the coming
weeks.
Thanks!
Brandon
[1] https://github.com/systemd/systemd/commit/
4cc7a82c9490a3c5ae03b1d6d168ce40ba499e23
Post by Mauricio Tavares
How can I define the hostname for a coreos host such that when it does
pick
Post by Mauricio Tavares
its IP from a DHCP server it also passes its hostname to said DHCP? In
CentOS/RH, that would be done using DHCP_HOSTNAME, and something like
sudo hostnamectl set-hostname coreos
in coreos does not work.
Vince Telvary
2014-08-12 16:02:53 UTC
Permalink
Yes, I didn't read the release notes correctly :s

And I indeed need to restart systemd-network to "push" the hostname to the
dhcp/dns server.

Thanks,

Vincent
Post by Michael Marineau
Support for sending the host name to the DHCP server has been in alpha for
a little while now but it may not happen on first boot if you are setting
the host name via cloud config.
Post by Vince Telvary
Hello,
any idea when this will be added in alpha ? :)
Thanks,
Vincent
Post by Brandon Philips
Hello Mauricio-
We added a patch to systemd-networkd to support this[1] and it was
merged a few days ago. It will appear in CoreOS alpha in the coming
weeks.
Thanks!
Brandon
[1] https://github.com/systemd/systemd/commit/
4cc7a82c9490a3c5ae03b1d6d168ce40ba499e23
Post by Mauricio Tavares
How can I define the hostname for a coreos host such that when it does
pick
Post by Mauricio Tavares
its IP from a DHCP server it also passes its hostname to said DHCP? In
CentOS/RH, that would be done using DHCP_HOSTNAME, and something like
sudo hostnamectl set-hostname coreos
in coreos does not work.
Brandon Philips
2014-08-12 21:59:36 UTC
Permalink
Post by Vince Telvary
And I indeed need to restart systemd-network to "push" the hostname to the
dhcp/dns server.
So, everything is working now?

Thanks,

Brandon
Vince Telvary
2014-08-13 08:38:02 UTC
Permalink
Yes, i'm now waiting for the systemd-resolvd to correctly set the search
domain ;)

Vincent
Post by Brandon Philips
Post by Vince Telvary
And I indeed need to restart systemd-network to "push" the hostname to
the
Post by Vince Telvary
dhcp/dns server.
So, everything is working now?
Thanks,
Brandon
Michael Marineau
2014-08-13 10:16:35 UTC
Permalink
That should work in the current alpha too but only if the server sends the
domain option, the domain search list option isn't supported.
Post by Vince Telvary
Yes, i'm now waiting for the systemd-resolvd to correctly set the search
domain ;)
Vincent
Post by Brandon Philips
Post by Vince Telvary
And I indeed need to restart systemd-network to "push" the hostname to
the
Post by Vince Telvary
dhcp/dns server.
So, everything is working now?
Thanks,
Brandon
Vince Telvary
2014-08-13 11:57:27 UTC
Permalink
This works with the current alpha ! Thanks

I really should better look at the release note >< sorry for the noise.
Post by Michael Marineau
That should work in the current alpha too but only if the server sends the
domain option, the domain search list option isn't supported.
Post by Vince Telvary
Yes, i'm now waiting for the systemd-resolvd to correctly set the search
domain ;)
Vincent
Post by Brandon Philips
Post by Vince Telvary
And I indeed need to restart systemd-network to "push" the hostname to
the
Post by Vince Telvary
dhcp/dns server.
So, everything is working now?
Thanks,
Brandon
Loading...