-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LXC appliance: DHCP discover request does not include hostname #1242
Comments
@JedMeister - I've issued a new PR that should close this issue. |
I just realised that I hadn't tagged this issue properly. Apologies on that. Also apologies on the really slow turnaround on this... I have a few things that I'd like to tidy up first, but I aim to get back to this sometime within the next week or 2 and tidy up (i.e. finish going over the PR properly and hopefully merge). |
The v16.0 LXC appliance has been put aside for now as there are significant issues running privileged Debian Buster LXC containers on a Buster host (see #1520). As such this issue is also deferred for now... |
This should now be resolved as of v18.x. Having said that, we don't currently have an LXC appliance, so it's untested in this context. However, I'm feeling very confident, so closing this one. |
I can confirm this problem still exists in the v18.x. My debian-12-turnkey-wordpress_18.2-1_amd64.tar.gz still could not obtain DHCP hostname. I also find that LXC created with debian-12-standard_12.2-1_amd64.tar.gz works with DHCP names. It's the Turnkey Core templates that has the DHCP no name issue. |
Hi @fanyangto Thanks for reporting. Although I'm not completely sure that it's exactly the same issue that was discussed here? This discussion was in context of vanilla LXC (and the LXC host appliance that we produced at the time). On Proxmox, unless you I've done some quick and dirty testing and I couldn't see any obvious difference between the interfaces file between So could you please open a new issue describing the problematic behavior in as much detail as possible, ideally with step by step instructions on how I can reproduce it locally. Personally I always use static IPs for my servers but if I can reproduce your problem on my local Proxmox server, then I'm confident that I can fix it - or at the least, document a workaround... |
Good point Jeremy. I have opened a new case #1992 per your suggestion. |
For appliance versions up through v15.0, the DHCP request issued by
udhcpc
does not include thehostname
. This prevents the upstream DHCP server (usuallydnsmasq
) from dynamically registering the hostname in DNS. In the past, this was largely an inconvenience which I overcame by pre-defining static entries in the upstream DHCP/DNS. Since developing the Ansible appliance, I've become increasingly frustrated by the need to work around the problem in Ansible playbooks. Lately I've tried adding mods to the LXC containers so that the containers will dynamical register their hostname.When I recently began looking at fixing a problem in
confconsole
, I realized that there was a way of addressing the issue by modifying theconfconsole
code.From
man interfaces
:In the testing I've done, adding the hostname to any interface using DHCP in
/etc/network/interfaces
results inudhcpc
including thehostname
in the DHCP discover request. In my testing, I also found that when thehostname
is changed byconfconsole
, it must also change/etc/network/interfaces
and restart networking to issue a new DHCP request.The text was updated successfully, but these errors were encountered: