/srv/irclogs.ubuntu.com/2008/12/18/#upstart.txt

=== notting_ is now known as notting
=== notting_ is now known as notting
sadmac2Keybuk: ping21:08
Keybukevening21:08
sadmac2evening21:08
sadmac2Keybuk: when you said you weren't planning to start working on Upstart again until "Next Year," was that the next year that starts 2 weeks from now or the one 365 days away?21:09
Keybuk200921:10
sadmac2Keybuk: somewhere between the two then?21:10
Keybukright21:11
Keybukreleasable version of 0.10 targeted for ~October next year21:12
Keybukwhich pretty much aligns it with DeviceKit as well21:12
sadmac2nice21:12
sadmac2Keybuk: I think I'm going to re-prototype the state machine. I can do it in python (which you can read) or I can do it in C (which can not only be read, but serve as copy-pasta for the actual system).21:13
Keybukbeing able to read it would be handy21:13
KeybukI don't really want to have to learn ruby just so I can see what you're doing differently to me (if anything)21:14
sadmac2yes :)21:14
sadmac2ruby is fairly easy to read usually, but the state machine I wrote is kinda asshole-ish21:15
sadmac2it does scary things.21:15
Keybukruby is only easy to read if you know ruby ;)21:15
sadmac2plus in describing the state machine I actually ended up improving it, so it isn't quite an accurate example anyway21:16
sadmac2its a subset of what I described, but its missing some properties21:16
sadmac2(and it will actually be simpler to implement taking those ideas into account)21:17
geiseriis anyone here versed in upstart?  i am trying to migrate a inittab line to upstart and it flat out wont work.22:11
geiserix:23:once:/bin/su root -l -c "/bin/bash --login -c startx >/dev/null 2>&1" <- this is the exact line22:23
sadmacgeiseri: what do you have so far?22:28
geiserione sec, let me copy it into pastebin22:29
geiserihttp://paste.ubuntu.com/88079/22:31
geiseriit just seems to fail silently22:31
geiseriis there a place to look and debug it?22:31
sadmacgeiseri: silent failure is often due to a syntax error.22:32
sadmacgeiseri: I believe it will show up in /var/log/messages22:32
geiseriah, okay let me check there22:32
geiseriwhat should i be looking for, i cant really see anything there22:34
geiseridoes my syntax i pasted look remotely correct?22:35
sadmacgeiseri: it looks about right22:36
sadmacgeiseri: you can try init=/sbin/init -v on your kernel command line to get lots of noisy output22:37
geiserisure, its an embedded box, so its a bit sluggish on startup :D22:37
sadmacheh22:38
geiserithat is interesting, i saw the ttys startup via the screen output, but my Xorg one was not started.22:41
geiserido i have to set the mode on it to a specific value?22:42
geiserioh wait syslog as something22:43
mbieblKeybuk: what are your plans regarding upstart 0.5.x and the next ubuntu release?22:44
geiserisadmac: here is the output http://paste.ubuntu.com/88088/22:45
geiseriit looks like it keeps starting and stopping Xorg because its exiting?22:45
ion_Redirect the script’s output to a log.22:47
geiserijust do a exec /bin/su detos -l -c "/usr/bin/startx" 2>&1 >> logfile?22:48
ion_Seems about right.22:48
geiserik22:48
ion_The 2>&1 probably should be after the >>22:49
geiseriokay this is strange... it cannot seem to write the log file23:01
geiseriah, typo :P23:05
geiserihttp://paste.ubuntu.com/88110/ <- here is the log.. .its strange its identical to when i start it up manually except for line #4823:09
geiseriit looks like something it killing the server before it gets out of the gate23:09
ion_Did you try the entire script manually, including the su invocation?23:10
geiseriyes, it works23:11
ion_Try setting PATH manually in the script.23:11
ion_Hm. Was there a stanza for path in Upstart?23:12
geiseridid i miss that?23:12
geiserii still think its strange that it starts but then exits right away... you think if it was a failed library or something it would scream.23:14
ion_Also try startx -- -verbose 10 -logverbose 1023:17
ion_(i pulled the 10 out of my ass)23:17
geiserihttp://paste.ubuntu.com/88117/ <- okay this looks interesting...23:19
geisericould not get file descriptor of the console?23:20
ion_Try adding ‘console owner’ to the job file.23:23
geiserijust at the top of the job file?23:25
ion_Yeah, at any line.23:25
geiseriokay testing it again :)23:25
Keybukmbiebl: I don't think I have any23:26
mbieblKeybuk: so no further "upstartification" of init scripts for jaunty?23:27
mbieblWhat bits do you consider missing, for doing so?23:27
Keybukmbiebl: indeed23:28
Keybukwell, the fact that upstart 0.5 doesn't work?23:28
geiseriion_: okay this is really strange, i can startx via the console as the detos user, but i get the "X: user not authorized to run the X server, aborting." message23:28
mbieblKeybuk: could you be more specific?23:30
Keybukmbiebl: it doesn't solve the problems that need to be solved to move init scripts to upstart23:30
Keybukit's still a pain in the arse to express when they should be running23:30
Keybukand common problems are almost impossible without changes23:31
mbieblEven if you started with a top-down approach?23:31
mbieblI don't think services like smartd, hald etc, need a complex start dependency23:32
mbiebli.e. rc2 could be implemented using native upstart jobs imo23:33
Keybukhal needs to be started by d-bus activiation but only while dbus is running23:34
Keybuk(and brought up automatically)23:34
geiseriion_: now if i set the Xwrapper.conf to allow anyone to start X it now works... why could that be?23:36
ion_I have no idea.23:36
mbieblmaybe hal was a bad example.23:36
geiseriion_: what  was the console owner line suppose to do?23:36
sadmacmbiebl: there is a bit more that could be done with it, but why?23:37
* geiseri wonders if he needs to run something like mingetty to get a console before X starts.23:37
sadmacmbiebl: its all going to have to be redone again once we fix the model23:37
mbieblsadmac: service monitoring?23:37
mbieblseeing, which service is running?23:37
Keybukmost init scripts have a "status" option23:37
sadmacmbiebl: its a pretty high cost to convert any large number of scripts23:38
mbieblKeybuk: but that is a hack, imho23:38
Keybuksure, but it works okish23:38
KeybukI can spend my time doing useful work to make Ubuntu boot faster, and improve upstart23:38
Keybukor I can spend it converting things to upstart now23:38
mbieblsadmac: what would we have to change (for a service like smartd)?23:38
mbiebldo you have plans to completely change the config format?23:39
sadmacmbiebl: yes23:39
mbiebloh23:39
sadmacmbiebl: the changes will make upstart semantically different. the config format won't even be expressing the same meaning23:39
Keybukwell, that depends23:40
mbieblsadmac: is there a summary / roadmap, what the current plans are?23:40
Keybuknot yet23:40
mbieblI'm quite surprised by what you say23:41
sadmacmbiebl: http://screwyouenterpriseedition.blogspot.com has some (still controvertial) details on things I've been thinking about (top 4 posts)23:41
Keybuk(you get an award if you can understand his blog posts23:41
Keybuk lit. you get to explain them to the rest of us :p)23:41
sadmacKeybuk: take a look at the most recent of those. Events shouldn't have any surprises in store, but still.23:41
mbiebl;-)23:42
Keybukmbiebl: the summary of the change is actually quite simple23:42
Keybukright now jobs are:23:42
Keybuk  start on <some event expression>23:42
Keybuk  stop on <some event expression>23:42
Keybukthis will change to:23:42
Keybuk  while <some state expression>23:43
ion_geiseri: It opens /dev/console instead of /dev/null as std{in,out,err} for the job and does a magic TIOCSCTTY ioctl (not sure if it’s needed here). :-)23:43
Keybuka good, simple, example would be a dbus apache service23:43
Keybuk  start on started dbus and started apache23:43
Keybuk  stop on stopping dbus or stopping apache23:43
Keybukvs.23:43
Keybuk  while dbus and apache23:43
Keybukexcept, the big difference is that if you restart apache, your service will actually be restarted23:43
Keybukwith the start on/stop on model, your service would simply be stopped23:44
geiseriion_: it looks like really what i need to do is edit the XWrapper.config file... its an embedded system with no ttys so it shouldnt be a problem.23:44
mbieblhm, right, as you would be waiting for the dbus started event23:44
Keybukexactly23:44
mbieblso, the new mantra is "states" not events anymore23:45
Keybukwell23:46
Keybukstates are still based on events23:46
Keybukyou'll get states for jobs for free23:46
Keybukand you can define states based off other states23:46
Keybukor off events23:46
Keybukyou can combine them in jobs too23:46
Keybuk  on control-alt-delete23:46
Keybuk  while multi-user23:46
Keybuk--23:47
Keybuk  on battery-low23:47
Keybuk  while docked23:47
Keybuketc.23:47
Keybukjobs can't be started if their while clause is not true23:47
mbieblany roadmap for this kind stuff?23:47
Keybuk  or if their while clause cannot be made to be true23:47
Keybukthe latter gives us dependency behaviour23:48
Keybuk  while apache and mysql23:48
Keybukstart foo23:48
Keybukwill start apache and mysql as well23:48
geiseriion_: thanks for the help anyway.23:48
sadmacKeybuk: I think for the conf file format we should use a sort of python-style syntax23:53
sadmacfoostate(arg1: %arg):23:53
sadmac     while bar23:53
sadmac     on baz23:53
sadmacKeybuk: this means we can do the break a state across files thing, and keeping states in one file only adds 1 line to the file23:54
sadmacKeybuk: so it pushes the decision to distro maintainers23:54
Keybukbut I don't want to break a state across files23:56
sadmacKeybuk: /you/ don't23:56
Keybukthat's the advantage of being the author :p23:56
sadmacKeybuk: and this doesn't hurt you much if you choose not to23:56
Keybukit hurts compatibility between distributions23:57
sadmacthere's no such thing23:57
Keybukthere should be23:57
Keybukbrb23:57
Keybukdistributions shouldn't *need* different upstart job files for the same service23:58
Keybukupstream authors should feel confident in shipping them in their own tarballs23:58
sadmacbut they'll have them anyway23:58
sadmacno two distributions even install apache in the same folder23:59
sadmac(and oh dear lord help us if anyone put it where upstream says you should)23:59
KeybukI thought we all put it in /usr23:59
Keybukwith the config in /etc/apache2 ? :)23:59
Keybukyou'd be surprised how much commonality there actually is these days23:59
sadmacKeybuk: its in /etc/httpd here23:59

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