[02:11] <twb> As at Ubuntu 10.04 (upstart 0.6.5-8), where do default ulimits come from, when they're not set in the init job?  Is it just /etc/security/limits.conf like normal?
[02:12] <twb> Apparently I have a python daemon that's cracking the shits about only being allowed to open 500 files at once, and I can't see where that's being set on my server.
[02:13] <twb> Hm, /proc/N/limits says $user is lying, since that limit is set to 1024/4096
[10:03] <salty-horse> hi. this is a bit off-topic. does start-stop-daemon allow two separate services that use the same <command> in "start-stop-daemon --exec <command>" ?
[10:07] <xnox> salty-horse: sure, why wouldn't it? each invocation of start-stop-daemon doesn't know about any other invocations.
[10:08] <xnox> salty-horse: make sure you use more parameters to identify which instance is which (e.g. using pidfiles, etc)
[10:08] <xnox> jodh: awesome inotify branch !
[10:08] <jodh> xnox: thanks :)
[10:10] <salty-horse> xnox, thanks! so should I use --pidfile instead of --exec? what if both commands have the same --exec but different --pidfiles? would that be enough to differentiate them? or does it make no sense to have several "matching" flags?
[10:13] <xnox> salty-horse: "--exec foo --pidfile minifoo.pid" and "--exec foo --pidfile bigfoo.pid" are different and thus correct one will be stopped/reloaded/restarted/etc
[10:13] <xnox> salty-horse: but e.g. I'd rather recommend you to use upstart & it's support for instances =)
[10:16] <salty-horse> xnox, in my case, each so called "instance" has different flags. does this still fit the definition of upstart instances?
[10:17] <salty-horse> I'm specifically trying to run both a mongodb "regular server" and a mongodb "config server". someone copied the upstart conf file, and modified it, but now both files have the same --exec, and only one of them has a --pidfile. so they stepped on each other's toes and I could not start both at the same time
[10:17] <salty-horse> I sense setting a --pidfile on both is the simplest solution
[10:18] <xnox> salty-horse: it should, but it all depends on your usecase. E.g. /etc/init/network-interface.conf defines "instance $INTERFACE" thus one gets a running job per each configured network interface. There are other examples, just grep for "instance" in /etc/init/
[10:19] <xnox> salty-horse: using a human-identifiable "instance $NAME" will get you what you want, e.g. "production", "staging", "testing", "dev" ...... mongodb servers =)
[10:19] <xnox> but it kind of assumes that you can structure all your mongodb servers in a homogenic way. E.g. for each of them you start up with --config /etc/mondonbd/$NAME.config
[10:20] <xnox> or shell you have shell to select what ever you need based on the instance name =)
[10:20] <xnox> (e.g. any options, ports, etc....)
[10:23] <salty-horse> xnox, from what I'm reading about isntances, they require an extra parameter on the startup command. I'd rather not deal with variables. I want a simple "service NAME start"
[10:34] <xnox> salty-horse: then create different jobs for each one. Or you can create wrapper jobs: e.g. configmongodb.conf will simply have "start mongodb NAME=config", and all the common-logic will be in the mongodb.conf
[10:35] <xnox> salty-horse: that way you aid maintainance, by not repeating the same snippet in each job.
[10:36] <xnox> salty-horse: or have normal jobs, without instances, but source shell in pre-start script if there is anything significant to share between each mongo jobs.
[10:37] <salty-horse> that seems overkill for my current problem, but I appreciate the knowledge for future configurations. if a job only has "start ..." does upstart still knows how to shut it down correctly?
[10:39] <xnox> salty-horse: good point. i think one would also need similar stubs for "stop/restart/reload mongo NAME=config" then in pre|post-start|stop =( 
[10:39] <salty-horse> :)
[10:39] <xnox> possibly something like 5-6 lines in total for the whole conf.
[10:39] <xnox> cause one would simply test what the goal is in "pre-start" & "pre-stop" & "post-start"
[10:40] <xnox> *sigh*
[10:52] <salty-horse> thanks a bunch. sorry for depressing you about upstart inflexibility. at least now you can add a new keyword that does that magic
[11:04] <xnox> salty-horse: nah, it's ok =) if I complain about upstart, I'm the one who has to implement features in it ;-)
[11:28] <leandrosansilva> Hello. Is it possible to create custom events? I created a service called service1 and put the code "emit my_event" and I also created another one called service2 and put "start on my_event". But, when I start service1, service2 doesn't start. Probably I'm doing something (everything) wrong, but what?
[11:28] <leandrosansilva> Currently I'm reading the upstart cookbook, but there's much do be seen there
[11:29] <xnox> leandrosansilva: instead of emitting & catching events you can simply do: "start service2" in service1.conf, or in service2.conf "start on started service1"
[11:30] <xnox> leandrosansilva: can you please pastebit full jobs. Did you declare that service1 emits events using "emits" stanza? http://upstart.ubuntu.com/cookbook/#emits
[11:31] <leandrosansilva> The problem this is just a test. I really don't need these services. In fact I need to start a service as soon the network starts (it's a daemon which needs to access some external services on the local network), and I'd like it started on event static-network-up, but it didin't work
[11:31] <leandrosansilva> and I don't want to change the networking service
[11:31] <leandrosansilva> oks, just a minute
[11:34] <xnox> leandrosansilva: please note that once an event is emitted - it's gone, adding new jobs will not "magically notice the event"
[11:35] <xnox> you can download upstart-gui to monitor the events emitted on the buses.
[11:35] <leandrosansilva> So I think I must solve my problem in another way
[11:35] <leandrosansilva> what I need is just this: my daemon must start just after the network is up
[11:35] <xnox> leandrosansilva: please paste your jobs, or describe your problem.
[11:36] <leandrosansilva> and I wouldn't like to change networking.conf to start my daemon there
[11:37] <xnox> leandrosansilva: "start on (local-filesystems and net-device-up IFACE!=lo)"
[11:37] <leandrosansilva> my idea is making my daemon (called capturad) depends on networking
[11:37] <xnox> that means start onces file-systems got mounted & there is any kind of network connection (non-localhost only)
[11:38] <xnox> leandrosansilva: documented at http://upstart.ubuntu.com/cookbook/#normal-start
[11:38] <leandrosansilva> oh, it's easier than I thought
[11:38] <leandrosansilva> I'll try this
[11:38] <leandrosansilva> a moment...
[11:39] <xnox> leandrosansilva: well you need to reboot to test / generate those events properly =))))
[11:39] <leandrosansilva> hum.. So it may be the problem
[11:40] <leandrosansilva> I haven't restarted
[11:45] <leandrosansilva> xnox, wIth a simple daemon, "start on (local-filesystems and net-device-up IFACE!=lo)" seems to work. Let me check with the real daemon. Anyway, thanks a lot for your help!
[11:45] <xnox> no problem
[11:58] <leandrosansilva> xnox, I've tested with the real daemon and it worked correctly. Thx again