Tuesday, 2016-02-02

openstackgerritzengchen proposed openstack/smaug: implement scheduled_operation_state table of db  https://review.openstack.org/27499503:46
openstackgerritzengchen proposed openstack/smaug: implement scheduled_operation_states table of db  https://review.openstack.org/27499503:55
*** xiangxinyong has joined #openstack-smaug06:07
*** x00350071_ has quit IRC06:09
*** xiangxinyong__ has quit IRC06:10
*** x00350071 has joined #openstack-smaug06:11
*** x00350071 is now known as xinyong06:11
openstackgerritzengchen proposed openstack/smaug: implement scheduled_operation_states table of db  https://review.openstack.org/27499506:19
*** gampel has joined #openstack-smaug06:59
openstackgerritzengchen proposed openstack/smaug: implement scheduled_operation_states table of db  https://review.openstack.org/27499507:13
*** zhonghua-lee has quit IRC07:35
*** xinyong has quit IRC07:35
*** xinyong has joined #openstack-smaug07:35
*** zhonghua-lee has joined #openstack-smaug07:35
openstackgerritzengchen proposed openstack/smaug: implement scheduled_operation_logs table of db  https://review.openstack.org/27505207:39
*** c00281451 has joined #openstack-smaug07:43
openstackgerritzengchen proposed openstack/smaug: implement scheduled_operation_states table of db  https://review.openstack.org/27499507:44
c00281451saggi: if you online, please tell me. thanks.07:49
*** c00281451 is now known as chenzeng07:50
*** gampel1 has joined #openstack-smaug08:00
*** gampel has quit IRC08:00
saggichenzeng: ping08:00
chenzengsaggi:yes.08:01
saggichenzeng: How is it going?08:01
chenzengyesterday, you said you didn't understand the design of timetrigger. what's your question?08:03
chenzengI have submitted the codes of dbs that are scheduled_operation_states and scheduled_operation_logs. you can review them.08:04
*** zhonghua-lee has quit IRC08:04
*** zhonghua-lee has joined #openstack-smaug08:05
saggichenzeng: Yes, I still don't understand why the job store is a member of the trigger.08:09
saggiCould you explain it to me please?08:09
chenzengdo you see the comments I sended you?08:10
saggichenzeng: Do all triggers get the same job store instance?08:11
chenzengno08:12
saggiWhy do they use different job stores?08:12
saggiisn't it just for queueing things?08:12
chenzengbecause different trigger may need diffent jobstore.08:13
chenzengthis jobstore only is used by timetrigger08:13
chenzengbecause this jobstore sorts the jobs in ascending order08:14
saggichenzeng: This is what I don't understand. Why do we need different job stores. What is done differently between different tirggers?08:14
saggiWhy isn't the tirgger responsible for queueing a job. Why do we need the store?08:15
chenzengyes, timetrigger will store its own job by some kind of order, and other trigger will do the same work by its own way.08:17
chenzengin my timetrigger, it has a jobstore which only store the jobs that are binded with a time trigger.08:18
saggiWhy?08:19
saggiAlso why is the job store responsible for execution08:19
saggi?08:19
saggiI'd imagine the trigger will trigger. This will invoker something to get the plan and execute a job in a JobExecutor. The job will periodically store data for consistency and safety through the JobStore.08:20
*** gampel1 has quit IRC08:20
*** gampel has joined #openstack-smaug08:20
chenzengbecause diffent jobstores have diffent way to store the job, timetrigger's jobstore should sort its jobs in order to get due jobs quickly. but other jobs don't need to do this work.08:21
chenzengsorry,  other jobstore may don't need to do this work.08:21
saggiThe thing I don't understand is that theoretically there are infinite jobs. If you say you want a daily backup you have infinite jobs from now until the end of time. This means you shouldn't create the job until it triggers.08:24
saggiSo there isn't a need to even sort them08:24
saggior queue them08:24
saggisince they are created when they need to execute08:24
chenzengmy timetrigger just trigger the job when the time is up. how to known the job's time is up. my design is that check the job's next_run_time every some time, if the time is up, submit the job to the executor and update the next_run_time, then loop.08:30
chenzengyou design is that if the operation's trigger is ready, the trigger will activate the operation, is that? if so, how to design the trigger?08:32
chenzengthe usage of apscheduler is like your design. but internally, it works like mine, because my implementation is from it.08:36
saggiTriggers all have a reference to some JobExecutor. When they *trigger* the push a job to the executor. The executor manages how many things can run at ones. Jobs can add Log lines whenever they want and persist information for recovery.08:36
saggiEach operation is a new job08:37
chenzengyes, my design is like this.08:38
saggiSo what is the job store?08:39
saggiSorry for not understanding08:39
chenzengok, it doesn't matter. i explain it more  distinct.08:41
chenzengfirst, there are 3 objects, which are trigger, executor, operation. operation binds with a *trigger*. just take the *time trigger *for exmaple.08:45
chenzengthe responsibility of trigger is compute the time and submit the operation to executor. executor queues the operation and run them orderly. the OperationManager hoold all kinds of operation class objects. when the executor run the operation, it just invoke the OperationManage's *execute_operation* method.08:49
saggiSounds good08:51
saggiWhen does JobStore come in to play08:51
saggi?08:51
chenzengso, the core question is how does the trigger know when to submit the operation to executor. right?08:51
saggiNo, the question is what is the JobStore class for08:52
saggiAnd why is it different between different triggers08:53
chenzengok, we analyze the question step by step.08:53
chenzengthere are at leat 2 kinds of trigger, timetrigger and eventtrigger, right? these triggers are diffent.08:54
saggiYes08:55
chenzengok,  suppose there are 3 operations which binds with *time trigger*08:56
chenzengmy implementation is that08:56
chenzengwhen create these 3 operations, save them to the DB and register them to my 'TimeTrigger'. 'TimeTrigger' will encapsulate the operation by 'Job' which can computes the next run time of operation, and store the 'Job' in the 'JobStore'.09:00
chenzeng'JobStore' will sort these 3 'Job' objects by its next_run_time in ascending order. then 'TimeTrigger' will get due jobs from 'JobStore' by comparing the next_run_time of operation with now in a loop function.09:03
chenzengif 'TimeTrigger' get the due jobs, send them to the executor and udpate its next_run_time, then send back to 'JobStore' and resort it.09:07
saggiOK, so the job store is the triggers way of storing information between runtimes?09:08
saggibetween restarts09:08
chenzengyes09:09
saggihmmm09:11
saggiHow would it store the information. In the DB?09:11
chenzengno, 'JobStore' just store the 'Job' objects in memory, because the the operation is stored in the DB. we can register the operation again when restarting the operation engine.09:13
chenzengwe don't need to create *Job* of operation when executing it, because the OperationManager can execute the operation by operation type and operation definition.09:14
saggiSo JobStore is just an implementation detail09:17
saggiOK09:17
saggiI think got it09:17
saggiAm I correct?09:17
chenzengyes, you got it. thanks god.09:17
chenzengsorry, i typed very slowly.09:19
xinyongHello saggi09:28
saggixinyong: Hello09:28
xinyongWhich email do you use usually?09:29
xinyongI want to send a email to you about the smaug ui09:30
openstackgerritzengchen proposed openstack/smaug: the field's order of db tables is not same  https://review.openstack.org/27508809:37
*** gampel has quit IRC09:56
*** openstackgerrit has quit IRC10:17
*** openstackgerrit has joined #openstack-smaug10:17
openstackgerrityinwei proposed openstack/smaug: Basic design doc for Protection Service  https://review.openstack.org/26145510:57
*** zengyingzhe has quit IRC11:43
*** gampel has joined #openstack-smaug11:48
*** gampel1 has joined #openstack-smaug11:50
*** gampel has quit IRC11:52
openstackgerrityinwei proposed openstack/smaug: Basic design doc for Protection Service  https://review.openstack.org/26145511:55
*** gampel has joined #openstack-smaug12:06
*** gampel1 has quit IRC12:07
openstackgerritwangliuan proposed openstack/smaug: Implement the basic protection service framework  https://review.openstack.org/26576012:43
*** wangliuan has joined #openstack-smaug13:10
wangliuanhi,saggi13:10
saggiwangliuan: hi13:10
wangliuanI had update yinwei's design doc13:11
wangliuanand my patch13:11
wangliuanI see you review opinion13:11
wangliuanwhich image you mean that is not up to date13:12
wangliuanit's a little late in china,I think I should check it carefully tomorrow .I am glad to have your review13:18
wangliuanThank you very much13:18
*** go has joined #openstack-smaug13:56
*** go is now known as Guest1388313:56
*** Guest13883 has quit IRC13:57
*** wanghao_ has joined #openstack-smaug14:47
*** saggi has quit IRC16:06
*** chenzeng has quit IRC16:14
*** chenzeng has joined #openstack-smaug16:15
*** wanghao_ has quit IRC16:57
*** gampel has quit IRC17:30
*** openstackgerrit has quit IRC17:32
*** openstackgerrit has joined #openstack-smaug17:32
*** wanghao has quit IRC19:12
*** yinweiishere has quit IRC19:12
*** yinweiishere has joined #openstack-smaug19:12
*** wanghao has joined #openstack-smaug19:12
*** xiangxinyong_ has joined #openstack-smaug19:24
*** xiangxinyong has quit IRC19:27
*** xiangxinyong_ has quit IRC20:19
*** xiangxinyong_ has joined #openstack-smaug20:19
openstackgerritSaggi Mizrahi proposed openstack/smaug: Proposed Smaug API v1.0  https://review.openstack.org/24475623:49

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