/srv/irclogs.ubuntu.com/2010/03/03/#upstart.txt

=== rberger_ is now known as rberger
=== h\h is now known as haraldh
plundraHmm!15:11
plundraAm I right when I think upstart sets the process-title, to whatever is launched?15:12
plundraBecause, when I re-set the process title inside of my application; nothing gets "through"15:12
Keybukno, Upstart doesn't muck around with the process title of children15:13
Keybukexec() already takes care of that, after all15:13
Keybukand it's handy to see the brief period where the child is still "init"15:13
plundraHmm, so I should be able to change title?15:14
Keybukyes, don't see why not15:17
plundraHMM! Can't recreate it with an example script :) I'll test some more. Thanks15:20
Keybukwhat are you using to set the process title of your application?15:20
plundraIt's python, I'm using setproctitle15:20
plundraWorked fine when not launching via the upstart-job, but then I wrote a test which ONLY sets the title and sleeps, using the same routine, which worked just fine.15:21
KeybukI didn't think Linux implemented setproctitle() :p15:22
plundraI'm pretty sure it uses a few hacks to get it working on different OSs.15:22
plundraSince it works on Linux, OSX, BSD and even Windows.15:23
plundrahttp://pypi.python.org/pypi/setproctitle/15:23
KeybukI'd point out here that you're saying it isn't working on Linux, that's all :p15:24
plundraAs I said, it do work outside of upstart with the application I initially wrote, which uses it. But not with upstart. Although, when writing a proof-of-concept, it does indeed work with upstart. Which puzzles me.15:28
KeybukI can't think of anything "odd" Upstart would do here15:29
plundraHeh, my stupid processes are respawning, didn't see that :-P I wonder what I broke.15:29
Keybukafter all, after the exec() it's a clean environment anyway15:29
plundraYeah, no, it's me of course :)15:29
astsmtlHi all!15:30
Keybukastsmtl: hi15:30
astsmtlQuestion about upstart in LTS. :)15:30
astsmtlI mean current LTS.15:30
astsmtlWhich is Hardy.15:30
Keybuksure15:31
Keybukactually, I think both dapper and hardy are technically LTS ;-)15:31
Keybukdapper doesn't EOL for server until 201115:31
Keybukbut since dapper didn't have Upstart ... I'm just digressing15:31
astsmtlI have a simple job def. exec su xxxxxx -c "/usr/bin/Newd --daemon --pid-file=/var/run/Newd/Newd.pid --config-file=/etc/Newd/config.xml"15:32
astsmtlIt seems like upstart doesn't catch this daemon. After I start this job it's status is (stop) waiting, and daemon is running.15:33
astsmtlSo I can't stop it, respawn won't work...15:34
astsmtlUpstart version is 0.3.9-2.15:34
astsmtlSo the question is: "Is it possible to lanch daemon like this in my Upstart?"15:35
astsmtlAlso, is it possible with more recent Upstart version?15:35
Keybukastsmtl: correct, Upstart 0.3.9-2 cannot do that15:37
Keybukmore recent versions can15:37
plundraWhy would you want to launch a background deamon from upstart? (It's a real question, I might have missed some use-cases :P)15:40
plundraae*15:40
Keybukplundra: most daemons take great care to not daemonise until they're ready to receive connections15:40
Keybuk(for example)15:40
Keybukso it's a good indication that it's "ready"15:40
plundraAh, yeah, ok :-) I get that.15:41
astsmtlSo, launching a background daemon is a normal use-case for Upstart?15:46
astsmtlplundra: I'm a bit confused with your question. :)15:48
plundraastsmtl: To me it sounds weird, I mean, from what I want out of upstart at least.15:49
plundraI just want it to respawn our applications, if needed :-) Sure beats fire-and-forget from init.d, which was used before.15:50
Keybukastsmtl: it's supported with 0.6.x15:51
astsmtlplundra: I started looking at upstart jobs because of respawn too. :)15:52
astsmtlKeybuk: Thanks and sorry for my engrish. :)15:53
astsmtlKeybuk: btw, You are Scott James Remnant it seems?15:54
Keybukyes15:54
Keybukit sometimes seems that way to me too15:54
plundraI'm planning to try supervisord actually, to see if it's not worse then upstart for what we use it for. Because I like the built in stdout/stderr-logging capabilties, and mail notifications.15:55
plundraSince I've added those two things with horrible hacks in my upstart-jobs :-P15:55
Keybukyeah15:55
KeybukENOTIME ;-/15:55
astsmtlKeybuk: Thanks for livef1. I even tried to rewrite it in python as a library, but didn't finish. :)15:56
sadmac2after all the time I spent trying not to hack on libnih, its all I've been doing lately16:02
Keybuksadmac2:  ;)16:07
Keybukme too16:07
Keybukthe third iteration of the epoll stuff is starting to look awesome16:08
DuckFaultdoes upstart provide a mechanism to get all events generated during early boot?16:08
KeybukDuckFault: not at the moment16:08
sadmac2Keybuk: I still have most of that triggers stuff sitting in my dusty 0.6 tree. Not sure if it still merges even.16:08
DuckFaultIts very annoying debugging bootup with a read only root and having no syslog started and having issues with upstart.16:09
Keybukyeah, I think I want the ability to be able to ask upstart "so, what did you get up to today?"16:09
DuckFaultgranted it was an embedded device with no video and no serial out, but those shouldn't be necessary16:09
Keybukand have a good event log16:10
Keybuknot just what events happened, but what upstart did as a result16:10
DuckFaultyou can't have a forever event log, but at least a last 5 minutes or something16:10
Keybukie. "net-device-up eth0" => "started apache" etc.16:10
DuckFaultyes, that would be immensely beneficial16:10
Keybukit doesn't need to be "forever", a ring log would be fine16:10
DuckFaultbut just an event list would work for me16:10
Keybukonce you have a filesystem you could opt to log it there16:10
DuckFaultI figure if you're in the guts enough to need to know what events occurred and what their actions are, you know enough where to see what actions would get initiated by said events.16:11
Keybukactually, that's the thing16:13
Keybukoften when debugging, it's assuming what does happen being different to what actually happened that's the bug16:14
Keybukso I usually need to know whether upstart actually *did* start a job16:14
Keybukand if not, why not, etc.16:14
sadmac2Keybuk: a quick fix for a lot of these logging questions might be to do a 0.6.6 with some systemtap/perf/$footracer probe points shoved in.16:16
Keybuksadmac2: interesting16:17
Keybukwhat you call a quick fix I call "argh, hard!"16:17
Keybuksuggestion systemtap as a quick fix for a lack of logging is like suggesting amputation as a quick fix for a splinter16:18
sadmac2Keybuk: one or two plus the tracer stuff would do it. Then you just "probe upstart.event { printf("%s %s", $upstart_event, $upstart_args) }16:18
sadmac2last I looked at them they were pretty easy to put in... maybe I should look again.16:19
ionhttp://zi.fi/shots/clang.png22:53
=== robbiew is now known as robbiew_

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!