=== ion_ [i=ion@heh.fi] has joined #upstart === ion_ [i=ion@heh.fi] has joined #upstart === AlexExtreme looks through his logs to find that profiles discussion [10:12] oops === ion_ [i=ion@heh.fi] has joined #upstart === Keybuk [n=scott@quest.netsplit.com] has joined #upstart === jonibo [n=jonas@213.212.2.165] has joined #upstart === Md [i=md@freenode/staff/md] has joined #upstart === Md [i=md@freenode/staff/md] has joined #upstart === eroyf [n=eroyf@gentoo/developer/paludis.minion.eroyf] has joined #upstart === tale [n=tale@207.235.54.1] has joined #upstart === asdaf [n=Ack@213-140-11-128.fastres.net] has joined #upstart [03:53] hello, I have a question, is there any way to prevent script stanzas to be executed by a shell with -e option? [04:02] Why would you not want -e? [04:02] you can easily prevent the script from terminating if a certain command fails by putting || true after the command [04:04] ion_, sometimes is a bit constraining [04:05] you may want to let something fail ignoring the failure [04:05] you can easily prevent the script from terminating if a certain command fails by putting || true after the command [04:05] you can ^^ [04:05] AlexExtreme, that's what I'm doing [04:06] but it's not very elegant to put a lot of ||true in the scripts :) [04:06] I agree -e should be the normal behaviour [04:06] but I think it may be useful to have a way to switch off this option [04:07] say an option in the job description [04:07] or do like this: [04:08] pre-start script nofail [04:08] blah [04:08] end script [04:08] Is this an already implemented option? [04:09] no, i'm saying an example of how it could be implemented :) [04:09] if it were implemented i would have told you in the first place :) [04:09] AlexExtreme, ok :) this would be nice [04:10] why not just put "set +e" at the top of the script? [04:10] pre-start script [04:10] set +e [04:10] # broken stuff [04:10] end script [04:10] hmm. that's a point [04:11] i'm forgetful sometimes ;) [04:26] Keybuk, right, that's the easiest way :) [04:27] but i like the syntax AlexExtreme proposed :) [04:27] well, if there's a way to do it already a new syntax would be pointless [04:32] AlexExtreme, it's just semantic sugar, but maybe putting it into the script declaration would be more explicit [04:33] maybe [04:34] I don't really see the need for the semantic sugar [04:34] -e is a sensible default, and sh gives you a mechanism to turn it off === rgl [n=Rui@84.90.10.107] has joined #upstart [04:36] hi [04:37] on ubuntu edgy upstart is not installed by default? [04:38] it is [04:39] mine is not :| [04:39] I've upgraded from previous version. [04:39] did you upgrade from an older version? [04:39] ah [04:39] oh, but I did an aptget update, and now it wants to install upstart [04:56] the Ubuntu release notes recommend the dist-upgrader tool over apt-get [04:56] what's happened is APT has refused to remove the previously Essential sysvinit [04:56] without taking into account that sysvinit is no longer Essential, and has been replaced by Upstart [05:19] oh, I see. [05:19] why is the need for anther tool? :| [05:21] humm, but after this apt-get dist-upgrade, the sysvinit was removed, and replaced with upstart. [05:22] humm, not when I do an "apt-get install" it says: 0 upgraded, 0 newly installed, 0 to remove and 29 not upgraded. [05:23] but how can I see the "29 not upgraded"? [05:24] how, they show up when I do: apt-get -s dist-upgrade ... [05:25] how can I see the reason for holding back a package? the 29 packages are all python-* ones === juergbi [n=juerg@80-219-19-101.dclient.hispeed.ch] has joined #upstart [07:30] is there a upstart manual? some place that shows what events are availble? [07:30] any event you emit with initctl is available [07:32] but where are the standard ones defined? === rgl "initctl emit " does not work with 0.2.7 [07:34] they aren't at this point [07:34] Upstart is still in development, as are the sets of "standard" events [07:35] oh ok. [07:36] the "restart" stanza restarts the daemon if it dies, correct? and "exec" only starts it once? [07:36] it's respawn [07:37] oh yes. "respawn", my bad hehe [07:38] you shouldn't use "respawn SOMETHING" [07:38] use [07:38] respawn [07:38] exec /sbin/daemon [07:38] -- [07:38] otherwise you'll be bitten when you upgrade to 0.3.x (which only permits respawn on its own line0 [07:39] Keybuk, oh, I saw the respawn line on "logd", and it has no exec :| [07:39] sure, because the same file in 0.3.x has two lines [07:42] how can I do this: have a "php-fastcgi" service that does nothing (it just emits the "php-fastcgi" event) and have several "php-fascgi-1", "php-fascgi-2", etc, that are started/stop when ""php-fascgi" is started/stoped? [07:43] I can just "exec /bin/true" on "php-fastcgi", and "start on php-fastcgi" on the "php-fastcgi-N"? [07:47] why do you want to do that? [07:49] I want to start several PHP FastCGI instances without having to start each one by hand. [07:50] Keybuk: Sounds like you're an upstart core dev. [07:50] I mean, I want to "start php-fcgi" and let upstart do a "start php-fcgi-N" for all the PHP FastCGI instances I've defined. [07:51] are the instances different in configuration? [07:51] esr: s/an/the/ :-) [07:51] Keybuk, they are. each one open a different unix domain socket. [07:53] ok; yeah you could do pretty much what you describe [07:53] though the exec /bin/true would terminate and you couldn't stop them with the same command [07:53] how? :) [07:53] yeah, I've did that. and it just fails to start the other PHP instances *G* [07:53] you're using 0.2.7? [07:54] the alternative was to have a master one, but if that master dies for some reason, it will brong the other instances down, and then up again. which is not good :( [07:54] Keybuk, yes. 0.2.7 on edgy. [07:54] try start on php-fastcgi/started === Keybuk tries to remember the syntax [07:55] there's an interesting use case for instances here [07:58] Keybuk, like http://pastie.caboo.se/66161 ? [07:58] yes, though it'll stop pretty quick [07:58] since "/bin/true" doesn't last long === evand [n=evand@ubuntu/member/evand] has joined #upstart [07:58] yeah. so, no good === bac [n=bac@canonical/launchpad/bac] has joined #upstart [08:00] I would be nice to have "virtual" services, that is, a service with no "exec" is a "virtual" service; when you "start" a virtual service it just "remebers" it is started, and so on. [08:00] if you use 0.3 you can simply define a job without any exec for the main job iirc [08:00] rgl: we have those ;-) [08:00] ah cool :) :) [08:00] oh [08:00] random bug on your paste [08:00] you need "runlevel-2" and "runlevel-1" [08:01] Keybuk, oh, thats a bug on the wiki page then! *G* [08:01] the wiki documents 0.3.8 [08:01] actually, http://upstart.ubuntu.com/getting-started.html [08:02] is there a backport of 0.3.8 to edgy? or I can just recompile, and go with it? [08:02] you'd be better off upgrading to feisty IMO [08:02] you can probably just download the packages from feisty and install them [08:02] (YMMV, NUSPIS, WVIR) [08:02] AlexExtreme, I can't right now. [08:05] can I go away with just upgrading the upstart package? or do I have to upgrade all upstart-* ? [08:05] all [08:05] upstart, upstart-compat-sysv, system-services, startup-tasks, etc. [08:08] "etc" is "upstart-logd"? :) === bac [n=bac@canonical/launchpad/bac] has left #upstart [] [08:09] right === Keybuk postulates [08:09] instance [08:10] for file-exists /etc/event.d/php-fcgi-* [08:10] (err, /var/run/php/fcgi.*) [08:10] exec /usr/bin/php5-cgi -b $FILE [08:10] bit sticky, but that might work in 0.5 [08:13] oh: [08:13] dpkg: regarding upstart_0.3.8-1_i386.deb containing upstart, pre-dependency problem: [08:13] upstart pre-depends on libc6 (>= 2.5-0ubuntu1) [08:13] libc6 is installed, but is version 2.4-1ubuntu12.3. [08:13] oh [08:13] meh, you'd have to rebuild then [08:13] crappy packaging system [08:13] but the damn think installated the other packages ... oh oh [08:14] you should find packages to downgrade to in /var/cache/apt/archives [08:14] if not, download them again [08:14] dpkg is crappy or just the dependencies? ;) [08:14] AlexExtreme: both :p [08:14] :) [08:14] actjal, [08:14] actually [08:14] dpkg is crappy [08:14] since the packages *do* have dependencies, that doesn't stop dpkg from overwriting the old ones though [08:15] Keybuk, what do you mean with "0.5"? [08:15] rgl: 0.5 is the version of upstart I'm working towards at the moment; it has a few interesting features [08:16] Keybuk: Are the System V runlevels going to continue to have any real meaning in an upstart environment? I'm asking because I've written a workalike of chkconfig that uses update-rc.d as a back end. [08:16] esr: we're always going to have to support packages that assume System V, because they'll exist for as long as vendors support them [08:16] Keybuk, humm, so I can't make it work with 0.3.8? [08:17] rgl: you can do it your way with 0.3.8 (have a master job, and use it to start/stop other jobs) [08:17] esr: so we'll always ship jobs that run the legacy sysv-rc script [08:17] esr: I don't think that runlevels make much sense in a pure Upstart environment, since they're pretty arbitrary and poorly defined across even Linux distros [08:18] Can I give you a copy of my chkconfig clone to package with upstart, then? Some third-party apps expecting a System-V like runlevel setup actually depend on it. === AlexExtreme currently runs a system with absolutely no /etc/rc.d at all ;) [08:19] It's pure bash plus sed. There's a man page. [08:19] esr: it'd certainly make sense to have it packaged in Ubuntu [08:20] That's what I'm thinking. I'm running Ubuntu and it's the environmrnt I wrote chkconfig for. [08:25] hmm, dot compiled with pango and cairo support makes the state machine diagram look so much better :P [08:27] Keybuk: Where should I mail the code and man page for your consideration? [08:27] upstart-devel@lists.ubuntu.com [08:28] AlexExtreme: got a patch? I can fix our graphviz [08:29] hold on [08:30] http://ftp.frugalware.org/pub/frugalware/frugalware-current/source/xapps-extra/graphviz/FrugalBuild << the necessary depends and compile options are in there [08:31] could you mail that me (scott@ubuntu.com); I'm in the middle of three things right now :-/ [08:31] sure [08:32] done [08:48] Keybuk: Code and man page mailed. And best of luck on the world domination thing -- I think upstart is very elegant, I'd like to see it win. [08:50] thanks [09:08] Keybuk, so, you are working on 0.5, but is there a 0.4? :D [09:15] Keybuk, humm, as of 0.3.8, the logd service still uses respawn /sbin/logd [09:20] no, there's no 0.4 [09:20] ACK :D [09:21] why not? [09:21] oh, there seems to be a bug on 0.3.8. when you do a "start php-fcgi" (my service that does no have a exec), start never ends :-( [09:22] it stays at prompt waiting for something (stdin?) [09:22] you need to put the service keyword in the job file [09:22] otherwise initctl assumes that it needs to wait for something to finish ;) [09:23] what service keyword? :D [09:23] just write a line saying 'service' in the job file [09:24] humm, but what is initctl waiting for? there is no exec line, so, why not assumer "service" automatically? [09:24] well [09:25] AlexExtreme, that did the trick. thx :D [09:25] a job without anything to run is a state afaik, so initctl will remain running while the system is in that 'state'. once it is stopped initctl will exit [09:26] you are talking chinese to me hehe [09:27] heh ;) [09:28] there is a "start", a "stop", but well, no "restart", howcome? *G* [09:28] (comand line utility that is ;) [09:28] if you want a restart, simply write a script :) [09:28] #!/bin/bash [09:29] stop $1 && start $1 [09:29] why not follow the route of red-hat with "service start service-name"? [09:29] :) [09:38] OT: how do I extract the number from the string "php-fcgi-1" using bash? :| [09:38] echo php-fcgi-1 | sed 's,.*-(\\d+),\\1,g' does not seem to do the trick :( === evand [n=evand@ubuntu/member/evand] has left #upstart [] [10:00] how do I get the name of the service file from within a "script" block? [10:03] got it... its the UPSTART_JOB env variable (read from http://upstart.ubuntu.com/wiki/JobEnvironmentVariable) [10:12] how, why do I need to have a "service" keyword on the service file? :| [10:23] can't make this work :( [10:23] can you look at http://pastie.caboo.se/66237 ? === Md [i=md@freenode/staff/md] has joined #upstart === mbiebl [n=michael@p549CDD20.dip.t-dialin.net] has joined #upstart === rgl_ [n=Rui@84.90.10.107] has joined #upstart