mgorbach | Very strange. How come sometimes I see logging from upstart on TTY7, and sometimes it's completely empty? | 02:49 |
---|---|---|
mgorbach | Seems to work about 30% of the time on each reboot of this server machine. | 02:50 |
xnox | mgorbach: 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 | ||
mgorbach | How come sometimes I see logging from upstart on TTY7, and sometimes it's completely empty? | 15:29 |
mgorbach | Seems to work about 30% of the time on each reboot of this server machine. | 15:29 |
tseliot | hi 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 |
tseliot | or is there a better way (also compatible with precise) | 15:43 |
tseliot | xnox: ^ | 15:47 |
xnox | tseliot: which file are you testing for? | 15:49 |
xnox | tseliot: in general if it's the executable binary "/usr/bin/nvidia-persistenced" simply do | 15:49 |
tseliot | xnox: the actual binary /usr/bin/nvidia-persistenced | 15:49 |
xnox | tseliot: right, in that case simply do: exec /usr/bin/nvidia-persistenced --user nvidia-persistenced | 15:49 |
tseliot | xnox: so, I let it fail? | 15:50 |
xnox | tseliot: 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 |
xnox | tseliot: if you wish you can do | 15:50 |
tseliot | xnox: if that's acceptable, then it saves me the effort to work around it | 15:51 |
xnox | tseliot: pre-start [ ! -x /usr/bin/nvidia-persistenced ] && { stop; exit 0 } | 15:51 |
xnox | tseliot: pre-start exec, but that's entirely redundand. | 15:51 |
xnox | tseliot: yeah, that's absolutely acceptable, after all all packages can be removed, but not purged and hence init files left around. | 15:51 |
xnox | tseliot: upstart was designed for debian/ubuntu like systems ;-) | 15:52 |
tseliot | xnox: I'll keep it as it is then, thanks a lot :) | 15:52 |
xnox | =) | 15:52 |
tseliot | xnox: so, apparently if that file is a link to the binary, upstart won't use it | 17:15 |
xnox | tseliot: can you send / point me to the sample packages? | 17:16 |
tseliot | xnox: it's this one https://github.com/tseliot/nvidia-graphics-drivers/tree/331-updates (the 331-updates git head) | 17:18 |
tseliot | xnox: and these two patches on top of it: http://paste.ubuntu.com/6546735/ http://paste.ubuntu.com/6546738/ | 17:19 |
tseliot | and the actual error in /var/log/upstart/nvidia-persistenced.log is "/bin/sh: 1: exec: /usr/bin/nvidia-persistenced: not found" | 17:21 |
tseliot | the file is there though, it's a link | 17:21 |
tseliot | it'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 graphics | 17:22 |
xnox | tseliot: why are you using variables? | 17:33 |
xnox | tseliot: do you need it to be configurable / overridable? | 17:33 |
tseliot | xnox: in the job? That comes from nvidia | 17:33 |
xnox | tseliot: why is your job "exec $VAR", instead of "exec nvidia-persistenced" | 17:34 |
xnox | tseliot: with $VAR you are forking a shell, with "exec nvidia-persistenced" i gets directly execed without a fork to a shell. | 17:34 |
xnox | tseliot: i'm nearing end of day and still have a few things to finish off. | 17:35 |
tseliot | xnox: that's something that I take straight from the nvidia-installer. I can replace with my own upstart job if needed | 17:35 |
tseliot | (I didn't write it myself) | 17:35 |
tseliot | xnox: no problem, thanks for your help | 17:37 |
xnox | tseliot: can you try: http://paste.ubuntu.com/6546826/ | 17:37 |
tseliot | xnox: nvidia-persistenced is a daemon BTW | 17:37 |
xnox | tseliot: =) | 17:37 |
tseliot | xnox: oh, I failed to mention that if I start the job manually it seems to work | 17:38 |
xnox | tseliot: so how do you start it that makes it fail? | 17:38 |
xnox | tseliot: or how does it get started to fail? | 17:39 |
tseliot | xnox: start on runlevel [2345] | 17:40 |
tseliot | when that happens, I get the error | 17:40 |
xnox | tseliot: try my job and reboot. | 17:40 |
tseliot | xnox: I think I know where you're getting at ;) Let me try | 17:41 |
xnox | tseliot: 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 |
tseliot | xnox: I'm not even getting a log now... weird | 17:53 |
tseliot | and it doesn't start | 17:53 |
tseliot | unless I do it manually | 17:53 |
xnox | tseliot: weird. I'll look into it tomorrow. | 18:02 |
tseliot | xnox: thanks :) | 18:02 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!