=== laszlop [n=laszlo@CPE0015e976f21f-CM0017ee427a40.cpe.net.cable.rogers.com] has joined #upstart === laszlop [n=laszlo@CPE0015e976f21f-CM0017ee427a40.cpe.net.cable.rogers.com] has left #upstart ["Konversation] === jme [n=jme@c-24-7-89-173.hsd1.ca.comcast.net] has joined #upstart [12:54] [chaoticg33k(n=chaoticg@alphabox.cxw.utoledo.edu)] hello === mbiebl [n=michael@e180086068.adsl.alicedsl.de] has joined #upstart === justin__ [i=justin@59.92.143.121] has joined #upstart [01:49] I suppose this is the wrong place to ask re Usplash configuration === jme [n=jme@c-24-7-89-173.hsd1.ca.comcast.net] has left #upstart ["Leaving"] === Amaranth [n=travis@ubuntu/member/amaranth] has joined #upstart === tapas [n=tapas@affenbande.org] has left #upstart [] === oneman [n=oneman@ip24-254-239-184.hr.hr.cox.net] has joined #upstart [05:45] my upstart jobs in edgy are not starting on startup.. [05:45] it works with start and stop [05:46] i also notice it doesn't work with daemons that fork off and become a session leader.. [05:47] <_ion> Add something like 'start on runlevel-2' [05:47] <_ion> Add 'daemon' for a forking daemon. [05:51] ive got start on startup :P [05:51] where do i put daemon, just anywhere? [05:59] <_ion> "start on startup" means that it's started before filesystems have been checked, or networking has been started, or syslogd has been started etc. [05:59] <_ion> Yes. [05:59] <_ion> I'd put it just before or after the 'exec foo' or 'respawn foo' line, or just before the 'script' block. [06:01] ohh [06:02] ok, for lighttpd [06:02] daemon worked for starting, but it doesn't kill it on stop === Amaranth [n=travis@ubuntu/member/amaranth] has joined #upstart === cfedde [i=cfedde@fedde.littleton.co.us] has joined #upstart === Seveas [n=seveas@ubuntu/member/seveas] has joined #upstart [07:00] upstart is cool [07:00] but its apha betaboy stuff [07:01] and you have to go talk to the developers themselfs on internet chat to get them to tell you secret undocumented information to really do anything === Keybuk [n=scott@quest.netsplit.com] has joined #upstart === H__2 [n=hans@mail.sangine.com] has joined #upstart [10:56] anyone awake ? [11:02] yup [11:02] what's up? [11:04] i have a question about the new developments : the job-starting and such. Is the following planned : when service A requires service B, and B is restarted, is then A stopped before B stops and A started after B started again ? [11:05] it depends [11:06] ;-) [11:06] if A wants to be restarted when B is restarted, it would indicate as such in its job definition [11:06] e.g. [11:06] stop on job-stopped B [11:06] start on job-started B [11:06] ok, does "stop on job-stopped B" mean that A stops after B stopped ? [11:07] no [11:07] it means B stops because A is [11:08] Can't follow you there. This is the scenario : A requires B. B is restarted, the question is what happens to A, and in what order [11:08] B is stopped [11:08] A is stopped [11:08] B is started [11:08] A is started [11:08] with that example [11:09] exactly, so A stops after B stopped. I think that is wrong. [11:09] if you needed it in the other order, you'd use "stop on job-pre-stop B" or similar [11:09] upstart doesn't enforce any of this, it simply issues sufficient events for you to define the behaviour [11:09] ah, perfect :) [11:10] very interesting [11:11] another small question : from the website "being developed for the Ubuntu distribution" does that mean that Ubuntu now actively uses it, or that it is targetted to replacing the system currently present in ubuntu ? [11:12] H__2: ubuntu now uses it [11:13] nice, thanks. Will look into it. [11:14] (as of the release of edgy, yesterday) [11:20] is there a way in upstart to draw a dependency graph of a bunch of scripts that subscribed to upstart's events ? [11:20] there may be eventually, yes [11:20] I think that such a thing would be useful [11:21] heh :) I've been drawing those by hand and sometimes using graphviz ;-) === Keybuk uses graphviz [11:21] I figured upstart would output dotty [11:29] the example jobs from the homepage (http://upstart.ubuntu.com/download/example-jobs-2.tar.gz) don't have "job-pre-stop"-level rules, is there a second list of examples available for download perhaps ? [11:31] job-pre-stop rules don't exist yet [11:32] upstart's still in heavy development [11:32] they're planned for the 0.3 series [11:32] ow ;-) [11:33] I got the impression from your ' you'd use "stop on job-pre-stop B" ' that it was already available ;-) [11:33] you'd use "stop on B/stopping" at the moment [11:34] (and "start on B/starting") [11:34] they mean about the same thing [11:34] well, it's a race we suffer from at the moment. So we still must use our proprietary solution [11:39] another question : is the event queue re-read and any new (or removed) subscriber results merged with the active queue after any upstart action ? [11:39] not sure I understand the question>? [11:39] ok, i'll make up an axample : [11:41] let's say that upstart is active and it as to start scripts A, B, C and D (in that order). And it just finished starting B. This script B has enabled another event script called X. The dependency order of X is that it has to start before C. What does upstart do ? [11:42] upstart doesn't have dependency orders [11:42] it's not a dependency-based init system [11:42] it would be better if you phrased your question in terms of a real example [11:43] well, it is actually a real example, but from a proprietary system I wrote [11:43] ok [11:43] so you have four jobs, A, B, C and D [11:44] yes [11:44] B starts on job-started A, C starts on job-started B, D starts on job-started C [11:44] yes [11:44] what do you mean by "enabled another event script" ? [11:46] Let's say that script B wrote a script X (or copied it into place), and if available then C wants X to have started before C itself starts. [11:47] so C should be started by the "X started" event [11:47] not the one for B [11:48] the C - B relationship is not changed, there is a new one inserted halfway [11:48] and indeed, 'C should be started by the "X started" event'. [11:50] you're confusing relationships and events [11:50] upstart isn't a dependency-based init system ;) [11:50] it doesn't have relationships [11:50] possibly, i'm new to upstart terminology [11:51] it takes a little bit of a backstep to understand how to translate dependency-based information into event-base [11:51] they're not a 1:1 mapping by any means, and are quite different [11:51] we're convinced event-based is better [11:52] but it does mean that if you come from init-ng, gentoo, etc. you can't just run some perl/sed over the init script to get an upstart one -- you have to rethink how the service is started [11:52] and how multiple jobs interact (rather than depend) [11:54] ok [11:55] (I don't come from init-ng, gentoo, etc, it's my proprietary development. And I'm wondering whether it can be replaced) [11:56] so the basic theory of upstart is not that services depend or require one another [11:56] so far upstart comes closest :) [11:56] but that services are started because other things happen [11:56] this is because in reality most things don't depend on another service, but an abstract concept [11:56] e.g. "on battery power" [11:57] well [11:57] what we have is fi. a script that creates an tunnel device, to which other services want to bind. I call that a dependency. [11:57] right [11:58] so the obvious change there is [11:58] other services do not depend on a script that creates a tunnel device [11:58] and if this tunnel device disappears, then the others are in trouble, they must be stopped upfront [11:58] instead, other services need the tunnel device! [11:58] so in upstart, you'd do "on network-device-added tun0" [11:58] and make sure udev sent that event to it [11:58] that way the services come up with the tunnel [11:59] likewise, you'd stop them because the tunnel device went away [11:59] which means even if the user ifconfig'd it down, the services would stop [11:59] went away is too late ;-) will go away is what we need [11:59] there's no way to know it "will go away" [11:59] ifconfig tun0 down [11:59] *boom* [11:59] you can have a "bring tunnel down safely" script [12:00] that can issue a "going to take tunnel down" event which stops the services [12:00] but they should also be stopped if the tunnel goes away unexpectedly === hunger [n=tobias@pd95b0676.dip0.t-ipconnect.de] has joined #upstart [12:00] yes the 'die unexpectedly' is a different problem [12:00] we think it's the same one [12:01] interesting :) [12:01] so how I'd do that would be have [12:01] /sbin/remove-tunnel which is a script that does [12:01] initctl emit network-device-going-down tun0 [12:01] ifconfig tun0 down [12:01] -- [12:01] and then have the services include both [12:01] stop on network-device-going-down tun0 [12:01] stop on network-device-down tun0 [12:01] -- [12:02] that way your services can safely come down if the script is used [12:02] but also come down if the script isn't used [12:02] one should try one's best to have the services at least deal with that sanely, where sane can include logging an error in syslog [12:02] Keybuk: Did you upstartify ifup/ifdown? [12:02] hunger: not yet, https://launchpad.net/distros/ubuntu/+spec/replacement-network-events [12:03] the " have the services at least deal with that sanely" is indeed what we want, sadly that piece of software is out of our control :-/ === hunger is looking forward to seeing upstart develop in feisty. === badock [n=badock@h235.net48.bmstu.ru] has joined #upstart [12:06] Is there a timeline for upstart in feisty yet? [12:06] why don't you call the " stop on network-device-going-down tun0" a dependency ? to me that is a fine example of a dependency [12:06] hunger: what kind of timeline? [12:07] H__2: because dependency infers in people's mind certain semantics; which don't exist in this case. "network-device-going-down" is an event, it's something that happens [12:07] Keybuk: Like what is planned for when. On second thought I guess that will be in the specs once they become available. [12:07] hunger: the specs are already registered, just not yet written [12:07] Keybuk: I noticed:-) [12:08] I think I'll need to spend some time hacking my cryptdisk setup into your scripts when those hit the repositories. [12:08] heh :) and if others want to be notified of such events you still don't call that a dependency ? A subscription then perhaps ? [12:08] H__2: the particular case is "start on foo" [12:09] if bar depends on foo, people assume that even if bar is created after foo has been started, bar will be started [12:09] whereas when "foo" is an event, people realise that it's forgotten about once it happens [12:11] I don't get this "if bar depends on foo, people assume that even if bar is created after foo has been started, bar will be started" If bar depends on foo, then bar cannot be started if foo's not there. But if foo is there then bar can start. [12:12] yes [12:12] exactly [12:12] that's what dependency infers [12:12] which is why we don't use that term for upstart [12:12] bar can be started manually at any time [12:13] it's up to bar to decide whether it should fail to start because foo is not running [12:13] in my world it can not [12:13] but I think I see what you mean [12:13] unfortunately, without you elaborating on what your world is, I can't understand [12:14] if a service depends on a tunnel device, and that tunnel device is not present when it is started, /it should fail anyway!/ [12:14] and it should present a useful error message to debug that failure [12:14] it should not even try to start, controlled by the service trying to start it [12:14] why not? [12:15] the sysadmin should always be able to get their hands dirty and try things [12:15] because we know it will fail [12:15] you don't know it will fail [12:15] the sysadmin may have created the tunnel by hand [12:15] true, interesting. Let's say "there is no sysadmin". these are embedded systems. [12:16] then you don't need to worry about this scenario, because it's inherently not possible ;) [12:16] if you have no tinkering sysadmin, then you can ignore it [12:16] I think you lost the plot :) [12:16] ? [12:16] I haven't been told the plot [12:17] I'll try to describe it better [12:23] that turns out to be quite hard. I'm not sure what to add to it what would help us. [12:24] you're saying that "bar should not be able to start if foo isn't running" [12:24] but I'm saying that if the only thing that can start bar is the init daemon, then you don't need to worry about that eventuality [12:25] nothing will try to start bar except the init daemon, as a result of the events that are listed as causing it to start [12:25] maybe this : if A has a "start on" subscription to B, and upstart just tried to start B, but B failed, does upstart then continue starting A ? [12:25] depends on the event subscribed to [12:25] if the event is the started one, then no [12:25] if it's the starting one, then yes [12:26] ok, clear :) [12:28] sorry that it seems a little confusing, it's much easier to demonstrate with examples [12:29] Can you elaborate a bit more on the "A has a dependency on B" versus "A is subscribed to an event of B" difference you make ? [12:32] upstart issues events as B changes state [12:32] e.g. job-starting, job-started, job-failed, job-stopping, job-stopped, etc. [12:33] if A is subscribed to any of those events, then it will be started or stopped if an event occurs [12:34] events are one-shot things, they are emitted, get handled by changing the state of any subscribed job, and then get forgotten about [12:34] they can be emitted by any part of the system [12:34] as well as job-started, you can also have network-device-added, block-device-added, path-mounted, battery-power, etc. [12:35] Ok, that part is clear. The question is why it is not considered to be a dependency. The end result in bout our systems is the same btw :) [12:35] bout->both [12:35] the word dependency conjours up certain things in people's minds [12:35] if I say that "foo depends on bar", then I would assume certain things: [12:35] - bar is started if I try and start foo [12:36] - if bar fails to start, foo does not start [12:36] - if bar is already running when I try and start foo, then foo is started [12:36] - if foo stops, and nothing else depends on bar, bar is stopped [12:36] - bar cannot be started if foo doesn't exist (or is disabled) [12:37] don't agree with " - if foo stops, and nothing else depends on bar, bar is stopped", and the one after it too, the rest: yes [12:37] while all of these things can be replicated in upstart with a combination of events, simply adding "start on job-started bar" does *not* [12:37] H__2: dependency-based init systems do that [12:38] only if they are bi-directional dependencies IMO [12:38] bar doesn't care if there's a foo that wants to use it, so if foo is stopped, bar doesn't care [12:40] but that's not what a dependency-based init system does [12:40] so calling events dependencies, in an init system, would confuse people [12:41] ah, that's then where our confusion comes from. It is what a dependency-based init system does in our opinion (see Gentoo for example). [12:41] dependencies have only one direction. [12:41] a system with bi-directional dependencies cannot start :) [12:42] I'm completely unfamilar with Gentoo's, I'm afraid [12:42] the way that initNG and SMF work is to start a set of goal services, which cause their dependencies to start, et. al. down the list [12:42] if you stop a goal service, than any dependencies unused by anything else are also stopped [12:43] this is consistent with dependencies in the package manager as well [12:43] I'm unfamiliar with initNG and SMF :) [12:44] I would say " up the list" instead of " down the list" in 2 lines up [12:45] also to me, depends infers state tracking [12:45] "bar depends on network-device tun0" [12:45] which implies that the state of that network device is tracked [12:45] upstart relies on something else to track the state, and issue the events when it changes [12:45] ideally yes [12:45] so instead [12:45] "start bar on network-device-added tun0" [12:45] "stop bar on network-device-removed tun0" [12:45] type thing [12:45] clear [12:46] in our system the tracking is present, but handled outside the 'upstart' alternative. By using blunt checkscripts :) [12:47] can only do polling from scripts there, in most cases. [12:47] upstart is intended to be useful where you have events from other systems [12:47] and don't need to poll [12:47] e.g. udev for hardware [12:48] clear [12:48] Keybuk: I like the heartbeat idea that came up on the -devel ML. [12:48] Keybuk: That would absolutely rock for the server crowd. === H__2 hides his heartbeat system [12:49] ;-) [12:49] just joking, besides they're probably different anyway [12:49] hunger: without knowing much about heartbeat, I couldn't comment much [12:50] Keybuk: heartbeat is pretty simple: basically it is just doing something when the heartbeat is no longer heared. [12:51] from where to where is this heartbeat communicated ? what does it monitor ? [12:51] Keybuk: I only ever used something like that on AIX, so I can not comment on how linux works either. [12:52] H__2: heartbeat is used for eg. when you want a highly available webserver. You set up two that send each other heartbeat signals. [12:52] ok, so 'total service' is monitored [12:52] then it's the same as what we have [12:52] H__2: When the hearbeat of the master is no longer heared by the slave that takes over IPs and stuff and continues. [12:52] clear [12:53] you could have heartbeat emit a "flatline" event ;) [12:53] and then write upstart jobs with "on flatline" [12:53] Keybuk: Yes, exactly. [12:53] ack [12:54] it's a definite goal to get rid of everything's *.d script directories [12:54] btw, FreeBSD now has a similar dependency system in their init scripts (as what I talked about earlier) [12:55] with complaints like : % rcorder: requirement `named' in file `/usr/local/etc/rc.d/samba.sh' has no pro [12:55] viders. [12:56] nice to see the world moving in the same direction :) [12:56] right, but bear in mind that upstart doesn't do that ;P it's not a dependency-based init system [12:57] in an upstart system, samba instead would be started by an event such as "dns-available" [12:57] and a lot more I hope [12:57] and that event could be emitted by either the bind9 job, a dhclient job or a network interface job if it detects an available IP in /etc/resolv.conf [12:58] Keybuk: That is the one weakness I see in upstart: It will be a PITA to figure out on which events to react, there being so many of them. [12:59] hey, if I understand right the need for 2 providors is also not present in upstart, like samba starts on 'dns-available' but samba also needs 'eth0 available' which may not be there yet, so samba would get started another time lateron when 'eth0' appears, right ? [12:59] Keybuk: And that some things will end up depending on more than one event will make things even worse. [12:59] H__2: not currently, methods of doing that are being discussed and will be in 1.0 [01:00] and will still not be called dependencies, right ? ;-) (sorry , couldn't resist) [01:00] H__2: ... and all-exported-filesystems-available is another candidate ... [01:00] I'll get some coffee now [01:02] it depends on the semantics [01:02] we've talked about the idea of having jobs "wait" for an event [01:02] so one might do: [01:02] start on foo [01:03] wait for network-device-added eth0 [01:03] wait for dns-available [01:03] -- [01:03] does this mean that dns-available has to occur *after* foo [01:03] or does this mean that dns-available just has to occur at any point on the system [01:03] Keybuk: Will that work if dns-available happens before foo? [01:03] hunger: exactly [01:04] Keybuk: I have thought about how to integrate my cryptsetup script with upstart. [01:04] and how does that work if the network device comes back down again? [01:04] Keybuk: In addition to what the normal one shipped with ubuntu can do mine can mount a FS, read keys from there, mount other FSes and then unmount the key-FS again. [01:04] the network-device-added event happened, so that "wait" has been fulfilled [01:05] So basically I would need to make sure that the key-FS is setup and mounted before any FS it contains a key for and then unmount it again once all of them are up. No idea how I can express that in events. [01:06] why unmount the key FS? [01:06] Keybuk: So that nobody can get the keys once the system is up. [01:07] they could just mount it? :p [01:07] Keybuk: I unmount the FS and destruct its decrypted device. That way only the encrypted device is visible once the other crypted FSes are up. [01:07] I'll ask for open-source clearance once more, i'm very interested in what you have to say about it [01:08] all that happens before the network comes up, so I am pretty sure nobody can steal my keys;-) [01:11] only the tempest crew in the other building :-P [01:11] H__2: upstart breaks the displaying of the password prompt... that might confuse those guys;-) [01:12] Keybuk : is there an advanced examples tar ball ? [01:12] hunger: heh :o) [01:12] H__2: no [01:13] hunger: I don't understand why [01:14] ok, then maybe in Ubuntu 6.10 ? [01:14] edgy is screwed up wrt. displaying startup info anyway... running usplash gives the password prompt and displays the password which is even worse IMHO. [01:14] 6.10 was released yesterday [01:14] hunger: "screwed up" ? [01:15] i know it was released yesterday, I meant to ask whether it did contain more advanced stuff than the examples tar ball [01:15] no, the examples tar ball is the copy of the jobs from ubuntu 6.10 [01:15] aah, ok :) [01:16] Keybuk: Without usplash: no password prompt, with usplash: password prompt is displayed but password is echoed to the screen. [01:17] Both is not really the way I expected it to be;-) [01:17] Thanks for the chat. (I'm off for a lunch-walk now.) === johnnybuoy [n=jano@ob-7515.adsl.datanet.hu] has joined #upstart === WorkRoey [n=Roey@h-69-3-4-130.mclnva23.covad.net] has left #upstart ["Leaving"] === juergbi [n=juerg@80-219-26-249.dclient.hispeed.ch] has joined #upstart === Md [i=md@freenode/staff/md] has joined #upstart === Artanicus [i=kuitunej@lehtori.cc.tut.fi] has joined #upstart === phsdv [n=kvirc@83.152.239.70] has joined #upstart === shwag [n=shwag@66.101.109.10] has joined #upstart === phsdv [n=kvirc@83.152.239.70] has joined #upstart [10:31] hi all, I just managed to get my gentoo system booted using upstart. [10:33] but I am getting some errors like: control-alt-delete: init: /dev/initctl: No such file or directory [10:34] does someone know how to fix that? === Akrito [n=alex@24.124.24.34] has joined #upstart === phsdv [n=kvirc@83.152.239.70] has joined #upstart