/srv/irclogs.ubuntu.com/2012/01/20/#upstart.txt

SpamapStmike: the test suite is not meant to be run as root, in fact I believe it is meant to fail as root04:44
SpamapStmike: there's one fail that is no big deal, just a different error message. The one where len is expected to be 13 and is 0 looks more serious.04:46
=== ion__ is now known as ion
pmjdebruijnhi13:05
pmjdebruijnare there known issues with upstart and lots of file descriptors?13:05
pmjdebruijnI'm running dansguardian -N (=foreground) from an upstart job13:05
pmjdebruijnwith 4000 file descriptors13:05
pmjdebruijnseems to work fine from the init script13:05
pmjdebruijnthough I'm wondering if upstart ignores the ulimit I have in there... and/or the security/limits.conf13:10
jodhpmjdebruijn: upstart doesn't have pam support so limits.conf is not used.13:29
pmjdebruijnah ok13:29
pmjdebruijnbut settings ulimit -n in the pre-start script doesn't seem to help either13:30
jodhpmjdebruijn: that's because the pre-start is run as a process so any other process spawned from that job won't be affected by what you do in pre-start.13:32
jodhpmjdebruijn: You need the limit stanza - http://upstart.ubuntu.com/cookbook/#limit13:32
jodhpmjdebruijn: init(5) for full details.13:32
pmjdebruijnjodh: that makes sense, but the squid package in maverick has ulimit set in pre-start13:34
jodhpmjdebruijn: sounds like you found a bug then ;-)13:34
pmjdebruijnheh13:37
jodhpmjdebruijn: still seems to be a problem in precise: http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/precise/squid/precise/view/head:/debian/squid.upstart Could you raise a bug on this? (so you get the kudos :) - https://bugs.launchpad.net/ubuntu/precise/+source/squid/+filebug13:37
pmjdebruijnjodh: I haven't verified this is a problem in squid13:38
pmjdebruijnI just used it as a (bad) example13:39
pmjdebruijnwell let me file the issue13:51
jodhpmjdebruijn: thanks. either that "ulimit -n" needs to be moved to the script section, or "limit nofile $var $var" syntax needs to be used.13:52
pmjdebruijnhttps://bugs.launchpad.net/ubuntu/+source/squid/+bug/58059013:52
pmjdebruijnthough that contains a verification13:52
pmjdebruijnodd13:52
tmikeWould anyone happen to know if this error in the build logs is a serious issue?: http://pastebin.com/9UCnd4gg13:53
tmikecheck log*13:53
jodhtmike: what shell are you using for /bin/sh?13:54
tmikebash13:54
jodhtmike: oh.13:54
jodhtmike: that explains it. /bin/sh is not supposed to be bash. However, please raise a bug on upstart so we can tweak the test case for this: https://bugs.launchpad.net/upstart/+filebug13:55
tmikeWhat is /bin/sh supposed to be, then?13:56
pmjdebruijndash probably13:56
jodhtmike: correct.13:56
jodhpmjdebruijn: correct even :)13:56
tmikeI could see that.  All right.  Building dash it is then.13:56
tmikeThis is on a linux from scratch build.13:56
tmikeWell, before I do that, is it a problem that I use bash instead of dash?13:56
jodhtmike: interesting!13:57
tmikeLots of fun.  It boots with sysv init right now, but I'm experimenting with upstart.13:57
jodhtmike: the recommendation is not to use bash for /bin/sh for performance but primarily security reasons. bash syntax is too expressive and dash is "just a posix shell"13:57
jodhtmike: since upstart is going to be using /bin/sh to run most of your jobs, it really is best to use a very basic shell.13:59
tmikevery interesting13:59
tmikethank you for your advice13:59
jodhtmike: See also http://upstart.ubuntu.com/cookbook/#debugging-a-script-which-appears-to-be-behaving-oddly14:00
tmikeThat's a very useful bit of information.  As it is, I'm having trouble even using the provide sulogin14:00
jodhtmike: to be clear, I'm not implying bash is actually insecure, but it's overkill for upstarts needs.14:01
pmjdebruijncheck-bashims is quite handy :D14:01
pmjdebruijncheck-bashisms even14:01
tmikelinux /vmlinuz-3.1.blah root=(hd0,3) init=/opt/sbin/sulogin behaves just like a regular init.  Starts up my daemons and dumps me at a login prompt14:01
jodhtmike: I'd be very interested to hear on your progress with linux from scratch. It might even merit a section in the cookbook.14:02
tmikethe upstart init itself gets to the point where it tries to mount my drives; I'm not sure whether it succeeds.  Then it prints some USB information and just stops14:03
tmikeWhich may very well be related to the link you posted above, hodh14:03
tmikejodh*14:03
tmikeIt's using the default init scripts at the moment as I haven't written any real upstart jobs for it, and I'm almost certain something in there needs to be modified to point back to a correct executable for upstart.14:04
tmikeBy default, I mean it's going through my sysv init scripts and running those14:05
tmikeI thought it would be worth a shot, because LFS is about as untainted an OS as you can get.  Most distros have a great deal of customization done where LFS is almost entirely vanilla source for all its packages.14:07
jodhtmike: well, you'll need to ensure the system boots with init=/sbin/init where that is the upstart binary. You'll also need to "SysV compat" jobs (rc.conf and rc-sysinit.conf) - http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/precise/upstart/precise/files/head:/conf/14:07
jodhtmike: I'd suggest reading the cookbook. In particular http://upstart.ubuntu.com/cookbook/#startup14:08
jodhtmike: udevd, upstart-udev-bridge and mountall are also going to be important. Maybe you could post to the upstart-devel ML with progress?14:08
tmikeCorrect, I've been in that cookbook for a while.  It seems I'll be handling a lot of that stuff manually; mountall looks a lot like it wants *ubuntu specific setups14:09
jodhtmike: Ubuntu does use mountall for mounting yes. It's "ubuntu-specific" in the sense that only Ubuntu uses it. Note that rhel 6 / centos 6 don't use mountall. They only use upstart minimally at this stage so it might be worth seeing what they've done to get you going.14:10
tmikeI may very well.  Mountall also doesn't seem like it wants to build without plymouth.  No offense to plymouth, but NO THANK YOU.14:10
tmike;)14:11
tmikeToo much effort to start building initramfs's and trying to configure all that garbage14:11
tmikeA shame actually.  Plymouth seems pretty nice, and if I had luks on this VM, I'd love to have a lovely interface for my password entries.14:12
tmikeThe 'start on' and 'stop on' directives, do they actually call the executables {start,stop} or are they interpreted?14:16
jodhtmike: they tell upstart when to start the overall job. See http://upstart.ubuntu.com/cookbook/#really-understanding-start-on-and-stop-on14:18
tmikeOkay.  Just wanted to make sure I didn't need to do anything ridiculous like change all "start on" to "/opt/sbin/start on"14:19
JanCan upstart job description isn't a script  ;)14:19
tmikeThat's exactly what I figured, but I thought it easier to ask rather than go down that road later when debugging, only to have to walk all the way back ;)14:20
tmikeMaybe this afternoon I'll set about building *.in files for these .confs for the make job, such as to prepend the $PREFIX/bindir to the commands.14:21
tmikefor the exec commands and such14:22
tmikeMy oh my these errors are colorful ;D14:34
tmikehttp://imgur.com/2HQI514:35
tmikeThat's all script-funkiness though.  Will need to discover why that stuff's not getting mounted.14:35
tmikeAwesome, got one step further.15:15
tmikerc-sysinit.conf tries to execute /etc/init.d/rcS, which my system doesn't have15:15
tmikeHowever, /etc/init.d/rc S (note that S is a parameter) replaces that functionality.15:16
tmikeAs dictated by my inittab.15:16
tmikeNow it crashes mounting my virtual filesystems15:16
tmikeAnd actually it only sort of dies.  I can let it continue past that point, where it runs up to just before giving me a login prompt, where it just stops15:19
tmikeFortunately, it starts SSH for me, so I can still SSH into it :D15:20
tmikeOnce I solve that problem, it will have worked virtually out of the box.15:21
tmikeWell, I guess not really.  Still a mess of errors in the logs.15:22
tmikeIt seems to repeat the whole process, which means I'm probably calling rc S twice, or further rc steps call rc S15:24
tmikeinitctl list lists all the tasks in /etc/init as in 'stop/waiting' though15:35
tmikeIs that correct?15:36
jodhtmike: you'd expect rc jobs to be stopped once the system has booted, yes. might be worth grabbing an Ubuntu image so you can compare your results with a normal upstart system.15:39
tmikeThat's what I thought.15:39
tmikeI expect that's the reason why the system manages to get to the end of the rc stuff, but never places me at a login.  There's either something that's missing or it's in a race condition.15:40
tmikeAnd it never releases from the rc jobs15:40
tmikeMy host is ubuntu, so it'll be easy to dig in there to see15:41
jodhtmike: look at this for some hints: http://upstart.ubuntu.com/cookbook/#debugging. have to afk...15:41
tmikeThanks for your help15:43
tmikeSo, when you get back, or to anyone else who's around, does 'stop/waiting' mean it's not yet started, that it's stuck waiting TO stop, or that it has stopped?16:07
jodhtmike: that's the "rest" state - it has either never started, or has now stopped. See http://upstart.ubuntu.com/cookbook/#initctl-status17:25
tmikeOkay, that's good then17:26
jodhtmike: Try booting with --debug/--verbose to see what events are being emitted and which jobs are starting, etc: http://upstart.ubuntu.com/cookbook/#add-verbose-or-debug-to-the-kernel-command-line17:26
tmikeSeems everything is groovy there17:55
jdiggyHi! I'd like to check for the existence of Upstart in a script. The best idea that I've had so far has been to check the output of `init --version`.20:06
jdiggyany way to reimport my configuration without restarting? like if I screw it up and just want to reload it.20:31
jdiggyMy bad. wrong channel.20:32
jdiggyHere, I want to ask if anybody knows how to check whether Upstart is installed in, say, a Bash script? My current best idea is `init --version`.20:32
ionSome implementations of init might do something unexpected with --version, though.20:33
jdiggyAgreed. That's why I'm looking for something more reliable. The existence of some file or other. 20:34
jdiggyUpstart's configuration directory is called /etc/init. The bins are called init, start, stop, restart. 20:34

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