[10:46] <candyban> Hi guys. I'm having an issue with ubuntu 10.04 where some scripts (e.g. snmpd, conntrackd) do not start properly because some interfaces are not ready yet (e.g. eth2/eth3). Both scripts have Required-Start: $network, so I wonder if there is a bug in upstart where it does not wait for the dependency to be met before starting the script
[11:14] <candyban> anyone alive in here?
[11:15] <candyban> Is it possible for upstart to run /etc/rcX.d serial rather than parallel ?
[11:16] <candyban> can I force scripts to somehow wait for "all" interfaces to be available & configured before continuing?
[12:08] <twb> On Ubuntu 10.04, there are upstart services that I wish guarantee are NEVER EVER started, but due to package dependencies, I can't simply remove the package via apt.
[12:08] <twb> Since "update-rc.d foo disable" and policy-rc.d are not applicable, my next instinct is to "dpkg-divert --rename /etc/init/avahi-daemon.conf", so that upstart will see (and hopefully ignore) a file "/etc/init/avahi-daemon.conf.distrib".
[12:09] <twb> Is there a better way to blacklist services?
[13:11] <candyban> twb, I'm here for help myself on 10.04 ... usually when I have a problem like that, I go ugly and just do chmod -x /usr/sbin/avahi-daemon
[13:12] <candyban> twb, or I suppose you can edit /etc/init/avahi-daemon.conf
[13:12] <twb> Permissions on non-conffiles aren't preserved
[13:13] <twb> But yeah, you could dpkg-divert /usr/sbin/avahi-daemon
[13:13] <candyban> twb, just add exit 0 at the top of /etc/init/avahi-daemon.conf (not sure if that works)
[13:14] <twb> Unfortunately, upstart jobs are a hodge-podge of DSL and embedded sh
[13:14] <twb> So I doubt that would work.
[13:15] <twb> In any case, editing the file is basically what I'm trying to avoid.
[13:16] <oli1980> Hi all
[13:17] <oli1980> i have a strange issue with upstart :/ when trying to stop ssh in Ubuntu 10.06 the stop command does not return
[13:23] <soren> twb: Just remove the job?
[13:23] <twb> soren: you mean rm -f it?
[13:24] <twb> Hmm, I suppose that WOULD work, because it's a conffile
[13:24] <soren> twb: Yes, that's what I mean.
[13:25] <soren> twb: It's absolutely supported. And absolutely offtopic for this channel, but there you go :)
[13:25] <twb> Sorry!
[13:25] <twb> I guess because upstart jobs (i.e. conf files) are distro-specific, and thus off-topic?
[13:46] <soren> twb: Conffile handling is not an upstart issue.
[13:46] <twb> Righto
[13:49] <oli1980> when i try to stop ssh with "stop ssh" i simply get in the debug of init  init: job_process_handler: Ignored event 20 (5) for process PID
[14:42] <candyban> soren, is there a way to start the network and make all the rest wait until that is completed?
[14:44] <soren> candyban: Generally, no.
[14:45] <soren> candyban: Mostly because there's no way to know when you're going to be done configuring the network.
[14:45] <soren> candyban: I mean.. It's very difficult to define when configuration of the network has been completed.
[14:46] <candyban> soren, I'm having trouble with snmpd (which I bind on eth3) and conntrackd (which syncs on eth2)
[14:46] <soren> candyban: then start them when they come up.
[14:46] <candyban> soren, they are both started before the network is properly initialized
[14:47] <soren> candyban: "start on net-device-up IFACE=eth2"
[14:47] <soren> Adjust as appropriate.
[14:47] <soren> This is assuming an Ubuntu system, by the way.
[14:47] <soren> Other distros may or may not have a net-device-up event.
[14:48] <candyban> soren, 10.04 (but snmpd and conntrackd are "regular" init scripts in /etc/init.d ... there is no equivalent in /etc/init ... do I need to recreate the scripts?
[14:51] <soren> candyban: You can also add a post-up line to your network configuration in /etc/network/interfaces that just calls the relevant init scripts. This is completely off-topic here, though. If you want to discuss this, please take it somewhere like #ubuntu-server
[14:54] <candyban> soren, I never had these kinds of problems with regular SysV boot ... so I spent most of today learning about upstart as I want to understand what and where it goes wrong and how I can fix it the right way. (e.g. creating a new upstart script for snmpd/conntrackd)
[14:54] <soren> No, with sysv boot you had different problems.
[14:55] <candyban> soren, true, but at least it was predictable. Now booting of certain services fails/succeeds at random
[14:56] <candyban> soren, anyways, back to topic. Should I create a new /etc/init script (or can I modify the existing SysV-style script)
[14:56] <soren> I'm not sure what you want me to say. Even driven boot is racy if not configured correctly. All you need to do is configure it correctly.
[14:56] <soren> As I said:  This is  completely off-topic here, though. If you want to discuss this, please take it somewhere like #ubuntu-server
[14:57] <candyban> soren, ok, thanks.
[18:01] <bencer> hi all
[18:01] <bencer> i'm having some issues with upstart starting squid 2.x on lucid
[18:01] <bencer> syslog says:
[18:01] <bencer> Jun 25 16:58:50 eboxdev1 init: squid main process (27716) killed by TERM signal
[18:01] <bencer> Jun 25 16:58:50 eboxdev1 init: squid main process (28441) terminated with status 1
[18:01] <bencer> but squid after his default shutdown_lifetime says:
[18:02] <bencer> 2010/06/25 16:59:21| Squid Cache (Version 2.7.STABLE7): Exiting normally.
[18:02] <bencer> it's like upstart was killing squid for not being stopped inmediately
[18:03] <bencer> and look at the times, it matches the default 30sec squid shutdown_lifetime
[18:05] <bencer> and the funny thing is that if i comment the pre-script on the upstart script i can't reproduce the issue
[18:28] <bencer> i think i've found that the expect fork option doesn't work very well, just not using that and running squid with -N (do not background) works as expected
[18:28] <bencer> going to submit a patch on squid package...