/srv/irclogs.ubuntu.com/2010/03/15/#upstart.txt

=== robbiew is now known as robbiew_
Keybukion: vague zany idea, remove some of the need for stanzas in the job format14:04
Keybuke.g. instead of14:04
Keybuk    env FOO="some value"14:04
Keybukjust have14:04
Keybuk    FOO="some value"14:04
Keybukcould introduce some nice features that way14:04
Keybukwhile apache14:04
Keybukevery hour14:05
Keybukexec log-rotate14:05
Keybukrestart apache14:05
Keybuk-- 14:05
Keybukwhere "restart" is exactly equivalent to14:05
Keybuk  script14:05
Keybuk    exec log-rotate14:05
Keybuk    restart apache14:05
Keybuk  end script14:05
Keybuktype things14:05
Keybukexcept obviously without the exec there :p14:05
ionSounds good14:05
Keybukthen I was thinking that things like "on" could bind to whatever follows14:06
Keybuk   while apache14:06
Keybuk 14:06
Keybuk    every hour14:06
Keybuk    exec log-rotate14:06
Keybuk 14:06
Keybuk    every day14:06
Keybuk    exec log-rotate --force14:06
Keybuk 14:06
Keybuk    on omg-the-world-is-over14:06
Keybuk    restart apache14:07
Keybukwhich is kinda cute for sub-jobs without needing a block14:07
* sadmac considers whether he has to do anything nasty to his parser now14:07
sadmacshould be ok....14:07
Keybuksadmac: it was reading your parser code that made me think about it14:07
sadmacKeybuk: ah, cool14:07
Keybukas can be more flexible14:08
sadmacI've been working on nih_parse_tool, which will work like yacc and turn a DSL into a C code parser14:09
ionNice14:10
sadmacstarting to appreciate how much of a pain actually processing these parse trees can be, but I think the parse tool will make it pretty straightforward14:10
sadmacand it'll get rid of the need to specify charsets manually, which normally requires a calculator and causes anneurisms.14:11
Keybukso nobody hates the idea that on would bind like that?14:16
sadmacKeybuk: I wouldn't mind playing with it14:16
ionAs long as how other things such as env, instance etc. are clearly defined.14:17
sadmacKeybuk: it may mean that the next job format isn't a strict superset of 0.6, which means more acrobatics to do that backward compatibility thing you promised14:17
Keybuksadmac: 0.6 doesn't support bare "on" - so it should be fine14:18
sadmacKeybuk: right, but as of now we can only have one job format and get away with everything. We just neglect to remove start on/stop on and the 0.6 grammar is a subset of the 1.0 grammar.14:19
sadmacKeybuk: this way we might need two separate parsers.14:19
sadmacKeybuk: oh, I see what you're saying though... yeah could be.14:19
Keybukie. using "on", "every", "at" type keywords, everything after that is strict 1.0 grammar14:20
Keybukbut up until then, you can get away with some older grammar14:20
sadmacso it'd be jobfile = stanzas06* stanzas10*14:22
Keybukright14:22
Keybuktbh, we can even get away with "as soon as you put any 1.0 format thing in there, then the entire file must be 1.0 not 0.6"14:22
Keybuksince the point of the compatibility is to make sure existing jobs work14:23
sadmacjobfile = stanzas06* EOF | stanzas10* EOF14:23
Keybukright14:23
Keybukthe only really ambiguous bit is the double stanzas crap14:24
Keybuka file containing just:14:24
sadmacugh. that ends up being kinda slow because we parse as much of the file as we can as 0.6, until we find a 1.0 thing. then we start over14:24
Keybuk  exec foo14:24
Keybuk  exec bar14:24
KeybukI'd do it the other way - parse as 1.0 until we fail, then go back and see if it parses as 0.614:24
sadmacthat works too.14:24
Keybukparse errors can even be tagged "but might work on 0.6"14:26
Keybuke.g.14:26
Keybukthe second exec there would be a parse error tagged "but try 0.6"14:26
sadmacthat's the last thing I'll need to go back and do is the error reporting14:28
ionkeybuk: Re: “implementing serialized startup sequence”: we talked about Upstart implementing similar priority stuff as what mountall is doing for fscks at the moment. I wonder if that would be useful for them as well?15:49
Keybukentirely possibly15:50
Keybukfirst I want to figure out what they mean15:50
KeybukI still don't know where the whole M{oblin,aemo,eego} thing is going15:50
ionkeybuk: An initial idea for the config syntax: ‘priority 1; locks sda sdb’: the job has internal exclusive locks named ‘sda’ and ‘sdb’ while running. Whenever a pending job is considered for getting to start next, consider the highest-priority ones first, the default priority being zero. ‘priority -5; contends-io sda sdb’: no actual locking, but the highest-priority one (falling back to first-come first-served) per “lock” names gets the IO ...16:07
ion... priority at any given moment. Just like what mountall does, but with an optional priority integer. ‘contends-cpu foo bar baz’: same, but for niceness.16:07
Keybukhttp://upstart.ubuntu.com/wiki/Resources16:08
Keybukwritten in 1882 or something <g>16:08
ionAh, i didn’t even remember about that one.16:08
ionAs for what i wrote, the ‘locks X’, ‘contends-io Y’ and ‘contends-cpu Z’ tags should all be in their own namespaces, so foo.conf: ‘locks bla’ and bar.conf: ‘contends-io bla’ would not affect each other.16:10
ionSo ‘contends-io sda sdb; contends-cpu sda sdb’ would do both IO and niceness priorization.16:11
Keybukmakes sense16:11
sadmacKeybuk: any other thoughts on nih-parse while you were looking at it? I guess its at least clean enough now that you can tell what the code does :)17:23
Keybukthe code is still ick17:24
KeybukI don't like giant macros like that17:24
Keybukyou're from North Carolina17:25
Keybukwe have to assume that, at some point over the next couple of years, you are going to get murderer17:25
Keybukor at least shot17:25
Keybukso it has to be maintainable once you're gone :p17:25
sadmacKeybuk: I get murderer and murderer every day.17:25
sadmacKeybuk: I more or less agree. I know I can at least remove the per-function structs. After that some of the macros might even be able to become functions.17:26
Keybukthat would be yay17:27
sadmacKeybuk: I've spent a lot of time trying to figure out how I wrote it as easily as I did in the first place. It ran pretty much the first time.17:32
=== rberger_ is now known as rberger
=== rberger_ is now known as rberger
=== rberger_ is now known as rberger
NoReflexhello! I'm having some problems with upstart in karmic server 64bit. It won't start postgresql. I tried http://superuser.com/questions/98702/how-to-make-postgresql-start-at-boot-time-in-ubuntu but it didn't work. can I remove upstart? I'm afraid to test it because the machine is at a remote location and if I mess it up I won't be able to connect to it anymore.22:13
NoReflexI can start postgresql using /etc/init.d/postgresql-8.4 manually after login. There are links in /etc/rc*.d to postgresql init script but for some reason it isn't started automatically after reboot22:14
NoReflexthe channel says Upstart 0.6.5 "Our last, best hope for victory" ... should I try this version? is it dangerous?22:18
NoReflexI also searched for a logging possibility because I don't know why it won't start....and it's hard to "debug" a problem when you don't have the error message22:19
NoReflexany ideas?22:27
NoReflexCan I replace upstart with the old init package?22:28
NoReflexanybody?22:35
mbieblNoReflex: I don't think you can.22:46
mbieblMost of the core init scripts (rcS stage) have been converted to upstart-only22:46
mbieblI don't see, why starting sysv init scripts for runlevel 2 should be a problem.22:48
mbiebldo you have a bug report maybe?22:48

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