/srv/irclogs.ubuntu.com/2008/09/24/#upstart.txt

sadmac2Keybuk: Have we decided what kind of info pid 1 will provide? i.e. is it just a feed of signals and other happenings or is it a Start-Stopped-Failed-Restarting kind of abstraction?19:53
Keybukprobably the same basic signals we have today19:53
Keybukstarting (lower left edge)19:54
Keybukstarted (upper left edge)19:54
Keybukstopping (upper right edge)19:54
Keybukstopped (lower right edge)19:54
Keybukwhere stopping and stopped will include properties containing exit codes, signals, output, etc.19:54
sadmac2yes. that's good19:54
sadmac2that's more useful to people who want to use pid 1 directly without the state service19:55
sadmac2and it makes it easier to manage the state service itself19:55
sadmac2BTW I think pid 1 should handle respawning transparently19:55
Keybukrespawning is interesting19:56
Keybukas to whether or not you go through the levels19:56
sadmac2it can be reflected in the state machine, but it means 3 states for a single job (one for running, one for trying to respawn, one for either of the above)19:57
Keybukthat's how I used to have it19:58
Keybukbut I couldn't find any reason for having that magic third state19:58
Keybukat the end of the day, if you're depending on a service, and that service is restarted19:58
Keybukmost likely, you have to be restarted too19:58
sadmac2with deps, there could be a serious falldown if that happens19:58
Keybukd-bus crashes19:59
Keybukand gets respawned19:59
sadmac2whole system bounces19:59
nottingd-bus is not allowed to crash. especially if it's in the kernel20:00
Keybukit has to bounce though20:00
Keybukif d-bus crashes, we really do have to restart everything that depended on it20:00
Keybukit might be scary behaviour, but it's correct20:00
nottingevery time that gets brought up to the d-bus developers, they just say to punt. and well, if we put the system bus in the kernel and make it panic() on exit, that works around the issue20:01
KeybukI don't think that's relevant though?20:01
Keybukit's still a good example20:01
Keybukif X crashes, we probably have to restart everything that depended on it20:02
sadmac2Keybuk: if the respawn is in the state machine its a good example of the case for transition actions20:04
sadmac2transition A => TryRestartA on failed($OUR_SERVICE_HANDLE)20:05
sadmac2Mmm... runtime type definition20:52
* sadmac2 loves Ruby20:52
ion_Ruby for the win.21:20
sadmac2notting: what is the state of the kernelspace dbus? I was at the talk, but I hadn't slept much and was only intermittently conscious.21:28
nottingnot really that close to done21:29
sadmac2hm21:29
nottingsort of a proof-of-concept21:30
keesjif (dbus in kernel) then me search other job21:31
sadmac2keesj: wth kind of programming language is that? Visual Caveman?21:32
keesjhuman2.021:33
keesj(based on lua)21:33
sadmac2oic21:34
keesjwell perhaps it can beat sysfs and netlink.21:35
sadmac2Keybuk: I'm hitting the old question: User starts X, event says to stop it. We do ??21:38
sadmac2and its more complicated than we think21:41
sadmac2stop on dont-particularly-feel-like-spending-resources-on-this // User probably takes precedence21:41
sadmac2stop on disk-we-were-using-just-up-and-vanished // User can probably shove it21:42
sadmac2nvm doing it wrong21:53
Keybukevent can't say to stop it?21:53
Keybukwe removed "stop on"21:53
sadmac2Keybuk: yes. Just realized that21:54
Keybukthe condition in which X is permitted to be running can become false21:54
Keybukso obviously, it has to be stopped ;)21:54
Keybukthe user can only start it while that is true anyway21:54
Keybukwhen I realised we'd solved that old issue, I cried21:54
Keybukwith joy21:54
sadmac2Keybuk: I think instead of 'until', we should just say that anywhere you can use a state name you can also say (a..b) where a and b are events21:55
Keybukwhy is .. better than a keyword?21:55
Keybukhow does that work when a contains multiple parameters?21:56
sadmac2(a b c .. d)21:57
Keybukwhy is ".." better than "until" ?21:57
sadmac2its better because its valid /anywhere/ a state is21:57
sadmac2when foo and (a .. b) on bar21:57
Keybukwhen foo and (a until b) on bar21:57
sadmac2you can wordify it yes21:58
sadmac2but that is different than on a until b21:58
Keybukwas from a until b21:58
sadmac2you wrote on a until b on the whiteboard at one point21:58
Keybukthis is just syntax though21:58
KeybukI'm more interested in how it works atm21:59
sadmac2true21:59
sadmac2Keybuk: issue with your assertion about the dependency:22:02
sadmac2wait...22:02
* Keybuk sits down and starts singing about gold22:03
sadmac2ok22:03
sadmac2we're good22:03
sadmac2I need to teach my brain to trust previous results22:03
sadmac2after I implemented that instance hack for states in 0.5 I think I twice had to re-prove to myself that it would work22:04
Keybukwhat was the issue?22:04
sadmac2what if the user starts service A, which auto-starts its dependency service B, and then the user tries to stop service B22:04
Keybukthen A would stop22:06
sadmac2yep22:06
sadmac2actually, a nice "WARNING: YOU ARE A MORON" might be nice.22:06
ion_Didn’t read the discussion yet, but such a warning is always nice. :-)22:08
Keybukwell, we could do quite interesting things22:08
Keybuk# stop apache22:08
Keybukmust also stop tomcat, continue? [y/n]22:09
Keybuk# stop -f apache22:09
Keybukobviously we'd only do that if apache was making a depender's state false22:09
Keybukif apache depended on tomcat, we wouldn't bug22:09
sadmac2So from what I have we have 3 reasons a service can start (An event the service listens for, Dependency, or User saying go) and 2 it can stop (lost dependency, User saying stop)22:11
Keybukerr four22:12
sadmac2what's 4?22:12
Keybukdependant state becoming true, and auto22:12
Keybukevent while dependant state is true22:12
Keybukdepended on by another service while dependant state is true22:13
Keybukuser saying so while dependant state is true22:13
sadmac2Keybuk: reason 1 and 2 are the same in the current abstraction (You'll recall epsilon events?)22:14
sadmac2my terminal fails at unicode today or I'd use an actual epsilon22:14
sadmac2ɛ22:15
sadmac2there we go22:15

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