Sunday, 2010-07-25

[2010/07/25 02:06:30] @ Log started by gepetto
[2010/07/25 02:06:30] @ kubicek joined channel #puppet-dev
[2010/07/25 04:36:27] @ Quit: kubicek: Quit: kubicek
[2010/07/25 04:39:54] @ kubicek joined channel #puppet-dev
[2010/07/25 04:54:43] <kubicek> hello. i filled a bug and submitted a patch http://projects.puppetlabs.com/issues/4352
[2010/07/25 04:55:34] <kubicek> now i'm going to submit another patch. could someone please check my previous patch submission? i want to make my patches right :)
[2010/07/25 05:37:13] <duritong> kubicek: cool
[2010/07/25 05:37:24] <duritong> kubicek: there is wiki:Development_Development_Lifecycle which has some further notes
[2010/07/25 05:37:24] <gepetto> duritong: kubicek: wiki:Development_Development_Lifecycle is http://projects.puppetlabs.com/projects/puppet/wiki/Development_Development_Lifecycle "Puppet - Development Lifecycle - Puppet Labs"
[2010/07/25 05:37:59] <duritong> kubicek: you can adapt them for facter as well
[2010/07/25 06:17:43] <kubicek> duritong: thank you. i have seen this text. there is something about mailing the patches do -dev list. do i have to do this or is link to github sufficient ?
[2010/07/25 06:25:00] @ sammi joined channel #puppet-dev
[2010/07/25 06:47:24] <duritong> kubicek: it would be good of you could send the patches to the -dev list
[2010/07/25 06:48:45] <kubicek> duritong: ok. thank you. i'll try :)
[2010/07/25 06:51:39] <masterzen> kubicek: yes, you need to send your patches to puppet-dev mailing list for review.
[2010/07/25 07:15:42] <kubicek> and another question. My both patches fixes virtual detection on FreeBSD. My first patch fixes jail detection and second patch fixes kvm detection. If both patches would be accepted separately, there may be an error in their order. (if both kvm and jail are detected, jail should have precedence). should i put everything in one patch/commit to be sure they will be aplied correctly?
[2010/07/25 07:17:13] <kubicek> and last question - what should be my correct branch name? bug/master/4352 ?
[2010/07/25 08:11:05] @ Quit: sammi: Quit: sammi
[2010/07/25 08:26:43] @ sammi joined channel #puppet-dev
[2010/07/25 08:35:13] <masterzen> kubicek: branch names are usually ticket/master/ticketnb
[2010/07/25 08:35:52] <masterzen> kubicek: for patch ordering, put both patches in the same branch, so that the order will be respected and say so in the ticket.
[2010/07/25 08:36:11] <kubicek> OK. Thank you
[2010/07/25 08:37:12] @ Quit: sammi: Remote host closed the connection
[2010/07/25 08:38:03] @ sammi joined channel #puppet-dev
[2010/07/25 08:38:35] @ samueljon joined channel #puppet-dev
[2010/07/25 08:39:26] @ Quit: samueljon: Client Quit
[2010/07/25 09:38:59] <masterzen> markus: do you have 5 minutes to help me for #4244. I'm trying to include a MonitorMixin in the InstanceMethods module but it doesn't work because apparently I need to extend it so that the monitors get initialized.
[2010/07/25 09:39:00] <gepetto> masterzen: markus: #4244 is http://projects.puppetlabs.com/issues/show/4244 "Puppet - Bug #4244: Multithread issue with cached attributes - Puppet Labs"
[2010/07/25 09:39:32] <markus> masterzen: certainly
[2010/07/25 09:39:52] <markus> (rereading the ticket...)
[2010/07/25 09:40:08] <masterzen> markus: OK, although I read "Metaprogramming for ruby", I think I need to re-read it.
[2010/07/25 09:41:24] <masterzen> markus: I want to adds calls to synchronize. So I need to throw a MonitorMixin in the cacher instance vars
[2010/07/25 09:41:33] <markus> *laugh* Paolo and Matz probably have to reread it occasionally.
[2010/07/25 09:41:50] <markus> Yeah.
[2010/07/25 09:42:45] <masterzen> markus: if I include MonitorMixin in the InstanceMethods module, then MonitorMixin is not correctly setup. and fails.
[2010/07/25 09:43:58] <masterzen> markus: if I extend cacher InstanceMethods with MonitorMixin it doesn't get the synchronize method.
[2010/07/25 09:44:00] <markus> Ah. You're trying to solve the problem in general. Ambitious.
[2010/07/25 09:44:08] <masterzen> :)
[2010/07/25 09:44:31] <markus> Let me look at the code...
[2010/07/25 09:44:48] <masterzen> the only way I could fix it, is to use a Helper inheriting Hash and including the MonitorMixin, like you did for the Type loader...
[2010/07/25 09:46:53] <markus> Have you tried putting it explicitly in self.extended and self.included (e.g. as the ClassMethods are)?
[2010/07/25 09:47:14] <masterzen> markus: yes
[2010/07/25 09:47:24] <masterzen> markus: that didn't work
[2010/07/25 09:47:35] <markus> Ok
[2010/07/25 09:48:46] <masterzen> either I don't have access to the synchronize method or the module is not correctly initialized... It does something when it is extended.
[2010/07/25 09:49:20] <markus> I'm a little confused about the level at which locking is to take place.
[2010/07/25 09:50:07] <markus> A global lock (only one thread can be setting the value for a cached variable at a time) would be easy, agreed?
[2010/07/25 09:50:21] <masterzen> markus: that's what I'm trying to do
[2010/07/25 09:50:26] <markus> We'd just use a global and extend it in the main line.
[2010/07/25 09:50:43] <masterzen> ??
[2010/07/25 09:51:30] <masterzen> markus: my first version was synchronizing on the cached_value hash
[2010/07/25 09:52:08] <markus> value_cache?
[2010/07/25 09:52:25] <masterzen> markus: yes, sorry, type
[2010/07/25 09:52:27] <masterzen> *typo
[2010/07/25 09:52:48] <markus> No worries, I knew what you meant, just confirming.
[2010/07/25 09:53:01] <masterzen> something along: value_cache.synchronize { ... } in cached_value
[2010/07/25 09:53:24] <masterzen> with value_cache being a class Helper < Hash; extend MonitorMixin; end
[2010/07/25 09:53:35] <masterzen> that works fine
[2010/07/25 09:54:02] <markus> So that would lock each one individually, right?
[2010/07/25 09:54:16] <masterzen> yes
[2010/07/25 09:54:18] <markus> Why is that not a better solution in any case?
[2010/07/25 09:55:05] <masterzen> I don't know, I then thought that would be better to synchronize on the instance of the object using the cached_attr.
[2010/07/25 09:55:29] <masterzen> that would allow to put the synchronize in the method definied in the ClassMethods
[2010/07/25 09:55:41] <masterzen> but in fact that doesn't look like a good idea.
[2010/07/25 09:56:46] <markus> No, because we could still get a race condition, I think, trying to update the hash, and garble it's internal key structure.
[2010/07/25 09:58:03] <markus> Something as simple as:
[2010/07/25 09:58:05] <markus> def value_cache
[2010/07/25 09:58:05] <markus> @value_cache ||= {}.extend(MonitorMixin)
[2010/07/25 09:58:05] <markus> end
[2010/07/25 09:58:14] <masterzen> yes, nice
[2010/07/25 09:58:42] <markus> And then of course the synchronize blocks... :)
[2010/07/25 09:59:56] <markus> I'm going to be pulling the code for 2.6.1rc1 together in about 10hrs
[2010/07/25 10:00:05] <masterzen> markus: ok, I'll send a patch later tonight (along with some other jruby fixes)
[2010/07/25 10:00:23] <markus> Cool. It is...mid afternoon there?
[2010/07/25 10:00:33] <masterzen> markus: I also tried to add tests, but couldn't reproduce the issue :(
[2010/07/25 10:00:41] <masterzen> markus: evening here (7PM)
[2010/07/25 10:00:50] <markus> Testing thread / locking stuff is hard.
[2010/07/25 10:01:12] <markus> Ok, then, don't stay up too late. And thank you!
[2010/07/25 12:13:23] @ rcrowley joined channel #puppet-dev
[2010/07/25 12:46:27] @ Quit: rcrowley: Quit: rcrowley
[2010/07/25 13:03:32] @ jmccune joined channel #puppet-dev
[2010/07/25 13:07:05] @ stahnma joined channel #puppet-dev
[2010/07/25 13:41:47] @ lak joined channel #puppet-dev
[2010/07/25 14:05:19] @ Quit: jmccune: Ping timeout: 260 seconds
[2010/07/25 14:23:33] @ Quit: sammi: Quit: sammi
[2010/07/25 14:27:11] @ rcrowley joined channel #puppet-dev
[2010/07/25 14:33:41] @ Quit: kubicek: Quit: kubicek
[2010/07/25 14:34:32] @ kubicek joined channel #puppet-dev
[2010/07/25 14:45:11] @ Quit: kubicek: Quit: kubicek
[2010/07/25 14:51:18] @ kubicek joined channel #puppet-dev
[2010/07/25 14:52:20] @ Quit: lak: Quit: lak
[2010/07/25 15:55:12] <kubicek> http://groups.google.com/group/puppet-dev/browse_thread/thread/37ecf4a26c525450 my patches submitted to -dev :)
[2010/07/25 16:32:20] @ notbrien joined channel #puppet-dev
[2010/07/25 16:54:29] <duritong> kubicek: cool, thanks
[2010/07/25 17:01:08] <kubicek> i thank you all :) we have been using puppet for three years and this is my first patch :) what a shame :)
[2010/07/25 17:01:53] <kubicek> i hope i will find time to publish some of our puppet on freebsd tuning manifests :)
[2010/07/25 17:47:55] @ Quit: kubicek: Quit: kubicek
[2010/07/25 20:06:51] @ Quit: rcrowley: Quit: rcrowley
[2010/07/25 20:51:25] @ rcrowley joined channel #puppet-dev
[2010/07/25 21:16:33] @ Quit: notbrien: Quit: notbrien
[2010/07/25 21:55:51] @ Quit: rcrowley: Quit: rcrowley
[2010/07/25 23:31:39] @ kubicek joined channel #puppet-dev

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