/srv/irclogs.ubuntu.com/2009/10/14/#upstart.txt

TomJaegeris there a bug #?00:08
Keybuknot sure :p00:09
KeybukI don'00:09
KeybukI don't track things using LP00:09
TomJaegerbut usplash is the plan for fixing the issue at hand?00:11
Keybukno idea00:12
Keybukdon't have a plan yet00:12
TomJaegerthere's also the issue that if X is started while cryptsetup is asking for a password, it'll activate its own virtual terminal.00:17
Keybukyes, that's fine00:18
Keybukcryptsetup is asking with usplash on vt800:18
KeybukX starts on vt700:19
TomJaegerwon't X switch to vt7?00:20
Keybukyes00:20
TomJaegerhow is this not a problem?00:21
Keybukit is00:23
Keybukdo you have a solution?00:23
TomJaegerno00:23
Keybukme neither ;)00:25
TomJaegerokay then, thanks for your input, I'll go ahead and post the relevant parts of the conversation on the bug tracker, so that everybody is on the same page.00:27
ionkeybuk: http://bazaar.launchpad.net/~ion/ubuntu/karmic/mountall/fsck-locking/revision/10900:57
Keybukion: that looks a bit hairy :-/00:59
ionkeybuk: Please elaborate.01:00
Keybukas in that's O M G that's a large patch01:02
KeybukI'm scared to apply that without a massive amount of testing01:02
ionThe deletions basically rip out the queuing, so that checks are started in parallel again, and the additions basically keep a list of active checks sorted by priority and call setpriority and ioprio_set, which are allowed to fail.01:07
Keybukright, that's what I'm worried about ;)01:10
sadmac2ion: did you have an ioprio_set from glibc? last time I used it it was a manual syscall(__NR_ioprio_set)01:49
ionI used syscall()01:49
sadmac2ion: yeah. someone should send patches for that.01:50
=== h\h is now known as haraldh
ionkeybuk: How about putting the patch to ~ubuntu-boot PPA and trying to get a lot of people to test it? :-P13:11
=== robbiew-afk is now known as robbiew
=== Keybuk_ is now known as Keybuk
katreI'm having some trouble trying to grab the upstart source (to track down a bug in upstart on sparc)17:15
katreAnyone mind helping me figure what's up?17:15
Keybukhow are you trying to grab it?17:19
katreso I have a machine (also sparc) running Jaunty17:19
katreI installed bzr, which grabbed version "Bazaar (bzr) 1.13.1"17:20
katreI then ran "bzr get https://code.launchpad.net/upstart/trunk"17:20
katreand got an error: bzr: ERROR: Unknown repository format: 'Bazaar repository format 2a (needs bzr 1.16 or later)\n'17:20
Keybukyou almost certainly need bzr 2.017:20
Keybukthere you go then17:20
katreokay, is that installable on jaunty?17:20
Keybukyes17:20
Keybukhttp://bazaar-vcs.org/17:20
katrehow would I do that?17:20
katreis that installable on jaunty from a package?17:21
Keybukthe documentation is on the bazaar website17:21
Keybukit is, yes17:21
katrebecause, let me be frank, if I cannot use the current release of ubuntu to do ubuntu development, that is amazingly limited17:21
Keybukfor Upstart, my rule tends to be that it should compile and build on the current stable release17:23
Keybukbut you might need the current *development* release to run it17:23
Keybuksince the next stable release actually uses upstart much more fully than before, that's going to be increasingly true17:23
katreyeah, I can't install the development release, because of this sparc bug I'm looking into17:23
Keybuk*nods*17:24
Keybukbzr is a bit of a special case sadly17:24
Keybukthe bzr devs have pushed 2.0 quite strongly17:24
Keybukand there are lots of strange issues when interoperating17:24
katreso, anyway, I don't see a package for bzr 2.0. where do I grab it?17:24
Keybuknot to mention LP has already been upgrade to 2.017:24
katreyeah17:24
Keybukkatre: if you're on sparc, you may have to grab the source from the PPA and build it youself17:25
Keybukhttps://edge.launchpad.net/~bzr/+archive/ppa certainly has the 2.0 source package17:25
ionkeybuk: So... What to do with the fsck priority patch? Do you see a way to make it considerably smaller or to get enough testing, or should i just forget about it? :-P How about putting a it to the ubuntu-boot PPA for testing?17:29
katrethanks17:29
Keybukion: I just don't see myself being able to convince the release manager to let me ship that the day before we freeze17:30
Keybukespecially since, right now, it looks like we've fixed all the bugs17:30
Keybukwe literally freeze tomorrow, from then on it's all about getting a set of cd images that work17:31
Keybukintroducing changes like that ... difficult to sell17:31
ionAlright17:31
Keybukbut I'll certainly merge it straight into lynx ;)17:31
ionYeah17:31
katreGeez, bzr wants to install 61 packages as build dependencies?17:43
katreincluding x windows fonts, I see17:43
katreprobably due to wanting graphviz, I guess17:45
katreOkay, so now I have a working bzr, I can grab the upstart trunk and the libnih trunk.18:23
katreHow do I build those? Neither the README nor the HACKING files actually answers that18:24
katrethe README refers to an INSTALL file that does not exist18:24
katreI tried running 'autoconf' in each, and it rana  bit and then errored out18:26
katre(I can provide the error message if that helps)18:26
katreactually, I misspoke. autoconf runs fine, then ./configure runs a bit and finally gives "configure: error: cannot find install-sh or install.sh in "." "./.." "./../..""18:37
sadmackatre: you configure libnih first. Then you go into the upstart folder and do ../relative/path/to/libnih/nihify and then you configure upstart.18:40
sadmacsee if that helps18:40
katresadmac: Thanks. I get the same error for libnih18:41
sadmackatre: then its a system thing. what platform is this that you had to compile your own bzr?18:41
katreLooks like my problems are firstly that libtool isn't installed and didn't get pulled in as part of build-dep18:41
sadmacoh. that'll do ya18:42
katreand secondly that I've never used autoconf before and there's no documentation of the exact commands to run to get from a fresh source tree to something compilable18:42
katresadmac: I'm on sparc18:42
sadmackatre: what distro?18:42
katreubuntu server, jaunty18:42
sadmackatre: autoreconf -i18:43
katrethanks18:43
katreautoreconf wants cvs? okay, let's install that18:44
sadmacwat18:45
katreit gave an error that cvs wasn't found. I installed it and now it's running18:46
katrebetween that and bzr pulling in all of X I've installed a heck of a lot of stuff just to build upstart18:46
katreI feel like I'm getting closer18:53
katreautoreconf looks like it worked fine, but when I run configure it ends with this error18:53
katre| /configure: line 20354: PKG_PROG_PKG_CONFIG: command not found18:53
katre| ./configure: line 20367: syntax error near unexpected token `0.22'18:53
katre| ./configure: line 20367: `PKG_PROG_PKG_CONFIG(0.22)'18:54
katreI did run aclocal before I ran autoreconf18:55
katreAh, google suggests an unresolved dependency on pkg-config18:57
katrelet's try it...18:57
katrenope18:58
sadmackatre: sounds like a missing macro... Scott's really better with this stuff...19:00
katreyeah, I had to re-run aclocal and autoreconf19:03
katreand now it dies complaining it needs a newer dbus19:03
katreI give up19:03
* sadmac thought autoreconf -i did the aclocal thing19:03
katreif I can't actually build upstart in the currently released ubuntu distro, I can't do it19:03
sadmacubuntu doesn't ship the newer dbus either?19:03
sadmachmm19:03
katremaybe it does, I'm deep into cargo cult compiling right now19:03
sadmacFedora didn't, but I'dve thought ubuntu did19:03
katre| checking for DBUS... configure: error: Package requirements (dbus-1 >= 1.2.16) were not met19:04
katre| apt-cache policy dbus: Candidate: 1.2.12-0ubuntu2.119:04
sadmackatre: upstart uses a lot of dbus that other applications never have. A result has been that we found problems with dbus that nothing else ever stumbled on. That dbus release has the resulting pile of fixes19:04
katreSure19:05
katreI don't doubt there's a good reason19:05
katreI just know that I've been banging at this for a bit and determined that there's no easy way to get into mupstart development19:05
sadmackatre: what version of upstart do you have on the system now?19:06
katreand since no one else seems particularly worried that the next version of upstart crashes on sparc, it'll stay until someone else tries to fix it19:06
katreapt-cache policy says 0.3.9-819:06
katrethis all started when I tried upgrading my sparc system to karmic, and the new upstart crashed in the install19:06
katreso I will either keep these servers at jaunty or find a new distro that actually supports sparc (I am aware that sparc is not officially supported by ubuntu but it's been fine til now)19:07
sadmackatre: how did you end up building upstart because karmic crashed?19:08
sadmackatre: fedora's sparc support is semi-official. that's a bit of an improvement...19:08
katreI grabbed the upstart source from bazaar, thinking if I can at least build it I could try and run down the problem19:09
katrebut apparently I can't build upstart on jaunty without installing, so far, about 70 packages and building bazaar from source19:10
sadmackatre: wait, how did the new upstart crash the install?19:10
katreI could try grabbing dbus-1 and building that too, but frankly I give up, this is too frustrating19:10
katrehttps://bugs.launchpad.net/ubuntu/+source/upstart/+bug/43675819:10
katreI was trying to get to the point where I can run 'make check' and see if I can duplicate the failure mentioned here19:11
katre(I did grab the source for the 0.3.9 version in jaunty and it passes all checks, as expected)19:12
sadmackatre: you could disable the dbus check in the makefile. you'll get piles of errors in make check though (since it'll trip over all those bugs that were fixed)19:15
katreyeah19:16
sadmackatre: you could also try a scratch-install of karmic on a vm.19:17
sadmackatre: or you could mount a drive from a karmic live cd (if they make such things for sparc)19:17
katrethey don't19:18
sadmackatre: I'd find whoever told Scott that make check failed and have him reproduce it wherever he reproduced it19:23
katreyeah19:25
katreThanks very much for the help19:26
sadmacnp19:27
ionMisc. rambling: instead of a ‘startup’ event, 0.10 should have a ‘system’ state. Instead of ‘start on startup’, jobs would have ‘while system’. Shutdown/reboot would happen by running ‘stop system ACTION=reboot’; all ‘while system’ jobs would stop and there would be a halt.conf job that looks something like ‘around system’, ‘post-stop exec if [ "$SHUTDOWN_ACTION" = reboot ]; then reboot -f; else halt -f; fi’.19:31
sadmacion: there's neither. to start on startup you just don't put any while or on stanzas19:31
sadmacion: a job with no on stanzas starts a soon as its conditions are met.19:32
ionHow about if you only want to start a job manually?19:32
sadmacion: you set the job in manual mode via a separate configuration file.19:32
ionA ‘system’ state would be an elegant solution for halting IMO. :-P19:33
sadmacion: maybe19:35
sadmacion: its actually a nice addition to the current mechanism. All your crash-only jobs that don't need to be killed before cutting the power can just omit the while system stanza19:36
sadmacion: so "while system" is how a job indicates its sensitive to sudden power evaporation19:36
ionTrue, true19:38
ionHow to tell the halt job whether to halt or reboot? I’m not sure whether environment from the ‘stop system’ command should be available to halt.conf’s post-stop script.19:39
sadmacion: it would be as of now19:40
ionOh? Alright :-)19:40
sadmacion: it would /not/ be in 0.3. We fixed this.19:40
ionIn fact, Upstart wouldn’t really need to treat the system state in a special way, there could simply be an empty /etc/init/system.conf that comes with the package. People would just be told to point to that for anything that requires some action before halting the system.19:49
sadmacion: maybe. There could be advantages to internalizing it too, since it starts so friggin early19:55
sadmacion: an idea: suppose upstart ran from initrd19:55
sadmacion: system pre-start becomes the core script of dracut as it is now. when system itself starts, upstart re-execs on the new root.19:56
ionYeah19:59
ionkeybuk: A summary of what we discussed above: a ‘system’ state in 0.10 could provide an elegant way to handle shutdown. Any job that requires some action just before halt/reboot would do ‘while system’ and possibly have a pre/post-stop script, whereas on-startup jobs that don’t mind the computer suddenly disappearing would not have any while/on stanzas. To reboot, one could run ‘stop system SHUTDOWN_ACTION=reboot’; halt.conf could contain something ...21:41
ion... like ‘around system’, ‘post-stop exec if [ "$SHUTDOWN_ACTION" = reboot ]; then reboot -f; else halt -f; fi’. In fact, Upstart wouldn’t necessarily need to handle the ‘system’ state in any special way, a standard /etc/init/system.conf with no contents would suffice, but an implicit job would be nicer IMHO. sadmac pointed out that Dracut’s core script could be a pre-start script for the system job if Upstart is started from initramfs.21:41
Keybukhow would you deal with unmounting the root filesystem?21:42
Keybukwhich needs all processes killed?21:42
Keybukcan you mail the log to the ML so I can digest? :p21:43
ionI’m probably missing something, but couldn’t one do a lazy unmount?21:43
Keybukif events had before/after periods and you had priorities that could really work21:43
Keybukion: no, you can't lazy remount <g>21:44
sadmacKeybuk: this is just before shutdown?21:53
Keybukyes21:56
ionThe filesystem state could have ‘while system and stuff’ and anything that needs to close files would have ‘while filesystem’. stop system → anything depending on filesystem would stop, the filesystem job would stop (handle unmounts etc. here), the system job would stop, the halt job would stop (and shutdown the system).22:07
ionkeybuk: https://lists.ubuntu.com/archives/upstart-devel/2009-October/001097.html22:14
Keybukafter system22:15
Keybukmount -o ro,remount /22:15
Keybukreboot -f22:15
Keybuktype thing?22:15
ionThat could actually be just in system.conf’s post-stop script, no real need to have another job just for that.22:16
Keybukgood point22:18
ionI’d probably like Upstart to internally initialize a ‘system’ job with an empty job with no while/on conditions (so that it simply starts immediately), but anything in system.conf would extend that (e.g. the post-stop script to shutdown the box).22:21
ionIf system.conf is missing for any reason, any jobs with ‘while system’ would still start.22:22
Keybuknot a bad idea22:23
Keybukion: that fits a pattern I've been thinking about23:39
Keybukhave init parse its arguments, and each "word" is the name of a job that will be started23:40
Keybukif a config exists, it's started with the config23:40
Keybukotherwise it's just started with no config23:40
Keybukie. you'd end up with system states for "quiet", "splash", "emergency", "single", etc.23:40
ionGood idea23:40
Keybukwe could just build in system like that23:41

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