Thursday, 2015-12-10

*** Qiming has quit IRC00:24
*** lvdongbing has joined #senlin00:35
*** Qiming has joined #senlin01:07
*** yuanying_ has joined #senlin01:09
*** yuanying_ has quit IRC01:09
*** yuanying has quit IRC01:11
*** zhenguo has joined #senlin01:13
*** yuanying has joined #senlin01:23
*** Yanyanhu has joined #senlin01:26
Yanyanhuhi, Qiming, about the read_committed isolation_level is not allowed in sqlite, I think I can refer to this patch in mistral to make a workaround for unit test01:40
Yanyanhuhttps://review.openstack.org/#/c/253819/17/mistral/db/sqlalchemy/base.py01:40
Yanyanhubut the code could become ugly01:41
openstackgerritQiming Teng proposed openstack/senlin: Improve logging in functional testings  https://review.openstack.org/25527301:44
Qimingyes, it will be pretty ugly01:44
QimingI'm thinking about this01:46
QimingI'm a little worried about the MutableList itself01:48
*** Liuqing has joined #senlin01:53
*** zhenguo has quit IRC01:54
openstackgerritQiming Teng proposed openstack/senlin: Fix MutableList implementation  https://review.openstack.org/25526701:54
*** zhenguo has joined #senlin01:55
openstackgerritQiming Teng proposed openstack/senlin: Fix MutableList implementation  https://review.openstack.org/25526701:55
*** Qiming has quit IRC01:56
*** Qiming has joined #senlin01:56
*** elynn_ has joined #senlin02:00
*** elynn__ has joined #senlin02:05
*** elynn_ has quit IRC02:05
*** Liuqing has quit IRC02:46
Yanyanhuhi, Qiming, just saw you comment here and gave some reply https://review.openstack.org/#/c/252231/13/senlin/db/sqlalchemy/api.py02:54
Yanyanhuso setting the isolation level of transactions to add action dependency means when these transactions are in progress, other transactions to delete dependency can still read and commit the action record02:56
QimingI think this is dangerous02:56
Qimingin db theory, you are not supposed to do this asymmetrically02:57
Yanyanhuok. Just feel in our case, add_action_dependency transaction doesn't need so strong consistency protection as del_action_dependency transaction.02:58
Yanyanhuso weaken its isolation level02:59
Qimingif you want to lower the level, do it to all dependenchy modifications03:00
Qimingdatabase doesn't care about your semantics03:00
Yanyanhuhmm, but del_action_dependency do need locking read to ensure consistency03:01
Yanyanhuso setting read_committed isolation level to all transactions can avoid concurrency issue03:01
Yanyanhus/can/can't03:01
Qimingthen add_action_dependency is the same03:01
QimingI'm stuck by this logic:03:02
Qiming 74         def release(thread, action_id):03:02
Qiming 75             '''Callback function that will be passed to GreenThread.link().'''03:02
Qiming 76             # Remove action thread from thread list03:02
Qiming 77             self.workers.pop(action_id)03:02
Qiming 78             action = action_mod.Action.load(self.db_session, action_id)03:02
Qiming 79             # This is for actions with RETRY03:02
Qiming 80             if action.status == action.READY:03:02
Qiming 81                 dispatcher.start_action(action_id=action_id)03:02
Qimingin engine/scheduler03:02
Yanyanhuthere are some errors here?03:03
QimingInvalidRequestError: This session is in 'prepared' state; no further SQL can be emitted within this transaction.03:03
Qimingthat is the error message03:04
Qimingbut the real question is03:04
Qimingwhy we are doing a start_action inside a release?03:04
Qimingand we are deserializing an action object for this task03:04
*** Liuqing has joined #senlin03:05
Qiminganyway, I'm commenting out line 78-8103:05
Yanyanhuwhat you mean by 'doing a start_action inside a release'? I think it's for action retry cases03:06
Yanyanhuline 81 will send a msg to scheduler to make it schedule this action again03:06
Qimingwe already have a scheduler retry03:07
Qimingwhen the action is READY, it will be eventually rescheduled03:07
Yanyanhubut I think this is the code make it happen?03:08
Qimingwe are currently creating a race condition inside the scheduler03:08
Qimingno ...03:08
Qimingit is wrong03:08
Yanyanhusince currently, an action will be scheduled at the firsttime it is dispatched03:09
Qimingbut it is not supposed to do a start inside a release03:09
Yanyanhuoh, you mean this logic should be put into other place03:09
Qiming88             action = db_api.action_acquire_1st_ready(self.db_session,03:09
Qiming 89                                                      worker_id,03:09
Qiming 90                                                      timestamp)03:09
Qimingwe will be relying on this to do real scheduling03:10
Yanyanhusure03:10
Yanyanhuthis is the right way03:10
Yanyanhubut in as of now, we haven't used it yet03:11
Qimingthe reschedule() function should do this, it is currently a useless function03:11
Qimingit is doing nothing more than a sleep()03:12
Yanyanhuyes, it has never been used yet03:12
Qimingwe are doing things wrong, for the fork-join case03:13
Qimingthe line 78-81 is creating a race condition03:13
Qiminghowever, we are doing busy-waiting in _wait_for_dependents()03:13
Qimingthere is no retry logic there03:14
Yanyanhuyes03:14
Yanyanhuit is not a RESCHEDULE03:14
Yanyanhujust a wait now03:14
Qimingyes, so  there are conflicts03:15
QimingI'm commenting out those logics and doing functional test again03:15
Qimingso far so good03:15
Yanyanhuconflicts between this wait and the retry logic in line79-81?03:15
Qimingyes03:15
Yanyanhuyes, sure, since logic 79-81 will only take effect when an action TERMINATED with ready status03:16
Qiminglet's make RETRY logic a little bit smarter03:16
Yanyanhubut in current code, it won't happen I think03:16
Yanyanhusure03:16
Yanyanhuthis is the right thing to do03:16
Qiminglet's see what happens03:16
Yanyanhuok03:16
Qimingthere are still failures, maybe caused by other defects03:17
Yanyanhuabout the isolation_level issue, I think we don't need to lock the record when starting add_action_dependency transaction03:17
Qimingstill investigating03:17
Qimingdon't get you03:18
YanyanhuI mean if a del_action_dependency transaction read and commit to a record that has been read by another add_action_dependency transaction, no error will happen03:19
Qimingwhat do you mean by lock?03:19
*** yuanying has quit IRC03:19
QimingI think these are separate issues at different layers03:20
Yanyanhulock means something like   SELECT ... LOCK IN SHARE MODE03:20
Yanyanhujust locking read03:20
Qimingfaint03:20
QimingI am not reading the SQL statement03:20
Qimingyou are introducing another layer of logic into the discussion03:21
Yanyanhuoh03:21
Yanyanhusure, this is not about the reschedule issue03:21
*** Qiming has quit IRC03:28
*** Qiming has joined #senlin03:29
QimingYanyanhu, can you rebase https://review.openstack.org/#/c/255077/ on to master?03:30
Qimingit doesn't make sense to base it on db sync03:31
Qimingand also the webhook rework one, onto master03:32
*** yuanying has joined #senlin03:37
*** xuhaiwei has quit IRC03:38
*** yuanying has quit IRC04:02
*** yuanying has joined #senlin04:06
*** elynn__ has quit IRC04:12
Yanyanhuhi, Qiming, will remove the dependency of this patch https://review.openstack.org/25507704:18
openstackgerritMerged openstack/senlin: Improve logging in functional testings  https://review.openstack.org/25527304:34
openstackgerritYanyan Hu proposed openstack/senlin: Pework functional tests of cluster_list and node_list  https://review.openstack.org/25507704:37
openstackgerritQiming Teng proposed openstack/senlin: Remove default handling for 'RETRY' actions  https://review.openstack.org/25566804:38
*** xuhaiwei has joined #senlin04:40
*** elynn___ has joined #senlin04:44
openstackgerritMerged openstack/senlin: Shorten the event ID in log output for reability  https://review.openstack.org/25527604:45
Qiminghi, guys04:49
openstackgerritMerged openstack/senlin: Pework functional tests of cluster_list and node_list  https://review.openstack.org/25507704:49
QimingSenlin API doc is online!04:49
Qiminghttp://developer.openstack.org/api-ref-clustering-v1.html04:49
elynn___cool!!04:50
openstackgerritQiming Teng proposed openstack/senlin: Fix MutableList implementation  https://review.openstack.org/25526704:51
Yanyanhugreat!04:53
*** pratikmallya has joined #senlin05:00
openstackgerritQiming Teng proposed openstack/senlin: Remove local copy of api doc  https://review.openstack.org/25567405:03
*** Qiming has quit IRC05:08
xuhaiweifinally it comes05:30
*** Qiming has joined #senlin05:31
lixinhuiGreat!!05:40
openstackgerritMerged openstack/senlin: Remove local copy of api doc  https://review.openstack.org/25567405:41
*** Liuqing has quit IRC05:43
*** Liuqing has joined #senlin05:44
*** Yanyanhu has quit IRC05:46
*** Yanyanhu has joined #senlin05:47
openstackgerritQiming Teng proposed openstack/senlin: Fix message in developer doc linking to API  https://review.openstack.org/25568105:56
*** pratikmallya has quit IRC06:03
*** Qiming has quit IRC06:08
*** Yanyanhu has quit IRC06:43
*** lixinhui_ has joined #senlin07:16
*** lixinhui has quit IRC07:17
*** shu-mutou has quit IRC07:22
*** gongysh_ has joined #senlin07:23
openstackgerritMerged openstack/senlin: Fix message in developer doc linking to API  https://review.openstack.org/25568107:34
openstackgerritlvdongbing proposed openstack/senlin: Revise 'Heat' to 'Senlin' in doc/docbkx/README.rst  https://review.openstack.org/25570307:37
openstackgerritMerged openstack/senlin: Updated from global requirements  https://review.openstack.org/25556407:55
*** lixinhui_ has quit IRC08:23
openstackgerritxu-haiwei proposed openstack/python-senlinclient: Add test case for v1/shell.py part2  https://review.openstack.org/25179808:26
*** yuanying has quit IRC09:10
openstackgerritjunxu proposed openstack/senlin: Add block_device_mapping_v2 support for 'os.nova.server' profile.  https://review.openstack.org/25575509:22
*** openstackgerrit has quit IRC09:32
*** openstackgerrit has joined #senlin09:33
*** lvdongbing has quit IRC09:49
*** zhenguo has quit IRC10:06
*** Liuqing has quit IRC10:19
*** lixinhui has joined #senlin10:25
*** elynn___ has quit IRC10:29
*** Liuqing has joined #senlin10:42
*** elynn___ has joined #senlin12:34
*** elynn___ has quit IRC12:36
*** elynn has joined #senlin12:36
*** openstackgerrit has quit IRC12:47
*** openstackgerrit has joined #senlin12:48
*** Qiming has joined #senlin13:03
*** pratikmallya has joined #senlin13:21
openstackgerritMerged openstack/senlin: Revise 'Heat' to 'Senlin' in doc/docbkx/README.rst  https://review.openstack.org/25570313:31
*** openstackstatus has quit IRC13:57
openstackgerritMerged openstack/senlin: Make webhook-trigger return a location header  https://review.openstack.org/25514214:01
openstackgerritMerged openstack/senlin: Remove default handling for 'RETRY' actions  https://review.openstack.org/25566814:28
*** lixinhui has quit IRC14:34
openstackgerritQiming Teng proposed openstack/senlin: Fix action status setting logic  https://review.openstack.org/25592515:05
*** pratikmallya has quit IRC15:19
openstackgerritQiming Teng proposed openstack/senlin: Fix MutableList implementation  https://review.openstack.org/25526715:19
*** elynn has quit IRC15:23
*** pratikmallya has joined #senlin15:54
*** pratikma_ has joined #senlin15:57
*** pratikmallya has quit IRC16:00
*** Qiming has quit IRC16:03
*** openstackstatus has joined #senlin17:38
*** ChanServ sets mode: +v openstackstatus17:38
openstackgerritLiuqing Jing proposed openstack/senlin: Fix typo  https://review.openstack.org/25601417:45
*** Liuqing has quit IRC17:51
*** pratikma_ has quit IRC17:57
*** pratikmallya has joined #senlin18:41
*** pratikmallya has quit IRC18:42
*** pratikmallya has joined #senlin18:43
*** pratikma_ has joined #senlin21:32
*** pratikmallya has quit IRC21:33
*** pratikmallya has joined #senlin21:34
*** pratikma_ has quit IRC21:37
*** openstackstatus has quit IRC23:01
*** pratikmallya has quit IRC23:03
*** yuanying has joined #senlin23:18
*** Qiming has joined #senlin23:35

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