Red Hat Bugzilla – Bug 108964
chroot-operation broken since 4.2.0
Last modified: 2007-04-18 12:59:05 EDT
Description of problem:
Since upgrade to 4.2.0 the chroot-mode does not work anymore; the
| Nov 3 19:37:34 gkar ntpd: getaddrinfo: "127.0.0.1" invalid
host address, line ignored
and connections with 'ntpq' are not possible.
A quick hack is to LD_PRELOAD some libnss* libraries, but because I
use numeric IPs only, DNS lookups should be not needed and before
upgrade to 4.2.0 things were fine. E.g.
makes it working.
My chroot is
| `-- log
| |-- localtime
| |-- ntp
| | |-- keys
| | `-- step-tickers
| `-- ntp.conf
ntpd is called as 'ntpd -T /var/chroot/ntp -U ntp -g'; and the cfg
restrict default ignore
restrict 192.168.5.3 nomodify notrap noquery
Version-Release number of selected component (if applicable):
FYI, I downgraded to 4.1.2 for FC1
again/still in ntp-4.2.0-7 from FC2 and rawhide
why not copy the needed libraries in the chroot?
Does not seem to be needed with ntp-4.2.0.a.20040616-2 anymore; it is
working with chroot's out-of-the-box (after adjusting the options
which has been changed completly ('-U' -> '-u', '-T' -> '-i')).
But copying libs into the chroot would have some management-implications:
on glibc updates I would have to keep the libs up-to-date and 'strace'
orgies would be needed to determine the list of needed libs and files.
For the ntp, I solved it by setting LD_PRELOAD in a way like
| LD_PRELOAD=/lib/libnss_nis.so.2:/lib/libnss_files.so.2 /etc/init.d/ntpd restart
but (as said), this is not needed anymore.