=== _ion [i=johan@kiviniemi.name] has joined #upstart
=== khermans__ [i=administ@nat/cisco/x-d2e541840bf269f5] has joined #upstart
=== theCore [n=alex@ubuntu/member/theCore] has joined #upstart
=== j_ack [n=rudi@p508DB9B4.dip0.t-ipconnect.de] has joined #upstart
=== redear [n=redear@bas12-toronto63-1088806045.dsl.bell.ca] has joined #upstart
=== redear [n=redear@bas12-toronto63-1088806045.dsl.bell.ca] has left #upstart []
=== j_ack [n=rudi@p508DB9B4.dip0.t-ipconnect.de] has joined #upstart
=== khermans__ [i=administ@nat/cisco/x-5b11189a6dd99d5c] has joined #upstart
=== Amaranth [n=travis@ubuntu/member/Amaranth] has joined #upstart
=== pkt [n=pantelis@] has joined #upstart
=== Md [i=md@freenode/staff/md] has joined #upstart
=== Keybuk [n=scott@quest.netsplit.com] has joined #upstart
=== pkt [n=pantelis@] has joined #upstart
=== mdales [n=mdales@cpc3-cmbg6-0-0-cust25.cmbg.cable.ntl.com] has joined #upstart
mdalesmorning Keybuk 10:48
mdalesthanks for your help yesterday, my system seems to be doing what I want now :)10:48
Keybukcool :) no problem10:49
mdalesthought I'd loiter for a bit still as I learned a bit from just watching the general chat here yesterday10:49
=== pkt [n=pantelis@athedsl-137442.otenet.gr] has joined #upstart
Keybukaction reload script11:53
Keybuk ...11:53
Keybukend script11:53
Keybukaction reload on some-event11:53
Keybuksyntax could use some work there :-/11:53
=== mdales_ [n=mdales@cpc3-cmbg6-0-0-cust25.cmbg.cable.ntl.com] has joined #upstart
Keybukaction reload01:24
Keybuk  on some-event01:24
Keybuk  script01:25
Keybuk    ..01:25
Keybuk  end script01:25
Keybukend action01:25
Keybukthat might work01:25
_ionLooks quite intuitive.01:25
Keybukneed to sort out the job status messages first though01:30
=== Keybuk made things a wee bit more complicated :p
Keybukfor a given job, "foo", there may be:02:17
Keybuk - old versions running from before the config file was modified02:18
Keybuk - a master instance that never runs02:18
Keybuk - multiple running instances02:18
Keybuk - or a single instance of the job02:18
Keybukand for each instance, there may be:02:18
Keybuk - a "main stream" process (pre-start, main, post-start)02:18
Keybuk - a "side stream" process (post-start, pre-stop)02:18
Keybuk - any number of user actions02:18
Keybukstart foo => obviously only cares about the master/single instance of current versions02:21
Keybukstop foo => only needs to care about single or multiple instances, but of both current and old versions02:22
Keybukstatus foo => probably cares about them all?02:22
Keybukthis comes back to how instances are implemented02:25
Keybukright now they're just extra entries in the hash table02:25
Keybukperhaps separating all the non-config state into a JobInstance structure, and having a list of those in the job, is one way to do it02:25
=== mdales [n=mdales@cpc3-cmbg6-0-0-cust25.cmbg.cable.ntl.com] has joined #upstart
=== pkt [n=pantelis@athedsl-157104.otenet.gr] has joined #upstart
=== wasabi [n=wasabi@ubuntu/member/wasabi] has joined #upstart
=== j_ack [n=rudi@p508DBA65.dip0.t-ipconnect.de] has joined #upstart
=== pkt [n=pantelis@athedsl-81335.otenet.gr] has joined #upstart
=== pkt_ [n=pantelis@] has joined #upstart
=== AStorm [n=astralst@chello084010114027.chello.pl] has joined #upstart
=== pkt [n=pantelis@] has joined #upstart
=== pkt [n=pantelis@] has joined #upstart
=== Keybuk finds silly bugs
Keybuka deleted job can't stop05:07
Keybukbecause the job_change_goal() function won't let you run it for a deleted job05:07
=== Keybuk wonders if anyone will ever reach 4 billion jobs or events on a running system
=== AlexExtreme highly doubts that
mdalesAlexExtreme: we'll quote you on that in 5 years when 32 bit pids are a cause of global concern05:59
wasabi_They are a cause for concern right now in my world.05:59
Keybukit doesn't matter, I've deliberately put in code to cope with it just in case05:59
Keybukthat branch is sub-optimal though06:00
Keybuksince once the counter wraps, it has to scan the entire jobs hash each time you want to add a new one to ensure uniqueness06:00
Keybuk(there's probably a clever way to avoid that)06:00
=== mbiebl [n=michael@e180099068.adsl.alicedsl.de] has joined #upstart
wasabi_oh, pids. n/m.06:03
wasabi_for whatever reason my mind thought uid06:03
Keybuknot pids06:09
Keybukthe Job and EventEmission structures have a unique id field06:09
Keybukso you know *which* "foo" job, and which "block-device-added" event it is06:09
wasabi_uh huh06:09
Keybukthey're uint32_t, which wraps after 4 billion job file changes, or 4 billion initctl emits06:09
Keybuk(or 4 billion job state changes)06:09
Keybukobviously once wrapped, job->id = job_id++ is no longer guaranteed to be unique06:10
wasabi_so you need to scan before allocating.06:15
Keybukbut only once we've wrapped once06:15
wasabi_store a "lowest known job id value". update it when you lease/release a number. when leasing one, use the "last known one ++" and check if it's < the lowest known. if not, do teh forward scan.06:15
Keybukthe "update when release" is the tricky bit :p06:15
wasabi_well you only have to update on release when release == current lowest known06:16
wasabi_none of which really matters anyways.06:17
wasabi_the jobs hash is going to be small enough for it to not matter.06:17
Keybukand job creation isn't a time-critical activity06:21
Keybukin fact, upstart has no time critical activities :p06:22
wasabi_only at boot. and that won't have looped anyways06:22
=== j_ack [n=rudi@p508DBA65.dip0.t-ipconnect.de] has joined #upstart
=== khermans__ [i=administ@nat/cisco/x-7d93a3df3729d245] has joined #upstart
=== juergbi [n=juerg@80-219-17-102.dclient.hispeed.ch] has joined #upstart
=== Md [i=md@freenode/staff/md] has joined #upstart
=== pkt [n=pantelis@athedsl-281822.otenet.gr] has joined #upstart
=== pkt [n=pantelis@athedsl-136147.otenet.gr] has joined #upstart
=== j_ack [n=rudi@p508DBA65.dip0.t-ipconnect.de] has joined #upstart
=== mdales [n=mdales@dsl-217-155-205-58.zen.co.uk] has joined #upstart
=== mbiebl [n=michael@e180099068.adsl.alicedsl.de] has joined #upstart
=== theCore [n=alex@ubuntu/member/theCore] has joined #upstart

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