Sunday, 2016-03-27

*** gampel1 has joined #openstack-smaug05:50
openstackgerritzengchen proposed openstack/smaug: Implement time trigger with Eventlet  https://review.openstack.org/29688005:52
chenzengyuval:if you are there, please look at my new version of timetrigger. i hope for your comments. thank you very much.05:57
chenzengsaggi:if you have time, please look at my  new version of timetrigger. thanks.05:57
openstackgerritzengchen proposed openstack/smaug: Implement time trigger with Eventlet  https://review.openstack.org/29688006:22
*** yuval has joined #openstack-smaug06:36
*** CrayZee has quit IRC08:57
*** CrayZee has joined #openstack-smaug09:14
openstackgerritMerged openstack/smaug: Add dashboard to Local.conf  https://review.openstack.org/29691810:03
*** CrayZee has quit IRC10:07
openstackgerritMerged openstack/smaug: Protection service basic design doc  https://review.openstack.org/26145510:16
openstackgerritMerged openstack/smaug: Proposed Smaug API v1.0  https://review.openstack.org/24475610:18
*** saggi has quit IRC11:58
chenzengyuval:are you there? how are you?12:02
chenzengyuval:i have seen your comments, thanks.12:03
chenzengyuval:i have left comments for you on review website. if you are on line, please ping me.12:26
chenzengyuval:thank you very much.12:26
chenzengping yuval12:42
yuvalchenzeng: hey13:46
chenzengyuval:hi, how are you?13:47
yuvalchenzeng: very well, and you?13:47
chenzengyuval:fine, especially see your comments.13:48
chenzengyuval:i had replied you on review website, do you see it.13:49
yuvalchenzeng: yes, a few questions13:49
*** saggi has joined #openstack-smaug13:49
chenzengyuval: i think we can reach an agreement today.13:49
yuvalchenzeng: one minute and i'm with you13:49
chenzengyuval:ok.13:49
openstackgerritEran Gampel proposed openstack/smaug: Basic design doc for API Service  https://review.openstack.org/26633814:02
yuvalchenzeng: ping14:06
chenzengyuval:yes14:08
yuvalregarding canceling the greenthread after every add/remove operations: it is ok to cancel the thread and reschedule when we change the trigger recurrence14:08
yuvalbut there is no need to cancel the green thread when we iterate through operations and send them to executor14:09
*** gampel1 has quit IRC14:12
yuvalsecond, we can definetly use loopingcall, we can definetly use the DynamicLoopingCall for the TimeTrigger14:12
yuvalchenzeng: lets go over it one by one14:15
chenzengok14:15
yuvalTimeTrigger includes a variable which contains a DynamicLoopingCall14:16
chenzengi understand you second. and i have updated codes. but i don't want to use it derectly.14:16
yuvalthere is no problem in using it directly14:17
chenzengi don't want its additional functions, like make statistic the run time on every loop, and event.14:18
chenzengi will send the codes right now, you can look at it. if you have problem, we can go on.14:18
chenzengregarding the first14:19
chenzengi don't understand.14:19
yuvalthe first one is irrelevant if we use loopingcall14:19
chenzengbut you agree with cancel the thread.14:20
chenzengi don't understand.14:20
yuvallets speak only about loopingcall14:20
yuvalwhat is the problem with it?14:20
chenzengi don't want its additional functions, like make statistic the run time on every loop, and event.14:21
chenzengi am worry about whether the greenthread can schedule on time.14:22
yuvalmaybe there are functions that you don't need, that's ok. there is no sense in writing our own loopingcall when there is already one14:22
openstackgerritMerged openstack/smaug: Basic design doc for API Service  https://review.openstack.org/26633814:23
chenzengyuval:sorry, fogive my obstination.14:26
chenzengregarding the first one.14:27
yuvaldid you understand what I was trying to say regarding the first one?14:27
chenzengi use the copy of operation_ids and trigger_property to avoid use the lock.14:27
chenzengsorry, not quite understand.14:28
yuvalok14:28
yuvalin case we change the time trigger property, we must restart the greenthread, you did that great14:28
yuvalbut when we add or remove operation_id from the set, there is no need to restart it14:29
chenzengagree14:29
yuvalwhen we start to iterate the oepration_id set, we can iterate a copy of it14:29
yuvalcopy it just before we iterate it14:29
yuvalthis way, we don't need to restart the greenthread everytime we add/remove operation14:30
chenzengok, understand.14:30
yuvalgreat14:30
chenzengone question.14:30
chenzengif process as you said. the race condition is exist. how about add/move operation when you copy them?14:31
chenzengthe add/move and copy can happen at the same time.14:32
chenzengyuval:?14:34
yuvalit can't happen at the same time, as eventlet's greenthreads don't work this way14:34
yuvalgreenthreads make context switch when sleep/io is performed14:35
yuval(and even if it was a problem, an add/remove could happen in the same place you did the copy)14:35
chenzengyes, this is the critical problem.14:35
yuvalbut this issue doesn't happen with eventlet14:36
chenzengtoday, i have maked a test to check whether the rpc and timetrigger's greenthreads are in one thread. but i have no result.14:37
chenzengi did the test like this way.14:38
chenzengfirst, i write a log in rpc function, like that:def do_test(self, context):14:39
chenzeng        LOG.debug("start do_test, thead_name = %s", threading.current_thread().name)14:39
chenzeng        LOG.debug("start do_test, thead_name = %s", threading.current_thread().ident)14:39
chenzeng        eventlet_test.do_test()14:39
chenzengthen the  eventlet_test.do_test() create a greenthread, like that:def _do_test():14:40
chenzeng    for i in range(20):14:40
chenzeng        LOG.debug("eventlet do_test, i = %(i)d, thead_name = %(name)s, ident=%(ident)d",14:40
chenzeng            {'i':i, 'name': threading.current_thread().name,14:40
chenzeng             'ident': threading.current_thread().ident})14:40
chenzeng        eventlet.sleep(1)14:40
chenzengdef do_test():14:40
chenzeng    eventlet.spawn_after(1, _do_test)14:40
yuvalchenzeng: let me look on it14:45
chenzengthe result like that: start do_test, thead_name = MainThread, start do_test, thead_name = 13986048075142414:46
chenzeng eventlet do_test, i = 0, thead_name = GreenThread-5, ident=13986030323252814:46
chenzengi am not sure whether they are in the same thread.14:47
chenzengbecause the thread name and ident is not same.14:47
chenzengyuval:?14:50
openstackgerritzengchen proposed openstack/smaug: Implement time trigger with Eventlet  https://review.openstack.org/29688014:51
yuvalchenzeng: im looking into messaging14:51
yuvalchenzeng: (rpc)14:51
chenzengok, thanks.14:51
yuvalchenzeng: well14:57
yuvalchenzeng: if you'll look in smaug/rpc.py14:57
yuvalchenzeng: you can see that in get_server, the executor is eventlet14:58
chenzengyes14:58
chenzengi know14:58
*** chenzeng has quit IRC15:03
*** chenying has quit IRC15:03
*** x00350071 has quit IRC15:03
*** yuval has quit IRC15:03
*** zhonghua-lee has quit IRC15:04
*** chenying has joined #openstack-smaug15:11
*** zhonghua-lee has joined #openstack-smaug15:11
*** c00281451 has joined #openstack-smaug15:11
*** x00350071 has joined #openstack-smaug15:11
*** dell__ has joined #openstack-smaug15:22
dell__yuval:sorry, my network was lost.15:23
*** dell__ is now known as chenzeng15:23
chenzengyuval:can you send your message to me.15:23
chenzengyuval:i am not sure whether the thread of rpc and the thread of timetrigger's greenthread are the same. are there any ways to verify it.15:30
chenzengi will go to sleep. thanks yuval.15:31
*** chenzeng has quit IRC15:31
*** chenzeng has joined #openstack-smaug15:52
chenzengi can communicate with yours on my phone . great15:55
*** chenzeng has quit IRC15:56
*** x00350071 has quit IRC16:30
*** x00350071 has joined #openstack-smaug16:31
*** yinwei_computer has joined #openstack-smaug19:34
openstackgerritSaggi Mizrahi proposed openstack/smaug: Add operation log endpoints to API document  https://review.openstack.org/29806020:17
*** chenying has quit IRC20:57
*** chenying has joined #openstack-smaug20:58
*** x00350071 has quit IRC21:48
*** x00350071 has joined #openstack-smaug21:49

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