Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 46642 - daemontools ugliness
Summary: daemontools ugliness
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 46643 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-04-02 14:58 UTC by Joey Hewitt
Modified: 2006-03-02 17:58 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 Joey Hewitt 2004-04-02 14:58:56 UTC
I've emerged the net-misc/ntp-4.1.2 package and I run the ntp-client script at bootup to sync time to atomic clock.  This worked great until I emerged net-dns/djbdns-1.05-r8/9 so I could use dnscache to get a little faster DNS responses.  The problem is that the dependencies or nature of the ntp-client bootup script and svscan script is such that dnscache hasn't been started when the ntp-client script runs.  In my /etc/resolv.conf, I have the line "nameserver 127.0.0.1"  When ntp-client starts, it can't resolve the name of the time server I use.  I know that svscan is the very last service that starts on my bootup.  I checked the scripts and see that ntp-client depends on dns, but svscan doesn't provide it, because not everyone will run dnscache with svscan.  So, for now, I made svscan provide dns and wait a few seconds after it starts (daemontools has a delay like that), and it works.  You might have to change it to something like this in portage, but it's not elegant because of the delay daemontools does and because svscan doesn't always provide dns.
I suggest we scrap daemontools, use daemontools instead of init (or list it in inittab), or make it so svscan is one of the first scripts to start.  Maybe we just leave it so that in a special case like this, the user has to modify scripts, but that's not very nice either...  I see that svscan is supposed to run before ntp, but I'm not sure why.  Maybe it should also run after ntp-client?

I realize there are a few other reports related to daemontools/svscan but I don't think they address this issue -- generically, there needs to be a way to specify that svscan is dynamic and won't always provide the same services.

Reproducible: Didn't try
Steps to Reproduce:
1. emerge ntp
2. [configure ntp client with the name of a time server, /etc/conf.d/ntp-client, NTPCLIENT_OPTS="-b <server_name>"]
3. rc-update add ntp-client default
4. emerge djbdns
5. [set up dnscache, change resolv.conf to point to lo interface]
6. rc-update add svscan default
7. boot and ntp-client can't resolve time server's name. After complete boot, manually running the script should work.
Actual Results:  
 

Expected Results:
Comment 1 Mr. Bones. (RETIRED) gentoo-dev 2004-04-02 17:47:01 UTC
*** Bug 46643 has been marked as a duplicate of this bug. ***
Comment 2 Kalin KOZHUHAROV 2005-01-30 08:19:05 UTC
Well, I was searching for something else but found this bug...

I am running a few machines with some (10+) services under daemontools. Everybody is happy when svscanboot is started from inittab (as was originally meant to by DJB).

I am not exactly sure this has to be under daemontools though. It should be at least for djbdns, but better to initscripts (base-system ?)
Comment 3 SpanKY gentoo-dev 2006-03-02 17:58:42 UTC
solved locally