/srv/irclogs.ubuntu.com/2013/12/09/#upstart.txt

mgorbachVery strange. How come sometimes I see logging from upstart on TTY7, and sometimes it's completely empty?02:49
mgorbachSeems to work about 30% of the time on each reboot of this server machine.02:50
xnoxmgorbach: wait.... maybe it didn't come up yet. tty7 upstart job needs to start and it's racing in parallel with pretty much everything else =)09:31
=== adrinou is now known as adrien_oww
mgorbachHow come sometimes I see logging from upstart on TTY7, and sometimes it's completely empty?15:29
mgorbachSeems to work about 30% of the time on each reboot of this server machine.15:29
tseliothi all, if I wanted to make sure that a job such as the following doesn't start unless a file is available, would I simply have to test the existence of this file and exit 0 if the file doesn't exist? http://paste.ubuntu.com/6546310/15:43
tseliotor is there a better way (also compatible with precise)15:43
tseliotxnox: ^15:47
xnoxtseliot: which file are you testing for?15:49
xnoxtseliot: in general if it's the executable binary "/usr/bin/nvidia-persistenced" simply do15:49
tseliotxnox: the actual binary /usr/bin/nvidia-persistenced15:49
xnoxtseliot: right, in that case simply do: exec /usr/bin/nvidia-persistenced --user nvidia-persistenced15:49
tseliotxnox: so, I let it fail?15:50
xnoxtseliot: upstart will notice that the exectuable is not there, and the job will never start and move to stop/failed state. Which is equivalent to any other reasons job may fail to start or not suppose to start.15:50
xnoxtseliot: if you wish you can do15:50
tseliotxnox: if that's acceptable, then it saves me the effort to work around it15:51
xnoxtseliot: pre-start [ ! -x /usr/bin/nvidia-persistenced ] && { stop; exit 0 }15:51
xnoxtseliot: pre-start exec, but that's entirely redundand.15:51
xnoxtseliot: yeah, that's absolutely acceptable, after all all packages can be removed, but not purged and hence init files left around.15:51
xnoxtseliot: upstart was designed for debian/ubuntu like systems ;-)15:52
tseliotxnox: I'll keep it as it is then, thanks a lot :)15:52
xnox=)15:52
tseliotxnox: so, apparently if that file is a link to the binary, upstart won't use it17:15
xnoxtseliot: can you send / point me to the sample packages?17:16
tseliotxnox: it's this one https://github.com/tseliot/nvidia-graphics-drivers/tree/331-updates (the 331-updates git head)17:18
tseliotxnox: and these two patches on top of it: http://paste.ubuntu.com/6546735/ http://paste.ubuntu.com/6546738/17:19
tseliotand the actual error in /var/log/upstart/nvidia-persistenced.log is "/bin/sh: 1: exec: /usr/bin/nvidia-persistenced: not found"17:21
tseliotthe file is there though, it's a link17:21
tseliotit's a link because it shouldn't show up and/or run when we disable the discrete nvidia card and use only the integrated Intel card on systems with hybrid graphics17:22
xnoxtseliot: why are you using variables?17:33
xnoxtseliot: do you need it to be configurable / overridable?17:33
tseliotxnox: in the job? That comes from nvidia17:33
xnoxtseliot: why is your job "exec $VAR", instead of "exec nvidia-persistenced"17:34
xnoxtseliot: with $VAR you are forking a shell, with "exec nvidia-persistenced" i gets directly execed without a fork to a shell.17:34
xnoxtseliot: i'm nearing end of day and still have a few things to finish off.17:35
tseliotxnox: that's something that I take straight from the nvidia-installer. I can replace with my own upstart job if needed17:35
tseliot(I didn't write it myself)17:35
tseliotxnox: no problem, thanks for your help17:37
xnoxtseliot: can you try: http://paste.ubuntu.com/6546826/17:37
tseliotxnox: nvidia-persistenced is a daemon BTW17:37
xnoxtseliot: =)17:37
tseliotxnox: oh, I failed to mention that if I start the job manually it seems to work17:38
xnoxtseliot: so how do you start it that makes it fail?17:38
xnoxtseliot: or how does it get started to fail?17:39
tseliotxnox: start on runlevel [2345]17:40
tseliotwhen that happens, I get the error17:40
xnoxtseliot: try my job and reboot.17:40
tseliotxnox: I think I know where you're getting at ;) Let me try17:41
xnoxtseliot: rm the /var/log/upstart/nvidia*.log first, to make sure you are not looking at old messages.17:41
* xnox been there, done that.....17:41
tseliot:)17:41
tseliotxnox: I'm not even getting a log now... weird17:53
tseliotand it doesn't start17:53
tseliotunless I do it manually17:53
xnoxtseliot: weird. I'll look into it tomorrow.18:02
tseliotxnox: thanks :)18:02

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