Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 412229 - net-misc/dhcp-4.2.3_p1 does not start chrooted
Summary: net-misc/dhcp-4.2.3_p1 does not start chrooted
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-16 16:05 UTC by Vladimir Krivenko
Modified: 2012-05-18 02:27 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Krivenko 2012-04-16 16:05:56 UTC
net-misc/dhcp-4.2.3_p1

DHCPD_CHROOT="/var/lib/dhcp"

# /etc/init.d/dhcpd start

* /var/lib/dhcp/etc/dhcp/dhcpd.conf does not exist
* ERROR: dhcpd failed to start

All chrooted dirs are created but no config files copied into.
Comment 1 SpanKY gentoo-dev 2012-04-16 21:32:19 UTC
so create the file in question first:
 /var/lib/dhcp/etc/dhcp/dhcpd.conf

there is no default dhcpd.conf file created by the ebuild (ignoring the completely commented out file), so copying the file out of / and into the chroot first is debatable as it can be confusing behavior.  should the init.d also automatically sync over changes ?
Comment 2 Vladimir Krivenko 2012-04-17 09:15:53 UTC
In previous versions "emerge --config dhcp" did all this work.

If we save changes to dhcpd.conf at chroot directly there is no need to have /etc/dhcp/dhcpd.conf at all.

Without sync from / into chroot in init.d real config is placed into chroot. Very strange.

BTW named syncs on every init and have no problem.

Thanx for explanation.
Comment 3 SpanKY gentoo-dev 2012-04-17 18:48:41 UTC
(In reply to comment #2)

i don't think that's entirely correct.  earlier versions of dhcp did not have a config file inside the chroot.  it'd always use the one in /etc/.  this allowed you to run dhcpd in a chroot (for security purposes), but did not let you easily run multiple dhcpd servers simultaneously in different chroots with different configs.  this changed with Bug 388395.

in light of the new multiplexing support, i don't think it'd be good to automatically copy the config out of / and into the chroot.  i'm open to suggestions though for making this smoother.
Comment 4 Vladimir Krivenko 2012-05-15 11:41:45 UTC
With current scheme chrooting without multiconfig don't work at all.
As I see in Bug 388395, /chroot/dhcpd.foo/etc/dhcp/dhcpd.conf need to created by hand.

Maybe copy /etc/dhcp/dhcp.foo.conf to /chroot/dhcpd.foo/etc/dhcp/dhcpd.conf on every start?

Current situation is worse than it was. No way to use DHCP_CHROOT out of the box.
Comment 5 SpanKY gentoo-dev 2012-05-15 17:45:32 UTC
sorry, but that's bs.  regardless of this change, you can't use dhcp "out of the box" let alone a chroot-ed version.  like i said in comment #1, the config files we install require manual editing before they work at all.
Comment 6 Vladimir Krivenko 2012-05-16 11:01:25 UTC
Is there any plans to change the situation or it will be mainstream? I wonder if I need to change howtos.
Comment 7 SpanKY gentoo-dev 2012-05-17 03:38:28 UTC
(In reply to comment #6)

as i mentioned, suggestions for improvement are welcome.  i don't think we should go copying the file out of /etc/ every time though because that'd cause misbehavior with people running in multiple chroots -- you'd have diff servers responding to the same requests.
Comment 8 Vladimir Krivenko 2012-05-17 12:19:55 UTC
Please tell me where can I read about dhcp multiconfig? Where are config files for multiconfig stored now? In chroot? I have some thoughts about but want to give my vision at all.
Comment 9 Vladimir Krivenko 2012-05-17 12:21:22 UTC
And maybe would be better to use emails to discuss, not bugtracker?
Comment 10 SpanKY gentoo-dev 2012-05-18 02:27:45 UTC
symlink /etc/init.d/another-dhcpd to /etc/init.d/dhcpd, then create /etc/conf.d/another-dhcpd and you can now run two dhcpd servers as long as you've configured them for diff chroots and with non-conflicting settings (e.g. serving different ranges on different interfaces).