/srv/irclogs.ubuntu.com/2013/10/02/#upstart.txt

PaulePanterHi. Any idea, how with Ubuntu 12.04 there can be nothing in `/var/log/dmesg`, but reboots with Ctrl + Alt + Del are logeed in `/var/log/wtmp`?05:35
PaulePanterI cannot look at the screen as this is a remote server.05:36
PaulePanter# more /var/log/upstart/udev-fallback-graphics.log05:52
PaulePanterFATAL: Error inserting vesafb (/lib/modules/3.8.0-31-generic/initrd/vesafb.ko): No such device05:52
PaulePanterSorry probably wrong channel.05:52
PaulePanterSo how can I tell upstart to log the errors from initramfs somewhere?09:58
PaulePanterhttp://paste.ubuntu.com/6183185/09:58
PaulePanterI have no access to the screen and just network. I can ping, but SSH does not work.09:59
jodhPaulePanter: upstart doesn't run in the initramfs.13:27
PaulePanterEven stranger then, why some files in `/var/log/upstart` are written and nothing else.13:41
xnoxPaulePanter: because rootfs got mounted RW and upstart started to execute?13:49
xnoxPaulePanter: or it's from previous boots.13:49
PaulePanter /var was not separate and on / , so at least `/var/log/dmesg` should have been written.14:18
tseliothi all, do you know how to make sure that an upstart job starts before lightdm does?14:27
tseliotapparently "login-session-start" is too late14:28
jodhtseliot: "start on starting lightdm"14:28
tseliotah, as simple as that? Thanks14:29
jodhtseliot: yes :)14:29
tseliotgreat :)14:31
xnoxtseliot: e.g. ubiquity job does that. And that's for a system job.14:39
tseliotthanks14:39
tseliotjodh, xnox: is there a way to start a job on log out?15:05
xnoxtseliot: yes, but it will be a user session job, not a system one.15:06
tseliotxnox: as long as it works15:06
keruomHi all. This must be obvious but I can not find a good answer for it - suppose I want to have a service A that depends on another service B-  if service B is not running there is no point in running service A. I would use "start on started B".15:07
keruomBut is there anything that prevents me from calling "initctl start A" when the B is not running?15:07
xnoxtseliot: "start on session-end" i think should kick a job upon logout (.... which could be shutdown, reboot)15:08
keruomas I can see it right now, there isn't a way how to do it. The only solution would be to put some checks in "pre-start" but it seems redundant and ugly for me. I believe upstart must have something to handle this.15:09
xnoxtseliot: man 7 session-end, you have a TYPE variable which can be "shutdown" or "logout" if you care about that.15:09
tseliotxnox: does that work in 12.04?15:09
xnoxtseliot: no, that's saucy only.15:09
xnoxtseliot: there is no upstart user sessions in prior releases.15:09
tseliottoo bad, I really need a solution for 12.0415:10
xnoxtseliot: there should be something from gnome-session, where things are run on logout or some such.15:10
xnoxtseliot: what do you want / need?15:10
xnoxactually?15:10
tseliotxnox: I need to run some programs (with root privileges) as soon as I log out15:11
xnoxnot sure that at all makes sense security-wise. What are you doing?15:12
tseliotxnox: disable the discrete graphics card15:12
xnoxtseliot: ah.15:13
xnoxtseliot: checkout lightdm's "# session-cleanup-script = Script to run when quitting a user session (runs as root)"15:15
xnoxwould that work for you?!15:15
tseliotxnox: are you suggesting that I get the code from there and use it in 12.04?15:16
xnoxtseliot: lightdm can be configured to run scripts on logout.15:17
tseliotah15:17
xnoxtseliot: i'm telling you to look into lightdm's capabilities, cause upstart is of no use to you.15:18
xnoxtseliot: similarly you probably want to look into lightdm's setup as well, instead of going upstart way.15:18
tseliotxnox: right, I think it's a good idea. Thanks15:18
xnoxtseliot: there are many other setup scripts as well in lightdm, for display, greeter, etc.15:20
tseliotright15:22
tseliotI'll have a look at them, thanks15:22
keruomanobody ^^15:31
keruomanybody pls ^^ ?15:31
xnoxkeruom: correct way to check if a service can be run is in pre-start, and abort then with non-zero exit code. Or just make your exec fail, and well it should fail if the conditions are not right.15:49
xnoxkeruom: it's perfectely acceptable to run $ initctl start A, and for A to fail to start.15:50
xnoxkeruom: also read the upstart cookbook.15:50
xnoxlinked from the topic.15:50
xnoxthere are plenty of things that will fail to run, when manually triggered with $ initctl start A, when it's dependencies are not actually satisfied.15:51
keruomxnox: aha, I thought that there should be some more automatic test for this case16:06
xnoxkeruom: if root wants to start something, one should be able to. And we never assume that it will actually succeed, it may or it may not.16:11
xnoxkeruom: you can do this $ initctl emit started JOB='B'16:13
xnoxwhich will trigger starting all jobs that depend on B =)16:14
keruomxnox: ok :) but I don't believe a normal admin would remember to do it this way16:17
keruomxnox: sure, root can start what ever he wants to, but not through upstart scripts, if there is a hard dependency :) (or with --force or something)16:17
xnoxkeruom: upstart is not a dependency based system. it has no dependency resolution. there are no hard dependencies. only events, and reacting to events (either start or stop)16:19
xnoxsimilarly init.d scripts, despite declaring LSB headers & dependencies, one can always just execute them directly and see what happens, e.g. $ service foo start16:20
keruomxnox: yeah, that's what I learned16:21
keruomxnox: sadly :)16:21
xnoxkeruom: you can do "start B" in the A.conf pre-start, to enforce a dependency ;-)16:22
xnoxto get the semantics of if B fails to start, A will not start either. Or otherwise check status of B in A's pre-start. See examples in the cookbook, for cases where such strong guards are wanted.16:23
keruomxnox: ok, thanks, I just thought there could be a better way. But you are right, since it is event based, it doesn't make much sense16:25
keruombut it is btw hard to debug your upstart configuration than, isn't it?16:25
loahello16:28
loai created upstart job under ubuntu16:29
loasudo start mjpg-streamer works well16:29
loastop mjpg-streamer too16:29
loabut it don't start after system start16:29
loai will show you code of it if you want16:29
loahere it is http://pastebin.com/fBez4Rap16:30
loai have ubuntu 13.1016:30
loawhat can i check? or maybe i need add my job somewhere16:30
loa?16:30
keruomxnox: ^^ that's what I am talking about :)18:11

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