Bug 108964 - chroot-operation broken since 4.2.0
chroot-operation broken since 4.2.0
Product: Red Hat Raw Hide
Classification: Retired
Component: ntp (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Harald Hoyer
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2003-11-03 15:44 EST by Enrico Scholz
Modified: 2007-04-18 12:59 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-08-03 12:02:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Enrico Scholz 2003-11-03 15:44:27 EST
Description of problem:

Since upgrade to 4.2.0 the chroot-mode does not work anymore; the
logfile says

| Nov  3 19:37:34 gkar ntpd[1398]: getaddrinfo: "" 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.

| LD_PRELOAD=/lib/libnss_nis.so.2:/lib/libnss_files.so.2
/etc/init.d/ntpd start

makes it working.


My chroot is

|-- dev
|   `-- log
|-- etc
|   |-- localtime
|   |-- ntp
|   |   |-- keys
|   |   `-- step-tickers
|   `-- ntp.conf
`-- var
    `-- lib
        `-- ntp
            `-- drift

ntpd is called as 'ntpd -T /var/chroot/ntp -U ntp -g'; and the cfg
file is 

restrict default ignore
driftfile /var/lib/ntp/drift
broadcastdelay 0.008
authenticate yes
keys /etc/ntp/keys
restrict nomodify notrap noquery

Version-Release number of selected component (if applicable):


How reproducible:

Comment 1 Harald Hoyer 2003-11-04 05:52:43 EST
FYI, I downgraded to 4.1.2 for FC1
Comment 2 Enrico Scholz 2004-07-12 10:29:29 EDT
again/still in ntp-4.2.0-7 from FC2 and rawhide
Comment 3 Harald Hoyer 2004-07-29 11:46:07 EDT
why not copy the needed libraries in the chroot?
Comment 4 Enrico Scholz 2004-08-03 12:02:39 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.