Friday, 2016-03-18

*** salmon_ has quit IRC01:00
*** tzn has joined #openstack-solar06:47
*** tzn has quit IRC06:48
*** dshulyak has joined #openstack-solar08:14
openstackgerritDmitry Shulyak proposed openstack/solar: Rework staging procedure to support both implicit and explicit stages  https://review.openstack.org/29167508:28
*** salmon_ has joined #openstack-solar08:51
openstackgerritDmitry Shulyak proposed openstack/solar: Rework staging procedure to support both implicit and explicit stages  https://review.openstack.org/29167509:35
pigmejdshulyak: you're working hard :)09:36
dshulyak:) actually i trying to fix pep09:36
pigmej;D09:37
pigmejyapf, autopep8 ?:D09:37
dshulyakno, not because of formatters, just my errors09:58
pigmejah :)09:59
pigmejdshulyak: then http://make-everything-ok.com/ usually works :)09:59
dshulyakhttps://github.com/Mirantis/f2s/commit/9d40ed5dee56598ceaacc3b97c1396c10770841110:04
pigmejdshulyak: what's the relation between LogItem and HistoryItem?10:11
pigmejyou just renamed it?10:11
dshulyakno10:11
dshulyakpreviously this items were stored in same bucket10:11
dshulyakand i splitted them because i need to use tags as an index, and at the same time separate history from staged log10:12
pigmejah ok I see10:12
pigmejcan you elaborate more about: "Important to note that on solar ch stage - there will be no guessing of10:13
pigmejaction done anymore, and it leads to several problems with staging childs10:13
pigmejand reverts - which will be addressed in next patches"10:13
dshulyakit is outdated a bit.. i will need to reword it, reverts are working for actions like creation/update/removal - but not for custom actions, like restart/blah10:15
dshulyakchanged10:17
openstackgerritDmitry Shulyak proposed openstack/solar: Rework staging procedure to support both implicit and explicit stages  https://review.openstack.org/29167510:17
pigmejdshulyak:  Custom siblings resolved for LogItem will ensure that there is only10:21
pigmej one resource action is staged.10:21
pigmejdoes it mean that riak example will not work properly?10:21
dshulyakresource action - resource.action pair, there is no way to stage riak.run 2 times, but all other things are working as before10:22
pigmejah ok10:23
dshulyakactually it wasnt possible to stage riak.run 2 times even before10:23
pigmejyup10:23
pigmejthis PR looks interesting ;)10:24
*** dshulyak has quit IRC11:38
*** dshulyak has joined #openstack-solar11:55
*** openstackgerrit has quit IRC12:48
*** openstackgerrit has joined #openstack-solar12:48
dshulyakpigmej: are u around? i have some weird problem with dblayer model - http://paste.openstack.org/show/491096/13:17
dshulyakthe last one doesnt work13:17
dshulyaksomething happens during creation..13:17
dshulyakok, it is the DBLayerProxy13:19
dshulyakcan we change L32 there? why it takes hash(id(wrapper)) ?13:20
pigmejdshulyak: now13:51
pigmejso dshulyak what's the problem?13:53
dshulyak:)13:53
dshulyakok, i will upload patch13:53
pigmejbut be carefull to not mess that __hash__13:54
pigmejand also remember that we override __hash__ in model13:54
pigmejso that's why I used id there13:54
dshulyakexactly i need it work the way it is in the model13:56
dshulyaknot hash(id(13:56
openstackgerritDmitry Shulyak proposed openstack/solar: WIP Refactor graph module and usage in scheduler  https://review.openstack.org/29460513:58
dshulyakpigmej: what is the reason of id here https://review.openstack.org/#/c/294605/1/solar/dblayer/proxy.py ?13:59
pigmejbecause you need several objects with the same key14:01
pigmejI mean that proxied stuff, when initialized from object with __hash__() == 2 and then __hash__() == 2 (but different instance) *has* to return different __hash__14:02
pigmejthat's why there is this *id*14:02
dshulyakok, i understand, but it is weird for other clients of dbmodels14:03
pigmejalso there is `refs[wrapped.key].add(self)` in __init__14:03
pigmejyou mean?14:03
dshulyakhm, btw why someone need more than 1 object with same key?14:04
pigmejand there situation is tricky..14:04
pigmejyou may not need it directly, but you can use it by accident when loading stuff etc14:04
pigmejthe purpose of this class is to track *all* instances with the same keys14:05
pigmejand count their number14:05
dshulyaki am missing the point of doing this14:05
pigmejyeah14:05
pigmejbasically, it's because of cache14:05
pigmejand because of *not keeping* all objects alive14:05
pigmejthis proxy class ensures that as long as you *may* need an object, it will exists14:06
dshulyakbasically what i wanted is to use Task instances directly in networkx graph14:06
pigmejin the same time, all internal usages are also preserved14:06
dshulyakhttps://review.openstack.org/#/c/294605/1/solar/orchestration/graph.py14:06
pigmejgenerally I think you should use that proxied stuff, not directly14:06
dshulyakbut i cant with this DbProxy stuff14:07
dshulyakbecause it messes up with model hash function14:07
pigmejah14:07
pigmejhmm14:07
pigmejok I got your point14:07
pigmejcan't you use that proxy.__wrapped__ ?14:07
dshulyaknetworkx graph is using nested dicts to represent nodes and edges14:07
pigmejthat __wrapped__ is original and "singleton" like object, only one can exists14:08
pigmejwhile the idea of this proxy is to "hide" that singleton to check what is needed, what is not14:08
pigmejbut hmm14:09
dshulyaki could use it.. but it will be pretty weird14:09
pigmejbut maybe we can use __hash__ as you need14:09
pigmejand just change refs[wrapped.key].add(self)14:09
pigmejto something like refs[wrapped.key].add(self.__super_unique_stuff())14:09
pigmejor something14:09
pigmejbecause I'm now not sure where this __hash__ with id is required14:10
dshulyaksuper_unique_stuff sounds like id :)14:10
pigmejyeah14:11
pigmejI just wonder where exactly is this __hash__ used...14:11
pigmejif it's only for that internal set or somewhere else too14:11
pigmejactually it should be used only internally in cache14:12
pigmejok should work dshulyak after moving id from __hash__  to this init stuff14:13
pigmejit may be a bit tricky for one in code then... but hmm14:14
pigmejbecause 2 instances will have the same hash...14:14
pigmejbut they will map to the same object14:15
pigmejso probably not a big deal14:15
pigmejdshulyak: sounds ok?14:17
dshulyakyep, thanks14:18
pigmejI have somewhere script that checks that cache behaviour on bigger envs14:28
dshulyakit would be good to put such things in util directory14:52
pigmejyeah14:52
pigmejI probably named it like 'dupa1.py'14:52
dshulyak:)14:54
pigmejdshulyak: works?15:31
dshulyakpigmej: i was working on other things, but no :) it dosnt work16:01
dshulyakTypeError: cannot create weak reference to 'int' object16:01
pigmej:|16:02
dshulyakmaybe WeakSet doesnt need hash at all?16:02
pigmejit does16:02
pigmejbut how did you pass int there?16:02
openstackgerritDmitry Shulyak proposed openstack/solar: WIP Refactor graph module and usage in scheduler  https://review.openstack.org/29460516:02
dshulyaki tried - id(self) but it doesnt make sense i guess16:03
pigmejah yeah...16:03
pigmejI forgot that it has to be weakref stuff....16:04
pigmejshit16:04
pigmejhmm16:07
dshulyakcan we use WeakValueDictionary instead of Set there?16:17
dshulyakrefs[wrapped.key][id(wrapped)] = wrapped ?16:18
pigmejdshulyak: hmm16:20
pigmejwe could16:20
pigmejyeah should work16:21
pigmejbecause we just need to check 'if it's empty'16:22
pigmej:)16:22
pigmej        if elem._c.refs[elem.key]:16:22
pigmej            return False16:22
pigmejand it's ok with dict too :)16:22
pigmej(is_deletable function in lfu_cache.py:74)16:22
*** dshulyak has quit IRC16:36
openstackgerritJedrzej Nowak proposed openstack/solar: Fix repo.iter_contents after recent changes in Repository module  https://review.openstack.org/29472217:07
pigmejsalmon_: please merge this, I fixed bug that Maciej introduced some time ago... :)17:08
*** dshulyak has joined #openstack-solar17:25
*** angdraug has joined #openstack-solar17:25
*** dshulyak has quit IRC17:53
*** nihilifer has quit IRC20:52
*** nihilifer has joined #openstack-solar20:53
salmon_pigmej: yeah, I fixed it locally :)21:06
pigmej;D21:06
openstackgerritMerged openstack/solar: Fix repo.iter_contents after recent changes in Repository module  https://review.openstack.org/29472221:11
*** txt23 has joined #openstack-solar22:04
*** txt23 has left #openstack-solar22:04
*** salmon_ has quit IRC22:09
*** salmon_ has joined #openstack-solar22:32
*** angdraug has quit IRC23:07

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