Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

Set container utsname to configured hostname per default #253

Merged
merged 1 commit into from
Mar 14, 2014

Conversation

fpletz
Copy link
Contributor

@fpletz fpletz commented Mar 13, 2014

Previously, the utsname of a machine was set to the vagrant machine ID. As the utsname represents the hostname of the machine and is independent from the name of the actual LXC container, the hostname that was specified in the Vagrantfile should be used instead. If no hostname is provided, the machine ID will be used like before.

Additionally, this will trigger the DHCP client in the container to send the correct hostname to the DHCP server on the first request at boot. Vagrant sets the configured hostname only after the network is up. If
for example automatic DNS updates are configured, the right DNS record will be created every time.

Previously, the utsname of a machine was set to the vagrant machine ID.
As the utsname represents the hostname of the machine and is independent
from the name of the actual LXC container, the hostname that was
specified in the Vagrantfile should be used instead. If no hostname is
provided, the machine ID will be used like before.

Additionally, this will trigger the DHCP client in the container to send
the correct hostname to the DHCP server on the first request at boot.
Vagrant sets the configured hostname only after the network is up. If
for example automatic DNS updates are configured, the right DNS record
will be created every time.
@fgrehm fgrehm added bug and removed bug labels Mar 13, 2014
@fgrehm fgrehm added this to the v1.0.0 milestone Mar 13, 2014
fgrehm added a commit that referenced this pull request Mar 14, 2014
@fgrehm fgrehm merged commit be12f11 into fgrehm:master Mar 14, 2014
@fgrehm
Copy link
Owner

fgrehm commented Mar 14, 2014

Thanks!

@fpletz fpletz deleted the utsname-hostname branch July 16, 2015 12:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants