*** salmon_ has quit IRC | 01:00 | |
*** tzn has joined #openstack-solar | 06:47 | |
*** tzn has quit IRC | 06:48 | |
*** dshulyak has joined #openstack-solar | 08:14 | |
openstackgerrit | Dmitry Shulyak proposed openstack/solar: Rework staging procedure to support both implicit and explicit stages https://review.openstack.org/291675 | 08:28 |
---|---|---|
*** salmon_ has joined #openstack-solar | 08:51 | |
openstackgerrit | Dmitry Shulyak proposed openstack/solar: Rework staging procedure to support both implicit and explicit stages https://review.openstack.org/291675 | 09:35 |
pigmej | dshulyak: you're working hard :) | 09:36 |
dshulyak | :) actually i trying to fix pep | 09:36 |
pigmej | ;D | 09:37 |
pigmej | yapf, autopep8 ?:D | 09:37 |
dshulyak | no, not because of formatters, just my errors | 09:58 |
pigmej | ah :) | 09:59 |
pigmej | dshulyak: then http://make-everything-ok.com/ usually works :) | 09:59 |
dshulyak | https://github.com/Mirantis/f2s/commit/9d40ed5dee56598ceaacc3b97c1396c107708411 | 10:04 |
pigmej | dshulyak: what's the relation between LogItem and HistoryItem? | 10:11 |
pigmej | you just renamed it? | 10:11 |
dshulyak | no | 10:11 |
dshulyak | previously this items were stored in same bucket | 10:11 |
dshulyak | and i splitted them because i need to use tags as an index, and at the same time separate history from staged log | 10:12 |
pigmej | ah ok I see | 10:12 |
pigmej | can you elaborate more about: "Important to note that on solar ch stage - there will be no guessing of | 10:13 |
pigmej | action done anymore, and it leads to several problems with staging childs | 10:13 |
pigmej | and reverts - which will be addressed in next patches" | 10:13 |
dshulyak | it 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/blah | 10:15 |
dshulyak | changed | 10:17 |
openstackgerrit | Dmitry Shulyak proposed openstack/solar: Rework staging procedure to support both implicit and explicit stages https://review.openstack.org/291675 | 10:17 |
pigmej | dshulyak: Custom siblings resolved for LogItem will ensure that there is only | 10:21 |
pigmej | one resource action is staged. | 10:21 |
pigmej | does it mean that riak example will not work properly? | 10:21 |
dshulyak | resource action - resource.action pair, there is no way to stage riak.run 2 times, but all other things are working as before | 10:22 |
pigmej | ah ok | 10:23 |
dshulyak | actually it wasnt possible to stage riak.run 2 times even before | 10:23 |
pigmej | yup | 10:23 |
pigmej | this PR looks interesting ;) | 10:24 |
*** dshulyak has quit IRC | 11:38 | |
*** dshulyak has joined #openstack-solar | 11:55 | |
*** openstackgerrit has quit IRC | 12:48 | |
*** openstackgerrit has joined #openstack-solar | 12:48 | |
dshulyak | pigmej: are u around? i have some weird problem with dblayer model - http://paste.openstack.org/show/491096/ | 13:17 |
dshulyak | the last one doesnt work | 13:17 |
dshulyak | something happens during creation.. | 13:17 |
dshulyak | ok, it is the DBLayerProxy | 13:19 |
dshulyak | can we change L32 there? why it takes hash(id(wrapper)) ? | 13:20 |
pigmej | dshulyak: now | 13:51 |
pigmej | so dshulyak what's the problem? | 13:53 |
dshulyak | :) | 13:53 |
dshulyak | ok, i will upload patch | 13:53 |
pigmej | but be carefull to not mess that __hash__ | 13:54 |
pigmej | and also remember that we override __hash__ in model | 13:54 |
pigmej | so that's why I used id there | 13:54 |
dshulyak | exactly i need it work the way it is in the model | 13:56 |
dshulyak | not hash(id( | 13:56 |
openstackgerrit | Dmitry Shulyak proposed openstack/solar: WIP Refactor graph module and usage in scheduler https://review.openstack.org/294605 | 13:58 |
dshulyak | pigmej: what is the reason of id here https://review.openstack.org/#/c/294605/1/solar/dblayer/proxy.py ? | 13:59 |
pigmej | because you need several objects with the same key | 14:01 |
pigmej | I 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 |
pigmej | that's why there is this *id* | 14:02 |
dshulyak | ok, i understand, but it is weird for other clients of dbmodels | 14:03 |
pigmej | also there is `refs[wrapped.key].add(self)` in __init__ | 14:03 |
pigmej | you mean? | 14:03 |
dshulyak | hm, btw why someone need more than 1 object with same key? | 14:04 |
pigmej | and there situation is tricky.. | 14:04 |
pigmej | you may not need it directly, but you can use it by accident when loading stuff etc | 14:04 |
pigmej | the purpose of this class is to track *all* instances with the same keys | 14:05 |
pigmej | and count their number | 14:05 |
dshulyak | i am missing the point of doing this | 14:05 |
pigmej | yeah | 14:05 |
pigmej | basically, it's because of cache | 14:05 |
pigmej | and because of *not keeping* all objects alive | 14:05 |
pigmej | this proxy class ensures that as long as you *may* need an object, it will exists | 14:06 |
dshulyak | basically what i wanted is to use Task instances directly in networkx graph | 14:06 |
pigmej | in the same time, all internal usages are also preserved | 14:06 |
dshulyak | https://review.openstack.org/#/c/294605/1/solar/orchestration/graph.py | 14:06 |
pigmej | generally I think you should use that proxied stuff, not directly | 14:06 |
dshulyak | but i cant with this DbProxy stuff | 14:07 |
dshulyak | because it messes up with model hash function | 14:07 |
pigmej | ah | 14:07 |
pigmej | hmm | 14:07 |
pigmej | ok I got your point | 14:07 |
pigmej | can't you use that proxy.__wrapped__ ? | 14:07 |
dshulyak | networkx graph is using nested dicts to represent nodes and edges | 14:07 |
pigmej | that __wrapped__ is original and "singleton" like object, only one can exists | 14:08 |
pigmej | while the idea of this proxy is to "hide" that singleton to check what is needed, what is not | 14:08 |
pigmej | but hmm | 14:09 |
dshulyak | i could use it.. but it will be pretty weird | 14:09 |
pigmej | but maybe we can use __hash__ as you need | 14:09 |
pigmej | and just change refs[wrapped.key].add(self) | 14:09 |
pigmej | to something like refs[wrapped.key].add(self.__super_unique_stuff()) | 14:09 |
pigmej | or something | 14:09 |
pigmej | because I'm now not sure where this __hash__ with id is required | 14:10 |
dshulyak | super_unique_stuff sounds like id :) | 14:10 |
pigmej | yeah | 14:11 |
pigmej | I just wonder where exactly is this __hash__ used... | 14:11 |
pigmej | if it's only for that internal set or somewhere else too | 14:11 |
pigmej | actually it should be used only internally in cache | 14:12 |
pigmej | ok should work dshulyak after moving id from __hash__ to this init stuff | 14:13 |
pigmej | it may be a bit tricky for one in code then... but hmm | 14:14 |
pigmej | because 2 instances will have the same hash... | 14:14 |
pigmej | but they will map to the same object | 14:15 |
pigmej | so probably not a big deal | 14:15 |
pigmej | dshulyak: sounds ok? | 14:17 |
dshulyak | yep, thanks | 14:18 |
pigmej | I have somewhere script that checks that cache behaviour on bigger envs | 14:28 |
dshulyak | it would be good to put such things in util directory | 14:52 |
pigmej | yeah | 14:52 |
pigmej | I probably named it like 'dupa1.py' | 14:52 |
dshulyak | :) | 14:54 |
pigmej | dshulyak: works? | 15:31 |
dshulyak | pigmej: i was working on other things, but no :) it dosnt work | 16:01 |
dshulyak | TypeError: cannot create weak reference to 'int' object | 16:01 |
pigmej | :| | 16:02 |
dshulyak | maybe WeakSet doesnt need hash at all? | 16:02 |
pigmej | it does | 16:02 |
pigmej | but how did you pass int there? | 16:02 |
openstackgerrit | Dmitry Shulyak proposed openstack/solar: WIP Refactor graph module and usage in scheduler https://review.openstack.org/294605 | 16:02 |
dshulyak | i tried - id(self) but it doesnt make sense i guess | 16:03 |
pigmej | ah yeah... | 16:03 |
pigmej | I forgot that it has to be weakref stuff.... | 16:04 |
pigmej | shit | 16:04 |
pigmej | hmm | 16:07 |
dshulyak | can we use WeakValueDictionary instead of Set there? | 16:17 |
dshulyak | refs[wrapped.key][id(wrapped)] = wrapped ? | 16:18 |
pigmej | dshulyak: hmm | 16:20 |
pigmej | we could | 16:20 |
pigmej | yeah should work | 16:21 |
pigmej | because 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 False | 16:22 |
pigmej | and it's ok with dict too :) | 16:22 |
pigmej | (is_deletable function in lfu_cache.py:74) | 16:22 |
*** dshulyak has quit IRC | 16:36 | |
openstackgerrit | Jedrzej Nowak proposed openstack/solar: Fix repo.iter_contents after recent changes in Repository module https://review.openstack.org/294722 | 17:07 |
pigmej | salmon_: please merge this, I fixed bug that Maciej introduced some time ago... :) | 17:08 |
*** dshulyak has joined #openstack-solar | 17:25 | |
*** angdraug has joined #openstack-solar | 17:25 | |
*** dshulyak has quit IRC | 17:53 | |
*** nihilifer has quit IRC | 20:52 | |
*** nihilifer has joined #openstack-solar | 20:53 | |
salmon_ | pigmej: yeah, I fixed it locally :) | 21:06 |
pigmej | ;D | 21:06 |
openstackgerrit | Merged openstack/solar: Fix repo.iter_contents after recent changes in Repository module https://review.openstack.org/294722 | 21:11 |
*** txt23 has joined #openstack-solar | 22:04 | |
*** txt23 has left #openstack-solar | 22:04 | |
*** salmon_ has quit IRC | 22:09 | |
*** salmon_ has joined #openstack-solar | 22:32 | |
*** angdraug has quit IRC | 23:07 |
Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!