/srv/irclogs.ubuntu.com/2014/07/08/#upstart.txt

geoffthi folks! I'm trying to debug why a "start on ((a and b and c and d and e) or f)" job isn't starting. I made test jobs with "start on a" through "start on e", and they all run. 04:01
geofftwhat should I be trying? (there isn't a limit on the number of conditions, is there?) 04:03
geofftthe job in question doesn't ever get mentioned in verbose output. 04:03
xnoxgeofft: is the job valid? e.g. status $jobname08:13
xnoxgeofft: and to start that job you need to do "initctl emit a; ... b; ... c; ... d; ... e;" or "initctl emit f"08:14
xnoxgeofft: if the job is stopped, the full a-e set of events needs to be re-emitted. or f event needs to be emitted.08:14
geofftxnox: lemme reboot this VM, one sec, but I believe status said stopped/waiting 08:22
geofftand it never started, from boot 08:23
xnoxgeofft: then all events have not fired.08:25
geofftthen why did my test jobs all run? 08:26
xnoxgeofft: and/or the events are mistyped or misnamed.08:26
geofftwell, it also seems to work one in several boots... 08:26
geofftis it possible for events to fire too early / in the wrong order? 08:26
geofftI am pretty confident I typed the test jobs the same way they are listed in the actual job 08:31
geofftlike, on the dumb questions front, is it known that having five "and"s works? is there some internal limit? 08:31
geofftor can I ask upstart which condition it thinks didn't fire? 08:31
geoffthrrrm, I wonder if it's a misparse given that d is an instanced job, and it all works fine if "and e" isn't around. 08:38
xnoxgeofft: can you please list actual config?08:39
xnoxgeofft: echo start on ((a and b and c and d and e) or f) | sudo tee /etc/init/foo.conf08:40
geofftsure, I can pastebin or something, one sec 08:40
xnoxgeofft: for event in a b c d e; do sudo initctl emit --no-wait $event; done08:40
xnoxgeofft: sudo status foo08:40
xnoxworks.08:40
geofftxnox: yes, I can get it to work if I manually emit d. 08:41
geofftmy local changes are http://paste.debian.net/108646/ , the rest is all from Trusty (which I can pastebin if that's useful) 08:42
geofftthe only change the override does is adding "and e" ("and stopped baremetal-earlyauth"). 08:42
geofft(and that job is successfully running and then stopping) 08:48
xnoxgeofft: task & expect stop don't make sense.08:49
xnoxgeofft: on boot what's the "status baremetal-earlyauth" ? is that process simply stopped and that's it?08:50
xnoxgeofft: also task doesn't make sense and to key on "stopped baremetal-earlyauth"08:50
geoffthm, sure, but I added task later as part of debugging, and it was broken before that, too. 08:51
geofftI can pull it back out 08:51
xnoxgeofft: i think you want "task", delete "expect stop" (unless baremetal-earlyauth actually uses SIGSTOP), and in the lightdm.override you want "and started baremetal-earlyauth"08:51
geofftit does use SIGSTOP for readiness (there's something else that waits for "started baremetal-earlyauth") 08:51
xnoxsince for tasks, started is emited after all process quit.08:51
xnoxthere is no distinction between started & stopped for tasks. Task only emit "started" after all processes quit. That's how "tasks" are different from normal/regular jobs.08:52
xnoxif there is something else, it may be blocking for stopped to be emitted.08:53
xnox...08:53
geoffthm, that doesn't match my reading of  http://upstart.ubuntu.com/cookbook/#task ? am I misreading it? 08:53
geofftbaremetal-earlyauth is a short-running program that (possibly) prompts you for a password at plymouth 08:54
geofftand I care both about readiness, since other things communicate with it, and exit, since I don't want to start lightdm until it's done. 08:54
geofft(looking again, I take that back, there isn't something that waits for "started baremetal-earlyauth", but probably I don't want task, anyway.) 08:55
geoffttaking out "task", same behavior, and `status baremetal-earlyauth` is stop/waiting. 08:59
geofftxnox: am I misreading the upstart cookbook docs about when tasks emit started and stopped? 10:00
paintedbicycleHaving trouble with upstart on ubuntu with nodejs. I start the app with user called 'deploy', but app doesn't have permission to write to disk even though all files are owned by deploy. When I log into ubuntu as deploy and start app, app can write fine. Tried using setuid, asked on serverfault, still no luck.21:08
=== xnox is now known as xnox_
paintedbicycleTo follow up, at first when running "sudo -u 'usernane' ..." the sudo process wouldn't go away, so I got an answer here (http://serverfault.com/questions/608240/upstart-why-two-processes-when-running-as-a-different-user/609194) to allow the sudo process to go away and just leave me with my app running as the 'deploy' user I want. Verified that with 'ps aux'. However, when I use the app, the permissions are definitely not21:21
paintedbicycle 'deploy' as it can't do anything. None of the tutorial that use setuid, etc seem to be any different from one another and are mostly out of date21:21
=== xnox_ is now known as Eisbrecher
=== Eisbrecher is now known as Eisbrecher_xnox

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