[02:11] 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] 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] Hm, /proc/N/limits says $user is lying, since that limit is set to 1024/4096 [10:03] hi. this is a bit off-topic. does start-stop-daemon allow two separate services that use the same in "start-stop-daemon --exec " ? [10:07] salty-horse: sure, why wouldn't it? each invocation of start-stop-daemon doesn't know about any other invocations. [10:08] salty-horse: make sure you use more parameters to identify which instance is which (e.g. using pidfiles, etc) [10:08] jodh: awesome inotify branch ! [10:08] xnox: thanks :) [10:10] 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] 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] salty-horse: but e.g. I'd rather recommend you to use upstart & it's support for instances =) [10:16] xnox, in my case, each so called "instance" has different flags. does this still fit the definition of upstart instances? [10:17] 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] I sense setting a --pidfile on both is the simplest solution [10:18] 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] salty-horse: using a human-identifiable "instance $NAME" will get you what you want, e.g. "production", "staging", "testing", "dev" ...... mongodb servers =) [10:19] 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] or shell you have shell to select what ever you need based on the instance name =) [10:20] (e.g. any options, ports, etc....) [10:23] 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] 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] salty-horse: that way you aid maintainance, by not repeating the same snippet in each job. [10:36] 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] 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] 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] :) [10:39] possibly something like 5-6 lines in total for the whole conf. [10:39] cause one would simply test what the goal is in "pre-start" & "pre-stop" & "post-start" [10:40] *sigh* [10:52] 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] salty-horse: nah, it's ok =) if I complain about upstart, I'm the one who has to implement features in it ;-) [11:28] 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] Currently I'm reading the upstart cookbook, but there's much do be seen there [11:29] 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] 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] 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] and I don't want to change the networking service [11:31] oks, just a minute [11:34] leandrosansilva: please note that once an event is emitted - it's gone, adding new jobs will not "magically notice the event" [11:35] you can download upstart-gui to monitor the events emitted on the buses. [11:35] So I think I must solve my problem in another way [11:35] what I need is just this: my daemon must start just after the network is up [11:35] leandrosansilva: please paste your jobs, or describe your problem. [11:36] and I wouldn't like to change networking.conf to start my daemon there [11:37] leandrosansilva: "start on (local-filesystems and net-device-up IFACE!=lo)" [11:37] my idea is making my daemon (called capturad) depends on networking [11:37] that means start onces file-systems got mounted & there is any kind of network connection (non-localhost only) [11:38] leandrosansilva: documented at http://upstart.ubuntu.com/cookbook/#normal-start [11:38] oh, it's easier than I thought [11:38] I'll try this [11:38] a moment... [11:39] leandrosansilva: well you need to reboot to test / generate those events properly =)))) [11:39] hum.. So it may be the problem [11:40] I haven't restarted [11:45] 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] no problem [11:58] xnox, I've tested with the real daemon and it worked correctly. Thx again