/srv/irclogs.ubuntu.com/2009/06/29/#upstart.txt

iamthelostboyhi.. i have serveral upstart jobs which run in turn on startup.. one of them is pretty basic, consisting mainly of a single exec <command> in script tags05:57
iamthelostboywhen it is first started by upstart, the program it runs is left running, and the upstart script goes into a waiting mode, when it should be running...05:57
iamthelostboywhen i then exit the application, upstart doesn't continue to do the various things it should05:58
iamthelostboyif i start the job manually, it all seems to work05:58
iamthelostboyany ideas what I am doing wrong?05:58
Keybukiamthelostboy: it's likely that the process actually doesn't stay running09:58
Keybukand instead turns itself into a daemon09:58
Keybukdo you have the output of the "start" command for that job?09:58
KeybukI wish the test suite wouldn't take 35 minutes to complete when run under valgrind12:05
MoncaderI have a bit of a question for jobs. The event system makes sense for starting a job, but what about stopping? Do we have to make two jobs per 'application' (Start and Stop of the init scripts)15:08
sadmac2Moncader: um... could you try to rephrase that?15:11
KeybukMoncader: Upstart jobs are written in a declarative form, not an imperative form15:11
Keybukie. instead of describing how to start and stop the service, you instead describe what the service *is*15:12
Keybukthe ability to stop that service is inherently built in to Upstart15:12
Keybuk(send SIGTERM, wait, then SIGKILL)15:12
MoncaderHmm, this is true for running exec stanzas or scripts that run a single application.15:13
MoncaderHowever, what about the case of say, an initial system startup script, and then the equivalent shutdown?15:13
sadmac2Moncader: usually the wrong way to do it. However pre-start/post-stop etc are the way to do that15:15
KeybukMoncader: can you give an example15:17
Keybukdo you mean like having a job to mean "mount/unmount filesystems" - where on the way up it mounts them, and on the way down it unmounts them?15:17
MoncaderWell. Currently, I'm building yet another Linux from Scratch system. This time I thought I'd use a different init system. So I'm going for a 100% upstart system, trying to get rid of the whole rc.d structure.15:18
MoncaderTo do that, there were a couple scripts (rcsysinit, rc.local) that do things only on startup.15:18
Keybuksure, but bear in mind that Upstart isn't just a "better sysvinit" - it's quite different15:18
Keybukthe "only do things on startup" case are interesting15:18
Keybukthe best way to do those are as tasks15:18
Keybuke.g.15:18
Keybuk  task15:18
Keybuk  script15:18
Keybuk    ....15:18
Keybuk  end script15:18
Keybukstarting a task will block until it is finished, not until it is running15:19
Keybukso "start rc.local" won't return until rc.local is done15:19
Moncadermm. Guess so. Just that upstart is supposed to be a full replacement for sysinitv, so I was wondering what to do in that case.15:19
MoncaderAlright15:19
Keybukor if you had "start on starting foo" in rc.local, foo would not be started until rc.local was *finished*15:19
Keybukit's a full replacement for sysvinit, not sysv-rc15:19
Keybukmany people confuse the two15:19
MoncaderAh, I see15:20
KeybukUpstart can run the sysv-rc script (usually /etc/init.d/rc) just as well as sysvinit can15:20
Keybukbut it doesn't deal with /etc/rc2.d and stuff, you run the sysv-rc script from Upstart to do that15:20
MoncaderYes, which is of course what most distros are doing now.15:20
Keybukanother common pattern in Upstart is that the job implies a state15:20
Keybukfor example, "mountfs" could be always "running" when the filesystems are mounted15:21
Keybukstart mountfs would mount the filesystems15:21
Keybukand stop mountfs would *unmount* them15:21
Keybukthe way to do that in Upstart is using pre-start and post-stop without a primary exec/script15:21
Keybuke.g.15:21
Keybuk  pre-start exec mount -a15:21
Keybuk  post-stop exec umount -a15:21
Keybukthat's valid, even though there's no "exec"/"script" on its own15:21
MoncaderHeh, interesting way to do it.15:21
KeybukUpstart will claim it's running with no process15:22
Keybuk  "start on starting mountfs" is still valid - will be run before mount15:22
Keybuk  "start on started mountfs" is still valid - will be run after mount (thus when the filesystems are up)15:22
Keybuk  "start on stopping mountfs" is still valid - will be run before umount15:22
Keybuk  "start on stopped mountfs" is still valid - will be run after umount (thus when the filesystems are gone)15:22
MoncaderI see. Thank you.15:22
Keybukyou might realise that it's trivial to wrap initscripts like this ;)15:23
Keybuk  pre-start exec /etc/init.d/foo start15:23
Keybuk  post-stop exec /etc/init.d/foo stop15:23
MoncaderYes :) But for fun I'm trying to get rid of init scripts :)15:23
KeybukUpstart won't know the pid and suchlike while it's running, of course, but it's "close enough" for most people15:23
Keybuk- and I have a solution for that too :p15:24
MoncaderHeh, of course :)15:24
Keybukmy life is made so much easier by tests/expected :)16:06
KeybukTEST_EXPECTED_STR (str, "foo.c");16:06
Keybukcompares the contents of str against the contents of tests/expected/foo.c16:06
Keybukand also TEST_EXPECTED_FILE (fp, "foo.c");16:07
ionNeat16:07
mbieblKeybuk: just some small nit17:05
mbieblthe copyright assignment pdf linked on http://upstart.ubuntu.com/wiki/CopyrightAssignment17:05
mbieblhas a wrong url in the pdf document17:05
mbieblClicking on 17:06
mbieblhttp://17:06
mbieblcanonical.com/contributors17:06
mbieblsends you to http://www.canonical.com/contributor (note the missing 's')17:06
Keybukmbiebl: I'll let Amanda know17:06
mbieblKeybuk: is this copyrigth assignment bound to the email address I use for signing?17:08
Keybukthanks17:08
Keybukmbiebl: I'll tend to use the e-mail address for the ChangeLog17:08
Keybukunless you want me to use a different one17:08
mbieblKeybuk: my launchpad account uses a gmail address, but I don't use that address for signing emails17:09
Keybukthe mail doesn't have to be signed AIUI17:11
KeybukGPG signed, that is17:11
Keybukthe text itself is a signature under UK law17:11
mbieblKeybuk: I was just wondering if I send a patch using a different email address than the one that was used for signing the copyright assignment17:12
Keybukthat's ok ;)17:13
mbieblhm17:14
mbieblhow do you know then that the persons behind mbiebl@gmail.com and say biebl@debian.org are actually the same person?17:15
mbieblMaybe I'm just seeing a problem where there is none ;-)17:19
Keybukmbiebl: I can always ask if unsure ;)17:21
Keybukwhich e-mail address would you like in ChangeLog btw?17:22
mbieblI don't really mind ;-)17:23
KeybukI suspect you're just thinking from a Debian point of view17:23
Keybukwhere everything has to be signed, and everything has to have a trust path17:23
Keybukand all 'i's must be dotted and all 't's crossed17:23
KeybukCanonical's Contributor Agreement was written by a lawyer17:24
Keybukthey see through games like "aha! but I sent it from a different e-mail address" <g>17:24
mbiebl:-)17:24
Keybukplus it's not an assignment of copyright per se17:24
Keybukit's a copyright licence17:25
sadmac2Keybuk: I've polished up the state transfer patch, but I'm not entirely sure what sort of testing I should do on it. Its really wired in to everything else, it could end up comprising a system test depending on how much fudging we do.17:25
Keybuksadmac2: the code should at least be covered under tests/17:26
sadmac2Keybuk: if that's the water mark, then I'll have it done soon.17:26
sadmac2Its only 2 functions, so just poking them doesn't take much time17:27
Keybukit's basically so we can prove it works17:27
Keybukand isn't broken by future changes17:27
mbieblKeybuk: is there a reason why upstart is still registered as GPLv3 project on the launchpad page?18:38
=== notting_ is now known as notting
Keybukmbiebl: forgot to change it19:44
Keybukfixed19:45
=== notting_ is now known as notting
achivettaI have a network file system that I boot a large number of server off of, I would like to be able to run a getty on ttyS1 on those servers which have an appropriate device \23:37
achivettahowever, on some servers, getty complains of a input/output error on ttyS1 and is restarted by upstart after quitting, is there any way to prevent upstart from continuously restarting the getty?23:37
achivetta(alternatively, can someone point me to the documentation on the format of the files in /etc/event.d)23:38
achivettaah, found it, http://upstart.ubuntu.com/wiki/Stanzas , thanks anyway23:46

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