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

=== johnnybuoy [n=void@unaffiliated/johnnybuoy] has joined #upstart
=== Ingmar^ [n=ingmar@d51A482FD.access.telenet.be] has joined #upstart
=== wasabi [n=wasabi@ubuntu/member/wasabi] has joined #upstart
=== j_ack [n=rudi@p508D92B9.dip0.t-ipconnect.de] has joined #upstart
=== Amaranth [n=travis@ubuntu/member/amaranth] has joined #upstart
=== johnnybuoy [n=void@unaffiliated/johnnybuoy] has joined #upstart
=== wasabi [n=wasabi@ubuntu/member/wasabi] has joined #upstart
=== Admiral_Chicago [n=freddy@st0660990722.monm.edu] has joined #upstart
=== j_ack [n=rudi@p508D92B9.dip0.t-ipconnect.de] has joined #upstart
=== j_ack [n=rudi@p508D86D0.dip0.t-ipconnect.de] has joined #upstart
=== johnnybuoy0 [n=jano@nilus-268.adsl.datanet.hu] has joined #upstart
=== theCore [n=alex@modemcable106.200-70-69.mc.videotron.ca] has joined #upstart
=== Amaranth [n=travis@ubuntu/member/amaranth] has joined #upstart
=== Ingmar^ [n=ingmar@d51A482FD.access.telenet.be] has joined #upstart
=== Md [i=md@freenode/staff/md] has joined #upstart
=== Ingmar^ [n=ingmar@d51A482FD.access.telenet.be] has joined #upstart
=== Ingmar^ [n=ingmar@d51A482FD.access.telenet.be] has joined #upstart
=== Ingmar^ [n=ingmar@d51A482FD.access.telenet.be] has joined #upstart
=== Ingmar^ [n=ingmar@d51A482FD.access.telenet.be] has joined #upstart
=== Ingmar^ [n=ingmar@d51A482FD.access.telenet.be] has joined #upstart
=== neuralis [n=krstic@solarsail.hcs.harvard.edu] has joined #upstart
=== xhochy [n=uwe@p54A6BBE1.dip0.t-ipconnect.de] has joined #upstart
=== Md [i=md@freenode/staff/md] has joined #upstart
=== j_ack [n=rudi@p508D86D0.dip0.t-ipconnect.de] has joined #upstart
=== johnnybuoy [n=void@unaffiliated/johnnybuoy] has joined #upstart
=== j_ack [n=rudi@p508D86D0.dip0.t-ipconnect.de] has joined #upstart
=== Amaranth [n=travis@ubuntu/member/amaranth] has joined #upstart
=== maro_ [n=mark@0x55511dab.adsl.cybercity.dk] has joined #upstart
=== theCore [n=alex@modemcable106.200-70-69.mc.videotron.ca] has joined #upstart
=== theCore [n=alex@modemcable106.200-70-69.mc.videotron.ca] has joined #upstart
=== j_ack [n=rudi@p508D86D0.dip0.t-ipconnect.de] has joined #upstart
=== Keybuk [n=scott@syndicate.netsplit.com] has joined #upstart
=== ajgenius [n=andrew@c-68-48-76-28.hsd1.md.comcast.net] has joined #upstart
=== j_ack [n=rudi@p508D86D0.dip0.t-ipconnect.de] has joined #upstart
=== Ingmar^ [n=ingmar@244.75-64-87.adsl-dyn.isp.belgacom.be] has joined #upstart
_ionkeybuk: An idea: an optional, purely informative "triggers" stanza that lists the events the job (either script or the daemon) may trigger, e.g. a hald job might contain "triggers block-device-added" and a mount job might contain "triggers path-mounted fhs-filesystem". That would make it easy to 1) grep event.d/* for "starts on jobname" and 2) visualize the relations between jobs programmatically.10:11
Keybukcould be just a normative comment?10:12
_ionYes.10:12
_ionJust like "author" and "description". :-)10:13
Keybuktrue, true10:13
Keybukdescription is actually useful, as you have to describe the job in listings10:13
_ionFor example, a GUI for managing jobs might display a list of jobs that act on events the currently selected job may trigger.10:15
_ionWhen you click "hal", it lists "check-filesystem" and when you click it, it lists "mount".10:16
_ionAlso cool graphviz graphs would be possible. ;-)10:17
Keybuktrue10:18
Keybuka bit like Java's "throws" ?10:18
Keybuk:p10:18
ajgeniushmm ok. question the first. From todo - "Per-user services" "for "root-user services" but not for jobs/tasks", I am trying to figure out what that means, and what the intent is for User level services down the road10:19
_ionkeybuk: Well, a bit like it. :-)10:20
Keybukwell, the obvious thing is for users to be able to register services to be run on their behalf10:21
Keybukso I can have an hourly script run10:22
Keybukor even daemons run for me10:22
KeybukPAM needs to be used to set up the session properly10:22
Keybukthe root bit is that the root _user_ should be able to register services/tasks10:22
Keybukand thus be run with PAM to set up the session10:23
Keybukwhich is different from those in /etc/event.d which should not be run in a PAM session, maybe10:23
_ionI'd assume the root user's jobs to be different from the /etc/event.d jobs similarly as the root user's crontab is different from the system crontab.10:24
_ionI mean the semantical difference, not the technical difference.10:24
Keybukindeed10:25
Keybukthe technical difference is the same, actually10:25
ajgeniusok. hm.10:27
ajgeniusthe thing I am trying to understand is the long term goal for user level integration, in regards to allowing users to have purely user session jobs and scripts.10:28
ajgeniusand I am not finding any real information on goals regarding that in the docs or todo's :)10:28
Keybukwell, it depends what you mean by "user session" at this point?10:28
ajgeniusI mean.. desktop situation. the user wants to register a task to do some operation on their files, by them, (they wouldn't think of it in the terms of sessions), on given events10:30
Keybukthe lack of information doesn't mean anything other than I haven't written it down in stone yet, and am still thinking about it and taking suggesions10:30
Keybukright, but would these tasks need access to running X desktops?10:30
_ionmkdir -p ~/.event.d; vim ~/.event.d/job ... :wq and it just works. :-)10:31
ajgeniussometimes yes sometimes no. that would be a task level dependency10:31
Keybukthere's several levels of thing:10:31
_ion(As long as the bofh hasn't disabled it)10:31
Keybuk- new system session (process group and session)10:31
Keybuk- new user session10:31
Keybuk- existing user's session10:31
Keybukthe second is "switch to the user, create a new session, login that session, run the task"10:32
Keybukthe third is run the task for a user that is logged in10:32
Keybukwhich is an interesting case all to itself10:32
Keybukbut potentially conflicting with a desktop session manager10:32
ajgeniusright. I am interesting in both the latter cases10:32
ajgeniusmostly the last however10:32
Keybukit's definitely something that's worth serious thought10:33
ajgeniusone of the problems is for example - right now we have "hald" for gnome integration, which handles hardware events etc. thats nice and interesting, but it doesn't allow much real integration on a user level10:33
Keybukthere's been some interesting discussion about that on the dbus mailing list last week10:34
ajgeniusI think most of that belongs in an upstart space.10:35
ajgeniusotherwise we have multiple event based systems for different kinds of things10:36
Keybukwhich part though?10:40
ajgeniuswhich part of what?10:40
Keybuk<ajgenius> I think most of that belongs in an upstart space.10:40
Keybukyou wouldn't have upstart monitoring battery levels, for example?10:40
ajgeniusyes. anything to do with handling events and starting jobs10:40
ajgeniusKeybuk: that wouldn't be IN upstart. but there is no reason not to have a way of registering new events of that nature into upstart space10:41
ajgeniusthe event daemon is something which recieves events, and starts jobs. it doesn't generate the events. something else does10:42
Keybuk+----------------------+10:42
Keybuk|  gnome-power-manager |10:42
Keybuk+-------+--------------+10:42
Keybuk|  HAL  |              |10:42
Keybuk+-------+              +-----------------+10:42
Keybuk|           D-Bus      | Suspend Scripts |10:42
Keybuk+----------------------+-----------------+10:42
Keybuk|                   Upstart              |10:42
Keybuk+----------------------------------------+10:42
Keybukthat kind of thing?10:42
_ion   10:43
ajgeniusehm10:43
Keybuk_ion: ?10:43
_ionJust some line drawing characters for cooler boxes. ;-)10:43
Keybuk_ion: harder to type than just '-' :p10:44
_ionHehe.10:44
Keybukgnome-power-manager receives information from HAL that indicates the battery is critical10:44
Keybukso it issues a battery critical event10:44
ajgeniusKeybuk: yes and no. gnome-power-manager is on top of HAL, but what should trigger it to start in the first place?10:44
Keybukwhich upstart receives and runs the suspend scripts for10:44
Keybukthat's another point10:44
Keybukwe know that HAL and the D-Bus system daemon are run by upstart10:45
Keybukbut what runs the D-Bus session daemon, and gnome-power-manager?10:45
_ionIt would be quite cool if upstart were abstracted as much to allow _it_ to be the desktop session manager.10:46
ajgeniusthats the point I care about - there are a lot of really cool things that can be done from a user POV. but forcing multiple levels of start abstraction actually detracts what can be done. if they can all be started by the same thing - now in this case I think that perhaps an upstart user level daemon.10:46
ajgeniuseach user starts its own instance of a user only upstart - which gets events from the main system, but can only start them in that users context10:47
ajgeniusthat allows a single point of origin for anything in that users space10:48
ajgenius_ion: yeah exactly. thats a large part of it10:48
Keybukkinda, you end up with two ... started by the X session manager or started by upstart10:48
ajgeniusbut it wouldn't JUST be a "desktop" dession manager it would be a user space manager. desktop10:48
ajgeniusis really seperate at that point.10:49
ajgeniusKeybuk: why would the X session manager have anything to do with it :)10:49
ajgeniusit just starts a user session. why not make what it starts, a user level upstart.10:50
theCorewhy would you want upstart as your desktop-manager?10:50
Keybukajgenius: it doesn't just do that though10:50
Keybukan X session manager actually does a whole bunch of stuff10:50
Keybukhttp://live.gnome.org/SessionManagement10:50
Keybukalso there's10:51
Keybukhttp://freedesktop.org/wiki/Standards_2fautostart_2dspec10:51
ajgeniusyes I know about them10:51
maro_why not just hook users up to the system upstart? (as it looks to be the current plan)10:52
Keybukwould upstart need to implement those?10:52
ajgeniusKeybuk: no10:52
ajgeniuswell and yes ;)10:52
Keybukmaro: there isn't any current plan in this regard10:52
ajgeniushmm10:52
Keybukajgenius: see, this is where the lines to me get fuzzy10:52
ajgeniusAutostart Specificatio10:52
maro_Keybuk: I was thinking of the "on ~scott/..." examples I found somewhere10:53
ajgeniusKeybuk: its clear to me. upstart doesn't DO any of those things. it just recieves events, and starts jobs10:53
Keybukmaro_: those are just for "new temporary session" jobs (e.g. cron/atd)10:53
ajgeniusthats it. in the rough ;)10:53
KeybukX sessions are odd anyway10:54
Keybukas they're not true sessions, they're just a bunch of background processes without controlling terminal that happen to share some environment variables10:54
ajgeniuspersonally I see no REASON to have the autostart specification persay. in the sense that, in terms of events, everything in a desktop environment depends on core parts of the desktop to start first, its desktop dependent. aka jobs10:55
ajgeniusand events10:55
Keybukit certainly makes an amount of elegant sense to have upstart start things like the panel10:56
ajgeniusthats kind of it. you might have a "session management" daemon that upstart begins first10:56
Keybukbut then you wonder whether upstart should receive a "user clicked a launcher" event, which causes upstart to start openoffice10:56
ajgeniusto handle autosave stuff10:56
Keybukand I'm not sure at which point the line between genius and insanity gets crossed yet10:56
ajgeniusKeybuk: no10:56
ajgeniushum. if someone chooses to use it in that fashion. that is up to them. but it has nothing to do with upstart itself10:57
Keybukopenoffice ends up being a child of upstart :)10:57
ajgeniusthats not a problem to me10:57
ajgeniusI see no reason it shouldn't be10:58
Keybukit is by default10:58
Keybukparent process is #1 for most X apps10:58
ajgeniusright10:58
ajgeniusthe idea is in effect to make the user space all started as a child of a single point of origin, a user space upstart. thats it10:59
ajgeniusit doesn't have anything to do with the actual processes or gui or whatnot10:59
ajgeniuspeople could make jobs10:59
ajgeniusthat do those sorts of things.11:00
ajgeniusbut thats not upstarts concern11:00
ajgeniusso you still will probably need a "session manager", but for example - it handles the other aspects, like close/shutdown things.11:01
ajgeniusbut it doesn't need to start them11:01
Keybukit doesn't seem unreasonable11:03
ajgeniusthat allows everything upstart can do for a system. to be done for just a user. in that users scope. and does it in a GUI and Desktop agnostic fashion11:04
ajgeniusand it would just have system events forwarded to it from the system instance.11:05
KeybukI was just thinking about how that would work11:05
Keybuksounds a bit dbus-like to me11:05
ajgeniusyou could do it on dbus at that level, because the system upstart would already be started. but I don't know if it needs to be11:06
_ionA user session upstart daemon would give a lot of flexibility for things, e.g. it would be possible to set niceness and environment variables for specific user session jobs.11:08
KeybukI'm not immediately sure you need a user session daemon at all11:09
=== johnnybuoy [n=void@unaffiliated/johnnybuoy] has joined #upstart
Keybukdue to the way X has historically worked, all you need is something to register a session with the master daemon11:09
Keybukgive the DISPLAY, DBUS_*, etc. environment variables11:09
Keybukso then init can just include those in anything marked for that "session"11:09
ajgeniusbut thats based on X11:09
Keybukthey don't need to be children of any particular process11:09
ajgeniushm11:10
theCorethat is what I'm thinking, an user upstart could be just a small program that would send message to upstart11:10
Keybukthen you would add a new first-class object to upstart ... "session"11:10
Keybukjobs might exist in a session or not11:10
ajgeniusbut what about starting jobs in user space? who would be the root level? upstart11:10
Keybukyes11:11
Keybukthat's easy11:11
Keybukfork ()11:11
Keybuksetsid ()11:11
Keybuksetuid ()11:11
Keybukexec ()11:11
Keybuk:p11:11
ajgeniushm. maybe11:11
Keybuknothing X related has a controlling terminal11:11
Keybukonly the X server itself11:11
ajgeniusbut if nothing else it would make the process tree horrible to make sense of in a multiuser environment ;)11:11
Keybukso there's no UNIXish signal interaction to worry about here11:11
Keybukps fjax11:11
Keybukthis is what the process tree looks like *today*11:11
ajgeniusnot on my system ;)11:12
Keybuknote that everything in your X "session" has PID=111:12
Keybukwhy not on your system?11:12
Keybukshow me11:12
ajgeniusI can't at the moment because I am booted up under a normal system11:12
=== Keybuk doesn't follow
ajgeniusbut under my normal environment I use a hacked system like what I am talking about11:12
Keybukany particular reason?11:13
ajgeniusproof of concept. I started something like upstart about 2 years ago but nobody cared ;)11:13
Keybukahh11:13
Keybukso you'd see something like11:13
Keybukinit11:13
Keybuk`- X11:13
Keybuk   `- x-session-manager11:13
Keybuk      `- user-init11:14
Keybuk         `- gnome-panel11:14
Keybuk?11:14
ajgeniusyes11:14
Keybukprobably with a "`- gdm" in the middle there somewhere11:14
ajgeniusI called it ProcessManager11:14
ajgeniusbut yeah11:14
ajgeniusamazing how what two years ago was a stupid idea is todays big new thing ;)11:14
Keybukheh11:15
KeybukI've not yet managed to convince anyone inside the Boston Conspiracy that this is a good thing yet11:15
ajgeniushehe11:16
KeybukHavoc does seem interested though11:16
ajgeniusI never managed to get as big a following as you though(or any at all), so thats something. at least you have momentum to make this idea actually work :)11:16
Keybukdon't suppose, btw, you could write a summary mail about the above and post it to the mailing list?11:16
Keybukwell, we have a distro ;)  that's a big help11:17
ajgeniushm11:17
Keybukif it works, Ubuntu will rock because of it, and everyone else will adopt it11:19
Keybukif it doesn't work, then it doesn't11:19
ajgeniusit will work :)11:20
=== johnnybuoy hopes too
KeybukI just mean upstart in general11:20
ajgeniusthe concept is sound, and as I say. I have been running on it for a long time now.11:20
ajgeniusKeybuk: sure it will11:21
ajgenius:)11:21
=== johnnybuoy is running it, and is quite pleased!
ajgeniusI mean. just conceptually it really makes integration into the new udev design system a lot easier11:22
Keybukyeah11:24
Keybuknext is a matter of integrating it with dbus and HAL properly11:24
johnnybuoydbus??11:24
Keybukjohnnybuoy: message passing bus11:24
johnnybuoydoesn't that slow down the machine horribly.11:24
johnnybuoy??11:24
Keybukno?11:24
johnnybuoyyes?11:24
ajgeniuswhy would it?11:25
Keybukit's just an IPC bus11:25
Keybukhow one program tells another that something happened11:25
johnnybuoyi mean the cpu has to put itself into adm. mode everytime a message comes or goes11:25
Keybukis logical for upstart to be able to start and stop things because of dbus broadcast messages11:25
Keybukerr?11:25
johnnybuoyhmm11:25
Keybukwhat's "adm. mode" ?11:25
LarstiQsupervisor?11:26
johnnybuoyi don't remember the word :(11:26
johnnybuoybut the cpu has two modes?11:26
Keybukyou're thinking of a Mach-like kernel aren't you?11:26
johnnybuoyCONTEXT SWITCH i think11:26
johnnybuoyright11:26
Keybukwhere the entire kernel is based on message-passing?11:26
Keybukdbus is just a user-space process for passing messages between user processes11:26
LarstiQL4 shows that can be quite fast.11:26
johnnybuoyahh, so no context switch11:27
Keybukit's how gnome power manager can tell the screensaver you're on battery, so don't waste power bouncing cows and just blank the screen11:27
johnnybuoyyet l4 doesn't even have userlan tools to do proof-of-concept11:27
LarstiQproof-of-concept of what?11:28
johnnybuoythat the linux drivers an 'really' be run in userland as servers11:28
johnnybuoys/an/can11:28
johnnybuoyi tested it, it got me to a pretty screen that was mooving fast, bu no user interaction at all11:29
LarstiQL4 isn't really interested in that either.11:29
LarstiQPerhaps you are thinking of linux-on-l4?11:29
johnnybuoybu if dbus doesn't need those context switching..11:29
ajgeniusdbus isn't in kernel space. its in user space space. thats a whole different concept then a messaging bus in kernel11:33
=== johnnybuoy_ [n=void@nilus-1746.adsl.datanet.hu] has joined #upstart
_ionajgenius: Excuse my ignorance, but what is "the new udev design system"?11:36
Keybukkernel sends events when stuff changes11:38
_ionIsn't that how udev has worked for a long time?11:38
=== johnnybuoy_ is now known as johnnybuoy
_ionI.e. listening to uevent?11:39
johnnybuoymy ISP is ging me crap, sorry, but in the lat 5-10 minutes i wasn't here...didn't miss me ehh?;)11:39
ajgenius_ion: uevents etc is new11:50
ajgeniusas in, for proper functionality it requires a 2.6.15(16?) kernel iirc11:52
ajgeniusit completely replaces hotplug now11:52
ajgeniusbefore it just integrated with it11:53
ajgeniusthere is some documentation if you want to read up on the history and the recent changes :)11:53
ajgeniusits one of the important reasons for upstart NOW11:58
ajgeniusbefore it was just a good idea. now its almost necesary12:00

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