[11:24] <AlexExtreme> it would be much easier to work with IMO
[11:25] <Keybuk> profiles are interesting
[11:25] <Keybuk> one could almost define them as a state in their own right
[11:31] <AlexExtreme> yes
[11:31] <Keybuk> which means you'd be able to turn them on/off during system runtime
[11:31] <AlexExtreme> if I were to use seperate files for each profile, what would be a good directory name for the profiles to live in? i thought /etc/bootprofiles.d, but a) it's a bit long b) profiles wouldn't just be used during boot :)
[11:36] <AlexExtreme> hmm, just a random thought: how about a directory structure like this for upstart:
[11:36] <AlexExtreme>  /etc/upstart
[11:36] <AlexExtreme>          |-----> profiles.d/ - Profiles defined here
[11:36] <AlexExtreme>          |-----> jobs.d/     - Jobs defined here
[11:36] <AlexExtreme>          |-----> states.d/   - States defined here
[11:37] <AlexExtreme> So instead, everything would live under /etc/upstart/something rather than scattered in many directories in /etc
[11:38] <Keybuk> I've been thinking of that, yeah
[11:38] <AlexExtreme> and /etc/event.d is incorrectly named anyway, since they aren't events really, they're jobs and states ;)
[11:39] <Keybuk> yeah
[11:39] <Keybuk> I'd thought of /etc/init instead of /etc/upstart
[11:39] <AlexExtreme> maybe
[11:46] <AlexExtreme> shall I write a spec for a new directory structure? ;)
[11:46] <Keybuk> I don't think it needs one at this point ;)
[11:46] <Keybuk> it's a one-line code change <g>
[11:47] <AlexExtreme> :P
[11:48] <AlexExtreme> the .d is unnecessary, really
[11:49] <AlexExtreme> it'd only be necessary really if there was something like: /etc/upstart/jobs - some static file, and /etc/upstart/jobs.d - a directory to do with that static file
[11:49] <AlexExtreme> since that static file is not there, and most likely won't ever need to be there, the .d is unnecessary
[11:52] <Keybuk> yeah that's what I thought
[11:52] <Keybuk> though it does fit other standard naming
[11:52] <Keybuk> e.g. /etc/udev/rules.d
[11:52] <Keybuk> and upstart will actually support single-conf-files
[11:53] <Keybuk> (I'm gonna push for 0.3.9 at the weekend, while my partner is away <g>
[11:53] <AlexExtreme> cool
[11:53] <AlexExtreme> so what super-duper-cool features are we gonna have? ;)
[11:54] <Keybuk>  - portability fixes
[11:54] <Keybuk>  - bug fixes
[11:54] <Keybuk>  - works when there's no console support by default (openvz, etc.)
[11:55] <Keybuk>  - internal rework of Event
[11:55] <Keybuk>  - multiple configuration file and directory support
[11:55] <Keybuk>  - "reload" support for configuration
[11:55] <Keybuk>  - new initctl commands to replace use of signals
[11:55] <Keybuk>  - new config layout
[11:56] <Keybuk> that lot
  - new config layout << what's that one?
[12:01] <Keybuk> see above ;)
[12:01] <Keybuk> we just agreed on that, no? :p
[12:01] <AlexExtreme> oh
[12:02] <AlexExtreme> i thought that was this one: <Keybuk>  - multiple configuration file and directory support
[12:02] <AlexExtreme> anyhow, sounds good :)
[12:03] <Keybuk> that one is the code support in cfgfile to support tracking what config directories/files have been parsed, and which jobs were found in them
[12:03] <Keybuk> looks something like
[12:03] <Keybuk>   cfg_source_new (NULL, "/etc/init/jobs.d", NULL);
[12:03] <Keybuk>   cfg_source_new (NULL, "/etc/init/states.d", NULL);
[12:03] <Keybuk>   cfg_reload ();
[12:04] <AlexExtreme> ah
[12:27] <AlexExtreme> whoo, written my basic profile parser :p
[12:54] <rgl_> Keybuk, 0.3.9 will work inside a linux-vserver guest?
[12:59] <Keybuk> rgl: in theory
[01:00] <rgl> Keybuk, it will use syslog instead of /dev/console ?
[01:03] <Keybuk> no
[01:03] <Keybuk> it reopens /dev/console properly
[01:05] <rgl> Keybuk, humm, but there is no /dev/console 
[01:07] <Keybuk> there's always a /dev/console
[01:07] <rgl> no there isn't ;)
[01:08] <rgl> you have to either link it to /dev/null, or start up syslog-ng to create a pipe at /dev/console
[01:08] <rgl> (linux-vserver does not have a virtualized /dev/console)
[01:08] <Keybuk> it still exists in the kernel
[01:09] <rgl> sure.  but last time I've checked, its not advised to export it to guests.
[01:09] <Keybuk> syslog won't be running, because this is init :)
[01:11] <rgl> humm, good point *G*
[01:11] <AlexExtreme> well, what does sysvinit do? :)
[01:13] <rgl> by default, a linux-vserver does not start init.  it just runs /etc/init.d/rc
[01:14] <rgl> but we can make it run init.  but last time I've tried, I failed to make upstart work at all :-(
[01:14] <Keybuk> AlexExtreme: opens /dev/null
[01:14] <AlexExtreme> rgl: then what is the parent of all the processes? surely when rc exits it'll drop dead since process #1 has died
[01:15] <rgl> AlexExtreme, there is a "virtual" #1.   the guest will stay awake until all its processes die.  (and not when #1 dies)
[01:15] <AlexExtreme> ah
[01:16] <Keybuk> what reaps children?
[01:16] <rgl> I think its that "virtual" #1.
[01:17] <rgl> but I don't known for sure.  there is some magic/vudu out there *G*
[01:17] <rgl> anyways, last night, I couldn't make upstart 0.3.8 do what I want :-(
[01:18] <rgl> can you guys look at http://pastie.caboo.se/66469 and tell me if I'm doing something wrong?
[01:18] <rgl> namely, when I "start php-fcgi", the "php-fcgi-1" does not start at all.
[01:31] <Keybuk> I don't see why that shouldn't work
[01:32] <Keybuk> run in another window
[01:32] <Keybuk> "sudo initctl events"
[01:32] <Keybuk> then do "start php-fcgi" and paste the output of initctl from the other window
[01:33] <rgl> OK.  give me a sec to fireup vmware. :D
[01:36] <rgl> Keybuk, odd.  it now works!
[01:37] <rgl> Keybuk, do I have to restart upstart after I add a new service file or something like that?
[01:40] <Keybuk> shouldn't need to
[01:40] <Keybuk> 0.2.7 had bugs where it didn't notice
[01:40] <Keybuk> 0.3.8 should work just fine
[01:40] <Keybuk> if you have experienced bugs, we'd like to get them fixed :p
[01:42] <rgl> I can't reproduce the problem I had yesterday.  but sure, if I found some bug I'll let you known.
[01:43] <rgl> I found one quirk that is bugging me, if a process fails to restart for five(?) times in a row, upstart never tries to launch it again, it that normal?  can I config it?
[01:43] <Keybuk> right
[01:43] <Keybuk> you'll see a "respawning too fast" type warning
[01:43] <Keybuk> I think it's attempting to respawn 5 times in 10 seconds
[01:44] <Keybuk> it's configurable
[01:44] <Keybuk>   "respawn limit COUNT PERIOD"
[01:44] <Keybuk> e.g.
[01:44] <Keybuk>   respawn limit 100 10
[01:44] <Keybuk> (stop job if it respawns more than 100 times in any 10s period)
[01:44] <rgl> ah nice :D
[01:45] <Keybuk> if either of them are 0, then the respawn catching is disabled
[01:45] <rgl> works on 0.3.8? :D
[01:45] <Keybuk> most things work on 0.3.8
[01:46] <rgl> cool :D
[01:46] <rgl> what you mean respawn catching is disabled?  the service is always restarted?
[01:47] <Keybuk> yeah
[01:47] <Keybuk> service is allowed to restart as many times as it likes
[01:47] <Keybuk> why were you hitting the respawn limit out of interest?
[01:47] <Keybuk> usually that means that the thing you're exec'ing is dying
[01:47] <Keybuk> which is bad, no?
[01:48] <rgl> yes it is a bad thing :D
[01:48] <Keybuk> why was it dying?
[01:48] <rgl> I was trying it :D
[01:48] <rgl> to see how upstart reacted when the service dies
[01:49] <Keybuk> ah right
[01:49] <Keybuk> a few notes from scrollback
[01:49] <Keybuk> "service"
[01:49] <Keybuk> and "start" doesn't exit
[01:49] <Keybuk> Upstart has two basic types of jobs
[01:49] <Keybuk> Tasks and Services
[01:49] <Keybuk> Tasks are things like "run fsck", or "backup my home directory", etc.
[01:49] <Keybuk> Services are daemons and stuff
[01:50] <Keybuk> for tasks, "start" deliberately doesn't exist until it's complete (and events they "start on" aren't deemed finished), since the task is not successful until it exists
[01:50] <Keybuk> s/exist/exit/
[01:50] <Keybuk> for services, you want "start" to exit (and events to finish) when it is running, since that's when it's successful
[01:51] <Keybuk> (a successful fsck is a finished one, a successful web server is a running one)
[01:51] <Keybuk> they're otherwise identical in configuration
[01:51] <Keybuk> Upstart jobs default to being tasks
[01:51] <Keybuk> if you want them to be services, you need to put either "service" or "respawn" in the config
[01:52] <rgl> woah, thx!  that explains things :-)
[01:53] <Keybuk> there's a third option as well
[01:53] <Keybuk> but this is not fully implemented yet
[01:53] <Keybuk> (supervision on processes that fork into the background)
[01:53] <Keybuk> -- 
[01:54] <Keybuk> why failing services still say "started"
[01:54] <Keybuk> this is because from Upstart's point of view, it has started -- the script is running
[01:54] <Keybuk> there's no internal way (yet) for the service to notify Upstart that it is, in fact, really running and really ready
[01:54] <Keybuk> there's two planned improvements here:
[01:55] <Keybuk>  1 - better catching of exec() failures.  Right now Upstart forks the child and assumes it's running; exec() failures aren't special.  This will change so that the exec() has to finish before Upstart moves the job out of the spawned state (and thus can move directly into stopping if the exec() failed for some reason)
[01:56] <Keybuk>  2 - libupstart readyness notification.  services that take a while to be ready will be able to use libupstart to notify upstart that they're accepting connections, etc.  if this fails to happen, they can be considered failed, killed, and restarted
[02:00] <rgl> I see.  thx for the explanation :-)
[02:00] <rgl> are you also planning on having monit alike-features? :D
[02:02] <Keybuk> no
[02:03] <Keybuk> no particular reason to, since monit already has those features
[02:03] <Keybuk> you can use monit to do the monitoring, and have it tell upstart to restart services, etc.
[02:04] <rgl> ah ok.
[02:04] <rgl> maybe monit could be enhanced to do real time monitoring by listening to upstart events.
[02:04] <Keybuk> I'm a full believer in the "do only one thing well"
[02:04] <Keybuk> exactly
[02:04] <Keybuk> same for heartbeat, et al
[02:05] <Keybuk> it makes no sense for upstart to grow the ability to communicate across serial ports, etc.
[02:05] <Keybuk> it makes far more sense for the services that already can do that to link to libupstart and emit events, or even start/stop processes themselves
[02:05] <Keybuk> if you look at initctl, it's just a wrapper around libupstart
[02:05] <Keybuk> so any process can do whatever it can do
[02:05] <Keybuk> (ie. list services, start/stop them, emit events, etc.)
[02:06] <rgl> makes sense :)
[02:07] <rgl> what is libupstart?
[02:07] <rgl> I mean, I see no libupstart package
[02:07] <Keybuk> the IPC library
[02:08] <Keybuk> see upstart/message.h in the source code
[02:08] <Keybuk> it's not separately packaged yet, because the API isn't anywhere near stable
[02:08] <rgl> ah, so its not yet packed as a .so file.
[02:08] <Keybuk> right, it's an .a file in the source linked to by initctl
[02:09] <Keybuk> anything initctl does is through libupstart messages
[02:09] <Keybuk> e.g. "initctl version"
[02:10] <Keybuk> that's done by something like:
[02:10] <Keybuk>   int sock = upstart_open ();
[02:10] <Keybuk>   NihIoMessage *msg = upstart_message_new (NULL, UPSTART_INIT_DAEMON, UPSTART_VERSION_QUERY);
[02:10] <Keybuk>   nih_io_message_send (msg, sock);
[02:11] <Keybuk>   msg = nih_io_message_recv (NULL, sock, NULL);
[02:11] <Keybuk>   upstart_message_handle (NULL, msg, { UPSTART_VERSION, my_func }, NULL);
[02:11] <Keybuk> my_func (..., const char *version, ...) {
[02:11] <Keybuk>    printf ("%s\n", version);
[02:11] <Keybuk> }
[02:12] <rgl> sweet :D
[02:12] <rgl> what is NIH?   (not invented here? *G*)
[02:12] <ion_> NihIoMessage *msg = upstart_message_new (NULL, UPSTART_INIT_DAEMON, UPSTART_I_NEED_CAFFEINE_NOW);
[02:12] <Keybuk> yes
[02:12] <Keybuk> ion_: UPSTART_EVENT_EMIT, "i-need-caffeine" :p
[02:13] <ion_> :-)
[02:13] <Keybuk> rgl: libnih is my "Copy & Paste" code library
[02:13] <Keybuk> that stack of code that most developers have of useful bits and pieces that don't quite exist anywhere else
[02:13] <Keybuk> it's roughly akin to glib, or the hackerlab lib, etc.
[02:13] <rgl> ah, good old misc. utils lib :D
[02:14] <Keybuk> I should put that in the FAQ?
[02:14] <Keybuk> "Q. Why do you use libnih and not glib?"
[02:14] <Keybuk> "A. typedef int gint"
[02:14] <ion_> Hehe
[02:14] <rgl> whats the pun? :D
[02:15] <Keybuk> pun?
[02:15] <rgl> I didn't get the answer *G*
[02:15] <rgl> so I suppose its a pun or something like that
[02:16] <Keybuk> glib provides alternate names for all of the C standard types
[02:16] <Keybuk> allegedly for portability
[02:16] <Keybuk> so instead of "int", you have "gint"
[02:16] <Keybuk> and instead of "char", you have "gchar"
[02:17] <rgl> so what?
[02:17] <Keybuk> it's silly
[02:18] <Keybuk> "gpointer is easier to use than void *"
[02:18] <Keybuk> no it's not
[02:18] <rgl> its like having DWORD, UNIT and the like, no? :D
[02:18] <Keybuk> it's longer to type, and it's not very C-ish
[02:18] <Keybuk> DWORD makes sense, since it varies between platforms
[02:18] <Keybuk> and needs to be defined differently in different circumstances
[02:19] <rgl> the "WORD" is "DWORD" is different for each CPU I guess.  so its like silly too.  unless WORD is not as in CPU WORD.
[02:20] <Keybuk> glib tries to hide C from the programmer
[02:20] <Keybuk> you don't program in C, you program in "glib"
[02:20] <Keybuk> this strange OO-ish variant of C
[02:20] <Keybuk> this, to me, seems silly
[02:21] <rgl> C with gobjects :D
[02:27] <rgl> why do jobs default to task instead of service?
[02:29] <ion_> Id expect most of the jobs to be tasks eventually.
[02:33] <Keybuk> rgl: had to pick one
[02:33] <rgl> why not make it explicit?  
[02:33] <Keybuk> if "service" was the default, you'd need a "task" stanza
[02:34] <Keybuk> and then you'd have the issue where you'd have to error if both "task" and "respawn", or "task" and "daemon" were specified
[02:34] <Keybuk> with "task" as the default, there's no need for any conflicts checking - "service", "respawn" and "daemon" are all possible options; and any of them implicitly enable "service" if not already specified
[02:35] <Keybuk> explicit is the likely end-point, yeah
[02:35] <Keybuk> but then that's icky, because you'd need "file doesn't state any of 'task', 'service', 'respawn', 'daemon', 'state', 'profile'" etc.
[02:35] <Keybuk> another option is to configure them in different directories
[02:35] <Keybuk> /etc/init/tasks.d
[02:36] <Keybuk> /etc/init/services.d
[02:36] <rgl> or "unknown job type" *G*
[02:36] <ion_> In the long run, multiple directories might be good, as the number of jobs will go up.
[02:36] <Keybuk> of course, multiple directories has the namespace issue
[02:37] <ion_> True.
[02:37] <Keybuk> /etc/init.d/task.d/foo
[02:37] <Keybuk> /etc/init.d/service.d/foo
[02:37] <Keybuk> which wins?
[02:37] <rgl> humm, havin different directories means you'll have different event namespaces?  that is, how you'd wait for a task/service?
[02:37] <rgl> yeah *G*
[02:37] <ion_> Neither. Upstart gives an error and doesnt use either one.
[02:38] <rgl> or foo.task foo.service *G*
[02:39] <Keybuk> rgl: ick
[02:39] <Keybuk> :p
[02:41] <rgl> hehe
[02:41] <rgl> one thing I would like is "nested" services, that is, php-fcgi, php-fcgi/1, etc :D
[02:47] <Keybuk> rgl: we kinda have that <g>
[02:47] <Keybuk> your php-fcgi is an excellent use case for something else we've been thinking of
[02:47] <Keybuk> and let me explain by first talking about that
[02:47] <Keybuk> right now we have /etc/event.d/tty[1-6] 
[02:47] <Keybuk> 6 files, all of which do the same thing, with different arguments
[02:47] <Keybuk> and each one would need something like
[02:48] <Keybuk>   while tty-added tty1 until tty-removed $TTY
[02:48] <Keybuk>   exec /sbin/getty 38400 tty1
[02:48] <Keybuk> eurgh
[02:48] <Keybuk> it would be better to have one getty job that runs 6 times, with different arguments
[02:48] <Keybuk> we have this kind of thing already
[02:48] <Keybuk> "instance" jobs
[02:48] <Keybuk> if you put the "instance" keyword in the config file, then every "start" will spawn off a new instance
[02:49] <Keybuk> so "status php-fcgi" would return as many lines as "start" has been called
[02:49] <Keybuk> likewise for events
[02:49] <Keybuk> so, we could have a single getty job:
[02:49] <Keybuk>   instance
[02:49] <Keybuk>   while tty-added tty[1-6]  until tty-removed $TTY
[02:49] <Keybuk>   exec /sbin/getty 38400 $TTY
[02:50] <Keybuk> that'd get run 6 times, since six matching "tty-added" events would occur
[02:50] <Keybuk> and each one would run until its associated tty was removed
[02:50] <Keybuk> your example would work very well with file events
[02:50] <Keybuk>   instance
[02:51] <Keybuk>   while file-exists /var/run/php/fcgi.*
[02:51] <Keybuk>   exec /usr/bin/php5-cgi -b $FILE
[02:51] <Keybuk> you'd get as many events as you had matching files, and thus as many instances of that job
[02:51] <Keybuk> "status" would show them all
[02:51] <Keybuk> "start" would have to specify which file it wanted to start with ...
[02:52] <Keybuk>    # initctl start php-fcgi FILE=/var/run/php/fcgi.foo
[02:52] <Keybuk> "stop" would have to specify which instance to stop; or "stop php-fcgi" would stop them all
[02:55] <rgl> hum, so to start an instance we just need to touch a file?   and to stop it we just need to rm it?
[02:55] <Keybuk> yeah
[02:56] <rgl> all FS have notifications? 
[02:56] <Keybuk> inotify is in the VFS layer, so yeah
[02:57] <rgl> you are targetting linux only?
[02:57] <Keybuk> absolutely
[02:57] <Keybuk> Upstart is unashamedly dependant on features of the Linux kernel
[02:57] <rgl> okay :D
[02:58] <Keybuk> I think the above is a pretty elegant solution, what do you think?
[02:59] <rgl> its pretty neat :D
[03:00] <rgl> at least for this particular use-case :-)
[03:00] <rgl> can I have it now? ;-)
[03:01] <Keybuk> soon
[03:01] <Keybuk> the instance bit works now
[03:01] <Keybuk> the tying instances to events bit depends on complex-event-config
[03:01] <Keybuk> and you'd want file events as well, which are todo
[03:02] <rgl> cool :D
[03:03] <AlexExtreme> bah
[03:03] <AlexExtreme> Keybuk, can you help me with NihList quickly? :)
[03:03] <Keybuk> sure
[03:04] <AlexExtreme> hang on
[03:06] <AlexExtreme> http://frugalware.org/paste/1453 << ok, that's my code. it's probably really ugly, but anyway :) the loop at the bottom goes through each of the things i've added to the list and prints them out, but it prints out complete rubbish and uses the wrong value for disabled. so obviously i'm adding stuff incorrectly. it's mostly based on what i've seen from notify.c in upstart
[03:06] <AlexExtreme> s/disabled/enabled/
[03:09] <Keybuk> style: "NihList entry" is nominally the first thing in a struct
[03:09] <Keybuk> (nothing assumes this, but it's just a style point)
[03:09] <AlexExtreme> heh
[03:09] <AlexExtreme> well
[03:09] <AlexExtreme> that kinda fixed it :p
[03:09] <Keybuk> you don't need NIH_LIST_FOREACH_SAFE
[03:09] <Keybuk> just NIH_LIST_FOREACH will do
[03:09] <Keybuk> aha!
[03:10] <Keybuk> yes, the iter points you're getting are pointers to the entry member
[03:10] <Keybuk> so you can't just cast them to upstart_profileentry_t
[03:10] <Keybuk> (this is the reason I always put the NihList entry first <g>)
[03:10] <AlexExtreme> :)
[03:10] <AlexExtreme> well
[03:10] <AlexExtreme> now i'm getting this
[03:10] <AlexExtreme> [14:09:35]  [ alex in ~/Frugalware/work/upstart/profile ]  $ ./profile default 
[03:10] <AlexExtreme> Parsing profile default...
[03:10] <AlexExtreme>  * Everything will be enabled by default but can be overridden
[03:10] <AlexExtreme>  * network will be enabled no matter what
[03:10] <AlexExtreme> but, it doesn't seem to recognise the fact that there is also an apache entry there somewhere
[03:11] <AlexExtreme> [14:10:39]  [ alex in ~/Frugalware/work/upstart/profile ]  $ cat default 
[03:11] <AlexExtreme> * = y
[03:11] <AlexExtreme> apache = y
[03:11] <AlexExtreme> network = n
[03:11] <Keybuk> you free the job in the loop ;)
[03:11] <AlexExtreme> oops
[03:11] <AlexExtreme> :p
[03:12] <AlexExtreme> [14:11:22]  [ alex in ~/Frugalware/work/upstart/profile ]  $ ./profile default 
[03:12] <AlexExtreme> Parsing profile default...
[03:12] <AlexExtreme>  * Everything will be enabled by default but can be overridden
[03:12] <AlexExtreme>  * apache will be disabled no matter what
[03:12] <AlexExtreme>  * network will be enabled no matter what
[03:12] <AlexExtreme> yay \o/
[03:12] <AlexExtreme> thanks ;)
[03:12] <AlexExtreme> now to make it check against files in /etc/event.d
[03:13] <rgl> "stop on runlevel [!1] " is that a stop on runlevel not 1 ?
[03:13] <Keybuk> yes
[03:13] <rgl> is so, why the []  ?
[03:13] <Keybuk> fnmatch()
[03:13] <Keybuk> standard UNIX glob(7) syntax
[03:14] <rgl> the runlevel arg is a glob?
[03:14] <Keybuk> yes
[03:14] <rgl> ah alright :D
[03:14] <Keybuk> arguments to events in "on" are globs
[03:14] <rgl> I can have: stop on runlevel 1 2 3 ?
[03:14] <Keybuk> so that means stop on any runlevel event with a single-character argument that is not the character "1"
[03:14] <Keybuk> no
[03:14] <Keybuk> stop on runlevel [123
[03:14] <Keybuk> stop on runlevel [123] 
[03:14] <Keybuk> the runlevel event has a single argument, the runlevel being entered
[03:15] <rgl> ACK :)
[03:17] <Keybuk> I realised the other day that the runlevel event should have a RUNLEVEL and PREVLEVEL environment variable
[03:17] <Keybuk> then I could do away with all of the code in the rc jobs
[03:18] <Keybuk> runlevel would update utmp and emit the event itself
[03:19] <Keybuk> err, telinit would
[03:20] <Keybuk> then I could do away with runlevel --set
[03:40] <rgl> how do I make sure the admin does not start an service because another one is not running?
[03:40] <rgl> something like dependencies.
[03:42] <rgl> oh well, scrap that.  if it depends on other, and that one is not started, the start of the service will eventually fail because of that.  so the admin will notice that somehing is not right.
[03:44] <Keybuk> how do you mean
[03:44] <Keybuk> right
[03:47] <AlexExtreme> hooray! http://frugalware.org/paste/1454
[04:02] <rgl> Keybuk, what is the behaviour of jobs that are symlinks?   I mean, I have a symlink: php-fcgi-3 -> php-fcgi-1 and when I change php-fcg-1 job file, and do a: stop php-fcgi-3 ; start php-fcgi-3;  upstart does not reload the job file.  Is that intended?
[04:03] <Keybuk> err
[04:03] <Keybuk> yes :-)
[04:03] <AlexExtreme> iirc inotify has some bugs with symlinks
[04:04] <Keybuk> either we need to handle symlinks specially, or inotify needs to handle them specially
[04:04] <Keybuk> use hardlinks for now :o)
[04:04] <rgl> ok :D
[04:04] <AlexExtreme> kernel command line arguments that the kernel doesn't use are passed to init, right?
[04:05] <Keybuk> AlexExtreme: foo=bar arguments are set in init's environment
[04:05] <Keybuk> AlexExtreme: anything else is an argument, yes
[04:06] <AlexExtreme> ah, cool. so if i were to do what my profiles spec says on the kernel command line, i'd get the requested profile in the environment?
[04:08] <Keybuk> right
[04:08] <Keybuk> except upstart doesn't pass those yet (bug)
[04:18] <rgl> Keybuk, ouch, even hardlinks do not work *G*
[04:18] <Keybuk> heh
[04:18] <Keybuk> really?
[04:18] <Keybuk> interesting
[04:19] <rgl> yup, really.  I had to touch the file to upstart to reload it.
[04:20] <Keybuk> that's odd
[04:20] <Keybuk> since touching the file is the same effect as editing it, no? :p
[04:20] <Keybuk> maybe it's touch-by-name
[04:21] <rgl> the point is.  if I edit the config file (say, on hardlink 1), I have to touch all the other hardlinks too.
[04:23] <rgl> so I really need that "instance" feature you've talked yearlier, or else I might be biten in the arse someday heheh
[04:29] <AlexExtreme> i don't need upstart to pass them to the jobs, i need it from upstart itself :)
[04:29] <AlexExtreme> (the environment vars)
[04:43] <AlexExtreme> hmm
[04:45] <AlexExtreme> is the profile override on the kernel command line thing that I put in the profiles spec really necessary? I can't really think of a valid use case for it
[04:45] <Keybuk> dunno, I can't remember what it was for?
[04:46] <AlexExtreme> The profile can be overridden at boot-time by specifying extra kernel command line arguments, like the example below. It tells upstart to use the "noserver" profile but overrides what the profile defines should be done with mysql and postgresql:
[04:46] <AlexExtreme>     *
[04:46] <AlexExtreme>       bootprofile=noserver override=mysql:no,postgresql:no
[04:46] <AlexExtreme> it's just the override part i'm referring to
[04:46] <Keybuk> oh right
[04:46] <AlexExtreme> you should definitely be able to change the profile at boot :)
[04:47] <Keybuk> and after booted? :p
[04:47] <AlexExtreme> yes, of course :P
[04:47] <AlexExtreme> actually
[04:47] <Keybuk> which begs the question, do the jobs respond to the events, and just not start
[04:47] <Keybuk> so when you re-enable the profile, they start immediately
[04:48] <AlexExtreme> IMO they shouldn't immediately start
[04:49] <Keybuk> why not?
[04:49] <Keybuk> if I enable multiuser, shouldn't things like getty start? :p
[04:49] <AlexExtreme> true
[04:50] <AlexExtreme> that, of course, makes life a lot harder :) (at least, afaik)
[05:03] <AlexExtreme> http://upstart.ubuntu.com/wiki/Profiles << how's that?
[05:05] <rgl> I have to ask this.  why a file and not a directory with the jobs you want on a profile?
[05:06] <AlexExtreme> huh?
[05:06] <AlexExtreme> the file only lists the names of the jobs
[05:07] <rgl> and the directory would too.  you just need to have a file named after the job name.
[05:07] <rgl> that way, its easier for a package to add a job into a profile.  (it doesn't need to edit a file).
[05:07] <AlexExtreme> there would be a utility to do that
[05:08] <AlexExtreme> so the packages would just call a utility
[05:08] <AlexExtreme> and you wouldn't be able to do the * with that, nor disable jobs easily
[05:08] <AlexExtreme> and it requires you to use symlinks
[05:08] <rgl> I like the directory better.  *G*
[05:08] <rgl> if you don't want a job in a profile, that create a file for it.
[05:09] <rgl> if you don't want a job in a profile, don't create a file for it.
[05:09] <AlexExtreme> i don't see why it's better, all i can see are disadvantages
[05:09] <rgl> *srug*
[05:13] <rgl> maybe the command should be named "profile" as in "initctl profile new-profile-name"?