Tuesday, 2016-09-20

*** rajpatel1 has quit IRC00:00
zanebstevebaker: you sure? it looks the same except you stop it before sending the RPC message with template_id=None instead of when you go to write the stack to the DB00:03
*** zhurong has quit IRC00:04
stevebakerzaneb: I thought that was a different case, where the template ID is set but the template has already been deleted00:04
*** jdandrea has quit IRC00:05
zanebstevebaker: ah, I guess that could theoretically happen00:08
stevebakerzaneb: also, this may be ready00:09
stevebakerhttps://review.openstack.org/#/c/369827/00:09
*** Zer0Byte__ has joined #heat00:12
*** jamielennox is now known as jamielennox|away00:14
*** jdandrea has joined #heat00:14
*** sshnaidm has quit IRC00:19
*** Zer0Byte__ has quit IRC00:23
openstackgerritOpenStack Proposal Bot proposed openstack/heat: Updated from global requirements  https://review.openstack.org/37109700:25
*** vijendar has joined #heat00:28
*** vijendar has quit IRC00:32
*** adrian_otto has quit IRC00:33
openstackgerritMerged openstack/heat: Raise NotImplementedError instead of NotImplemented  https://review.openstack.org/36773500:39
*** spzala has quit IRC01:02
*** caowei has joined #heat01:02
*** zhurong has joined #heat01:12
*** bana_k has quit IRC01:28
*** zz_dimtruck is now known as dimtruck01:30
*** sshnaidm has joined #heat01:33
*** elynn has joined #heat01:38
*** dimtruck is now known as zz_dimtruck01:40
*** elynn has quit IRC01:43
*** elynn has joined #heat01:43
*** steveg_afk has quit IRC01:46
*** yanyanhu has joined #heat01:47
*** EricGonczer_ has joined #heat01:58
*** sdake has quit IRC02:06
*** sdake has joined #heat02:06
*** sdake has quit IRC02:18
*** jamielennox|away is now known as jamielennox02:20
*** EricGonczer_ has quit IRC02:22
*** zz_dimtruck is now known as dimtruck02:24
*** spzala has joined #heat03:02
*** david-lyle has quit IRC03:03
openstackgerritMerged openstack/heat: Cancel traversal of nested stack  https://review.openstack.org/37012303:03
*** spzala has quit IRC03:07
openstackgerritMerged openstack/heat: Updated from global requirements  https://review.openstack.org/37109703:11
*** tochi has quit IRC03:24
stevebakerCloudformation catches up :) https://aws.amazon.com/blogs/aws/aws-cloudformation-update-yaml-cross-stack-references-simplified-substitution/03:42
*** KanagarajM has joined #heat03:43
*** dimtruck is now known as zz_dimtruck03:47
*** KanagarajM has quit IRC03:48
*** tochi has joined #heat03:51
openstackgerritCrag Wolfe proposed openstack/heat: Do not share sessions between threads  https://review.openstack.org/37280403:59
openstackgerritCrag Wolfe proposed openstack/heat: Trivial refactor of session var in reset_stack_status  https://review.openstack.org/37287403:59
*** jcoufal has quit IRC04:12
*** elynn has quit IRC04:22
*** zhurong has quit IRC04:43
*** KanagarajM has joined #heat04:44
*** sdake has joined #heat04:46
*** elynn has joined #heat04:52
*** jaosorior has joined #heat04:55
*** elynn has quit IRC04:56
*** elynn has joined #heat04:57
*** jaosorior has quit IRC05:09
*** jaosorior has joined #heat05:10
*** akshai has joined #heat05:11
*** mohankumar has joined #heat05:18
*** akshai has quit IRC05:19
*** bnemec has joined #heat05:27
*** zhurong has joined #heat05:35
*** zhurong has quit IRC05:47
*** zhurong has joined #heat05:47
*** elynn_ has joined #heat05:50
*** elynn has quit IRC05:52
*** elynn_ has quit IRC05:54
*** elynn_ has joined #heat05:55
*** ccamacho has quit IRC06:07
*** shardy has joined #heat06:12
openstackgerritMerged openstack/heat: Legacy delete attempt thread cancel before stop  https://review.openstack.org/36982706:13
*** yprokule has joined #heat06:20
*** ccamacho has joined #heat06:24
*** jprovazn has joined #heat06:29
*** elynn_ has quit IRC06:33
*** bana_k has joined #heat06:35
*** elynn has joined #heat06:36
*** elynn has quit IRC06:41
*** elynn has joined #heat06:41
*** prazumovsky has joined #heat07:00
*** bana_k has quit IRC07:04
openstackgerritavnish proposed openstack/heat-templates: modify the home-page info with the developer documentation  https://review.openstack.org/37296207:07
openstackgerritPeter Razumovsky proposed openstack/heat-specs: Fix milestone and new ideas to properties group  https://review.openstack.org/33330407:08
*** chlong has quit IRC07:14
openstackgerritMerged openstack/heat: Add resource OS::Cinder::QoSAssociation  https://review.openstack.org/24971307:15
*** shardy has quit IRC07:19
*** rcernin has joined #heat07:19
*** mohankumar has quit IRC07:29
*** jpich has joined #heat07:33
*** tochi has quit IRC07:38
*** sorantis has joined #heat07:48
*** zhurong has quit IRC07:55
*** zzzeek has quit IRC08:00
*** zzzeek has joined #heat08:00
*** yassine has joined #heat08:08
*** yassine is now known as Guest1924608:09
*** zhurong has joined #heat08:13
*** derekh has joined #heat08:34
openstackgerrithuangtianhua proposed openstack/heat: Return condition functions based on the filter param  https://review.openstack.org/36986008:37
openstackgerritDmitriy Uvarenkov proposed openstack/heat: Improve validation of res limit for nested templates  https://review.openstack.org/36217608:46
*** blues-man has joined #heat08:51
openstackgerrithuangtianhua proposed openstack/heat: Return condition functions based on the filter param  https://review.openstack.org/36986008:52
*** mohankumar has joined #heat08:54
*** yohoffman has quit IRC09:03
*** syjulian has quit IRC09:03
*** xenogear has quit IRC09:04
*** xenogear has joined #heat09:04
*** xenogear has quit IRC09:12
*** code-R has joined #heat09:15
*** yohoffman has joined #heat09:18
*** mohankumar has quit IRC09:20
*** code-R_ has joined #heat09:23
*** code-R has quit IRC09:26
*** xenogear has joined #heat09:29
*** mohankumar has joined #heat09:36
*** syjulian has joined #heat09:37
*** shardy has joined #heat09:52
*** yanyanhu has quit IRC09:53
*** zhurong has quit IRC10:03
*** dave-johnston has joined #heat10:30
*** rwsu has quit IRC10:35
*** mohankumar has quit IRC10:36
*** elynn has quit IRC10:37
*** jaosorior is now known as jaosorior_lunch10:37
*** jaosorior_lunch is now known as jaosorior11:03
*** code-R_ has quit IRC11:06
*** code-R has joined #heat11:11
*** steveg_afk has joined #heat11:26
*** code-R has quit IRC11:31
*** tlashchova has joined #heat11:33
*** spzala has joined #heat11:34
*** caowei has quit IRC11:36
*** code-R has joined #heat11:40
*** dprince has joined #heat11:41
openstackgerritAnant Patil proposed openstack/heat: Re-trigger on update-replace  https://review.openstack.org/37157211:52
*** zhurong has joined #heat11:53
*** EricGonczer_ has joined #heat11:59
*** yprokule_ has joined #heat11:59
openstackgerritAnant Patil proposed openstack/heat: Fix cancel update for nova server with defined port  https://review.openstack.org/30649012:00
*** yprokule has quit IRC12:01
*** yprokule_ is now known as yprokule12:01
*** rwsu has joined #heat12:03
*** ccamacho is now known as ccamacho|lunch12:04
*** EricGonc_ has joined #heat12:09
openstackgerritOleksii Chuprykov proposed openstack/heat: Validate outputs of the stack after its create/update  https://review.openstack.org/37170412:10
*** EricGonczer_ has quit IRC12:11
*** jcoufal has joined #heat12:18
*** shardy is now known as shardy_lunch12:20
*** yassine has joined #heat12:28
*** spzala has quit IRC12:28
*** yassine is now known as Guest5423712:29
*** Guest19246 has quit IRC12:29
*** caowei has joined #heat12:29
*** askb has quit IRC12:30
*** ayoung has quit IRC12:30
*** annegentle has joined #heat12:35
*** jprovazn has quit IRC12:36
*** mohankumar has joined #heat12:39
*** rwsu has quit IRC12:44
*** steveg_afk has quit IRC12:45
*** shardy_lunch is now known as shardy12:50
*** steveg_afk has joined #heat12:55
*** ccamacho|lunch is now known as ccamacho12:56
*** david-lyle has joined #heat12:56
*** vishwanathj has joined #heat12:57
zanebtherve: I think we are in the home stretch :)12:59
thervezaneb, You say that...12:59
*** elynn has joined #heat12:59
therveThat's usually when a patch in neutron-lbaas decides to break us12:59
* zaneb resumes "speak no evil" pose13:01
therveOn the nice side of things, our own merge rate seems to be pretty nice this last couple of days13:01
therveSo we must have merged something among those fixes that did improve the situation13:02
*** rwsu has joined #heat13:03
zanebtherve: I'm pretty sure https://bugs.launchpad.net/heat/+bug/1624538 was responsible for many (most?) of our lock-ups13:03
openstackLaunchpad bug 1624538 in heat "Cancelling completed stack retains lock forever" [High,Fix released] - Assigned to Zane Bitter (zaneb)13:03
zanebalthough the patch didn't merge until yesterday, so that can't be the whole story13:04
therveYeah, and that's convergence only, no?13:04
zanebno, that's non-convergence only13:06
therveAh13:06
zanebananta has made a lot of fixes on the convergence side that have probably helped a lot too13:06
*** vijendar has joined #heat13:07
*** markd__ has joined #heat13:07
*** markd__ has quit IRC13:08
*** KanagarajM has quit IRC13:08
*** jaosorior has quit IRC13:09
*** jaosorior has joined #heat13:10
*** spzala has joined #heat13:11
*** spzala has quit IRC13:11
*** spzala has joined #heat13:11
*** sdake has quit IRC13:17
*** cmartin has joined #heat13:23
*** vijendar has quit IRC13:24
*** tanvirt has joined #heat13:30
*** tanvirt has quit IRC13:30
*** tanvirt has joined #heat13:30
*** dyasny has joined #heat13:31
*** openstackstatus has joined #heat13:35
*** ChanServ sets mode: +v openstackstatus13:35
openstackgerritPeter Razumovsky proposed openstack/heat-specs: Heat template migrate mechanism  https://review.openstack.org/33325913:39
*** rajpatel has joined #heat13:40
-openstackstatus- NOTICE: OpenStack Infra now has a Twitter bot, follow it at https://twitter.com/openstackinfra13:42
*** annegentle has quit IRC13:46
*** sdake has joined #heat13:49
*** jprovazn has joined #heat13:50
*** jasond has joined #heat14:01
*** rajpatel1 has joined #heat14:04
*** rajpatel has quit IRC14:06
*** mohankumar has quit IRC14:08
*** dyasny has quit IRC14:09
*** sdake_ has joined #heat14:09
*** sdake has quit IRC14:11
*** rpothier has joined #heat14:12
openstackgerritOleksii Chuprykov proposed openstack/heat: Validate outputs of the stack after its create/update  https://review.openstack.org/37170414:13
*** ayoung has joined #heat14:15
*** annegentle has joined #heat14:20
*** blomquisg_gone is now known as blomquisg14:20
*** dyasny has joined #heat14:22
*** spedione|AWAY is now known as spedione14:24
*** adrian_otto has joined #heat14:26
*** spotz_zzz is now known as spotz14:27
*** zz_dimtruck is now known as dimtruck14:28
*** rajpatel has joined #heat14:30
openstackgerritPeter Razumovsky proposed openstack/heat: Initial implementation template migrate mechanism  https://review.openstack.org/37015314:31
openstackgerritPeter Razumovsky proposed openstack/heat: Add parameters and outputs template migrate  https://review.openstack.org/37337314:31
openstackgerritPeter Razumovsky proposed openstack/heat: Add resource keys translation in template migrate  https://review.openstack.org/37337414:31
openstackgerritPeter Razumovsky proposed openstack/heat: Add function migration to template migrate  https://review.openstack.org/37337514:31
openstackgerritPeter Razumovsky proposed openstack/heat: Add migrate version to actual HOT template version  https://review.openstack.org/37337614:31
openstackgerritPeter Razumovsky proposed openstack/heat: Add check for unsupported resource to tmpl migrate  https://review.openstack.org/37337714:31
openstackgerritPeter Razumovsky proposed openstack/heat: Initial implementation template migrate mechanism  https://review.openstack.org/37015314:32
*** rajpatel2 has joined #heat14:32
openstackgerritPeter Razumovsky proposed openstack/heat: Add parameters and outputs template migrate  https://review.openstack.org/37337314:32
openstackgerritPeter Razumovsky proposed openstack/heat: Add resource keys translation in template migrate  https://review.openstack.org/37337414:32
openstackgerritPeter Razumovsky proposed openstack/heat: Add function migration to template migrate  https://review.openstack.org/37337514:32
openstackgerritPeter Razumovsky proposed openstack/heat: Add migrate version to actual HOT template version  https://review.openstack.org/37337614:32
openstackgerritPeter Razumovsky proposed openstack/heat: Add check for unsupported resource to tmpl migrate  https://review.openstack.org/37337714:32
*** rajpatel1 has quit IRC14:33
*** spedione is now known as spedione|AWAY14:34
*** EricGonc_ has quit IRC14:34
*** rajpatel has quit IRC14:35
*** EricGonczer_ has joined #heat14:37
*** rajpatel2 has quit IRC14:38
*** dyasny has quit IRC14:39
*** rajpatel has joined #heat14:41
*** dyasny has joined #heat14:41
*** KanagarajM has joined #heat14:44
openstackgerritPeter Razumovsky proposed openstack/heat: Add check for unsupported resource to tmpl migrate  https://review.openstack.org/37337714:47
openstackgerritPeter Razumovsky proposed openstack/heat: Add function migration to template migrate  https://review.openstack.org/37337514:47
openstackgerritPeter Razumovsky proposed openstack/heat: Add migrate version to actual HOT template version  https://review.openstack.org/37337614:47
*** adrian_otto has quit IRC14:48
*** prazumovsky has quit IRC14:51
*** huangtianhua has joined #heat14:52
*** blomquisg is now known as blomquisg_gone14:54
*** randallburt has joined #heat14:54
*** tiantian has quit IRC14:55
*** randallburt1 has joined #heat14:56
*** adrian_otto has joined #heat14:56
*** adrian_otto has quit IRC14:57
*** spedione|AWAY is now known as spedione14:58
*** Drago has joined #heat14:58
*** randallburt has quit IRC14:59
*** KanagarajM has quit IRC14:59
*** KanagarajM has joined #heat15:00
*** rajpatel has quit IRC15:02
*** yprokule_ has joined #heat15:02
*** elynn has quit IRC15:02
*** rajpatel has joined #heat15:04
*** yprokule has quit IRC15:05
*** yprokule_ is now known as yprokule15:05
*** rajpatel1 has joined #heat15:05
*** rajpatel has quit IRC15:08
*** caowei has quit IRC15:10
*** zhurong has quit IRC15:11
*** cmartin has quit IRC15:12
*** sshnaidm is now known as sshnaidm|afk15:18
*** sorantis has quit IRC15:26
*** ramishra has quit IRC15:31
*** akshai has joined #heat15:33
*** jaosorior has quit IRC15:40
openstackgerritZane Bitter proposed openstack/heat: Use pydoc for formatting docstrings  https://review.openstack.org/37343315:42
*** dprince has quit IRC15:42
*** b00tcat has joined #heat15:42
b00tcatcan a comma_delimited_list be set to '' as a default value to indicate an empty array?15:42
*** rajpatel has joined #heat15:45
*** rajpatel1 has quit IRC15:45
*** derekh has quit IRC15:49
*** adrian_otto has joined #heat15:53
*** dprince has joined #heat15:58
*** ramishra has joined #heat15:59
*** yprokule has quit IRC16:03
*** jcoufal_ has joined #heat16:04
*** code-R has quit IRC16:05
*** code-R has joined #heat16:06
*** rajpatel has quit IRC16:06
*** code-R has quit IRC16:07
*** vijendar has joined #heat16:08
*** jcoufal has quit IRC16:08
*** vijendar has quit IRC16:08
openstackgerritOleksii Chuprykov proposed openstack/heat: Return error with path in function validate  https://review.openstack.org/37345116:30
*** bana_k has joined #heat16:31
openstackgerritOleksii Chuprykov proposed openstack/heat: Return error with path in function validate  https://review.openstack.org/37345116:31
*** blomquisg_gone is now known as blomquisg16:34
*** code-R has joined #heat16:35
*** code-R_ has joined #heat16:36
*** code-R has quit IRC16:40
*** blues-man has quit IRC16:43
*** EricGonc_ has joined #heat16:43
*** EricGonczer_ has quit IRC16:45
*** jpich has quit IRC16:48
*** rcernin has quit IRC16:55
*** adrian_otto has quit IRC16:56
*** dsneddon has joined #heat17:00
*** KanagarajM has quit IRC17:02
*** Zer0Byte__ has joined #heat17:06
*** rajpatel has joined #heat17:06
*** sai is now known as sai|mtg17:08
*** vijendar has joined #heat17:10
*** vijendar has quit IRC17:15
*** bana_k has quit IRC17:27
*** Zer0Byte__ has quit IRC17:33
*** code-R_ has quit IRC17:36
*** bana_k has joined #heat17:40
*** crose has joined #heat17:41
*** akshai has quit IRC17:44
*** akshai has joined #heat17:44
*** cwolferh has quit IRC17:44
*** akshai has quit IRC17:45
*** sai|mtg is now known as sai17:57
*** akshai has joined #heat17:57
*** adrian_otto has joined #heat18:04
*** shardy has quit IRC18:05
*** adrian_otto has quit IRC18:08
*** crose has quit IRC18:09
*** swatson has joined #heat18:11
*** code-R has joined #heat18:13
*** code-R has quit IRC18:14
*** tanvirt has quit IRC18:15
*** akuznetsov has joined #heat18:31
*** rajpatel has quit IRC18:32
*** rajpatel has joined #heat18:33
*** adrian_otto has joined #heat18:35
*** cwolferh has joined #heat18:35
*** sdake_ is now known as sdake18:50
*** akshai has quit IRC18:59
*** akshai has joined #heat19:02
*** rajpatel has quit IRC19:10
*** dave-johnston has quit IRC19:11
*** vijendar has joined #heat19:11
*** vijendar has quit IRC19:12
*** jasond has quit IRC19:26
*** jasond has joined #heat19:26
*** akshai has quit IRC19:28
*** mfisch has quit IRC19:32
*** mfisch has joined #heat19:33
*** mfisch has quit IRC19:33
*** mfisch has joined #heat19:33
*** akshai has joined #heat19:34
*** dbecker has quit IRC19:37
*** dbecker has joined #heat19:44
*** rajpatel has joined #heat19:59
*** akuznetsov has quit IRC20:00
*** adrian_otto has quit IRC20:02
*** jcoufal_ has quit IRC20:09
*** huangtianhua has quit IRC20:10
*** huangtianhua has joined #heat20:10
stevebakerb00tcat: how about []?20:12
stevebakertherve, zaneb: I've backport this https://review.openstack.org/#/c/373518/20:13
zanebyikes20:13
*** Zer0Byte__ has joined #heat20:15
*** jprovazn has quit IRC20:16
openstackgerritCrag Wolfe proposed openstack/heat: Do not share sessions between threads  https://review.openstack.org/37280420:17
*** askb has joined #heat20:22
zanebcwolferh: do you have an example of where we *are* sharing sessions between threads?20:23
cwolferhzaneb, i'll try to come up with one. i thought we passed around the requestcontext somewhere20:23
openstackgerritMerged openstack/heat-templates: modify the home-page info with the developer documentation  https://review.openstack.org/37296220:23
zanebI know we pass the context when we spawn a new thread, but afaik we never continue to do DB operations with it in the original thread20:24
zanebcwolferh, sbaker: from my testing plus zzzeek's email http://lists.openstack.org/pipermail/openstack-dev/2016-September/103674.html I'm actually increasingly convinced that it's a sqlalchemy bug20:25
zzzeekzaneb: have you managed to identify an oslo.db version where that issue goes away20:26
zaneban exception (in our case GreenletExit, but most likely could be almost anything) occurs while talking to the DB. sqlalchemy doesn't invalidate the connection but returns it to the pool. the next session to pick up that connection fails20:26
zanebzzzeek: no, but our issue has been around since at least Liberty if that helps: https://bugs.launchpad.net/heat/+bug/149966920:26
openstackLaunchpad bug 1499669 in heat mitaka "Heat stucks in DELETE_IN_PROGRESS for some input data" [High,Triaged]20:26
zzzeekzaneb: b.c. if its been "always", yes, the stack trace I saw w/ mysql connection failing is a mis use of the fixtures.Timeout fixture20:26
zzzeekzaneb: if fixtures.Timeout() is involved, the issue is understood IMO20:27
zzzeekzaneb: if its the traces where Postgresql is just getting tripped up on which database is in use, that's likely soehting different20:27
zanebzzzeek: it's not, we're just killing a greenthread (which causes GreenletExit to be raised in the thread by eventlet). but it's probably related20:27
zzzeekzaneb: if you kill a greenthread where tests are doing things then you are leaving connections in invalid states.   pymysql connections will be cut off at hte socket level, Posgresql connections will have locks remaining opened20:28
zzzeekzaneb: so really both kinds of traces can be explained if a greenlet is being killed20:28
zanebzzzeek: in our case this isn't a test, we kill threads in real life :)20:29
zanebzzzeek: so what's the solution?20:29
zzzeekzaneb: ok..the thread above has to do with the test suite20:29
zzzeekzaneb: in real life, you aren't having to DROP DATABASE20:30
zzzeekzaneb: what is the "real life" bug we're talking about ?20:30
zanebhttps://bugs.launchpad.net/heat/+bug/149966920:30
openstackLaunchpad bug 1499669 in heat mitaka "Heat stucks in DELETE_IN_PROGRESS for some input data" [High,Triaged]20:30
zzzeekzaneb: in https://bugs.launchpad.net/heat/+bug/1499669/comments/3 it looks like an async timer is doing somethign that results in work being done on a DB connection is that right20:33
openstackLaunchpad bug 1499669 in heat mitaka "Heat stucks in DELETE_IN_PROGRESS for some input data" [High,Triaged]20:33
zanebzzzeek: here, I just reproduced it, this might be easier to read: http://paste.openstack.org/show/582316/20:33
cwolferhzaneb, that looks a bit different than the 'Command out of sync' error20:35
zanebzzzeek: basically another thread is calling kill() on a thread which may be engaged in DB operations. This raises GreenletExit. various handlers may respond to the GreenletExit by doing more DB operations. sometimes those operations fail. sometimes it appears that a future operation in a different session (but presumably using the same connection) fails20:35
zzzeekzaneb: ok in that stack trace, there's a connection that sometihng happened on, the "thing that happened" wasn't intercepted, and the connection was retunred to the connection pool.20:35
zzzeekzaneb: yes, so, if you're in a greenlet and GreenletExit happens, any DB connection you have you shudl call invalidate() on20:36
zanebcwolferh: that comes next, forgot to paste it20:36
zanebzzzeek: respectfully, *you* should invalidate it ;)20:37
zzzeekzaneb: a DB connection gets sent back to the pool when its outer wrapper is garbage collected20:37
zzzeekzaneb: OK how would i implement that ?20:37
zanebzzzeek: catch the exception, invalidate the connection, then re-raise?20:37
zzzeekzaneb: basically this means, "my program digs into the DBAPI driver's mechanics, locates the socket communication, and cuts it off mid-stream.  no exception is raised.  then the connection is dropped"20:38
zzzeekzaneb: I can't catch a GreenletException20:38
zanebzzzeek: why not?20:38
zzzeekzaneb: if you want to show me where I'd "catch" that ?20:38
zzzeekzaneb: oslo.db perhaps can20:38
zanebzzzeek: so I do "with session.begin():"20:40
zanebzzzeek: sometime during that block, GreenletExit gets raised20:40
zzzeekzaneb: I would look into an oslo.db event handler to implement this20:41
*** EricGonc_ has quit IRC20:41
*** dfflanders has joined #heat20:41
zzzeekzaneb: but the awkwardness is that I'm not sure oslo.db depends on eventlet20:41
zanebzzzeek: the session's rollback() will fail because the connection is borked. where exactly should I, as the caller, have handled that?20:41
zzzeekzaneb:  there's a lot of places you can do that20:42
zanebzzzeek: GreenletExit is just an exit exception, same as e.g. KeyboardInterrupt. I don't think it needs any special handling20:42
zzzeekzaneb: but oslo.db event might be the simplest since we already have that set up20:42
zzzeekzaneb: im not sure by "I don't think is needs special handling" what you mean on that.   There's all kinds of resources a program might establish which require clean teardown20:43
zzzeekzaneb: e.g im not sure if we're still stuck on philosophy or actually solving the problem20:44
zzzeekzaneb: from SQLAlchemy's pov, it relies upon the DBAPI to raise exceptions that are meaningful, and if the exception indicates, "this connection is borked", we kill it.  that's in.20:44
zzzeekzaneb: the problem here is that no DBAPI intercepts GreenletException either.20:45
zanebso to answer your question... "zzzeek> zaneb: OK how would i implement that ?": http://paste.openstack.org/show/582319/20:45
zzzeekzaneb: SQLAlchemy relies upon the driver to describe errors in the connection's state.   it would only be able to respond to the DBAPI level error.20:46
zzzeekzaneb: however in this case, pymysql itself is misbehaving in that regard20:46
zzzeekzaneb: because it too, does not know that it has been killed in the middle of a socket communication20:46
zanebzzzeek: so it's my contention that all exit exceptions (i.e. anything that inherits from BaseException but not Exception, including GreenletExit, KeyboardInterrupt, SystemExit) should be added to the list of exceptions that cause the connection to be invalidated20:47
zanebI'm willing to stipulate that this might by pymysql's fault ;)20:47
zzzeekzaneb: OK so, keeping in mind that I can solve this problem for you, likely in oslo.db, how imporatnt is it that you "win" the philosophical argument here vs. fix the problem?20:48
zaneb0%20:48
zzzeekzaneb: I can illustrate the problem at pymysql's level.  we can post it, and I'm pretty sure he will reject it as pymysql's problem also20:48
zzzeekat the pymysql level, it means that you run a SELECT, it succeeds, and then cursor.description is blank20:48
zzzeekwhich is against spec20:49
zzzeekthis is because pymysql was busy sending multiple messages to the mysql server and didn't get to finish them20:49
zanebhow can it be succeeding if there's an exception raised?20:49
*** dprince has quit IRC20:49
zanebthat's the part that I'm confused about20:49
zzzeekzaneb: the exceptin is raised, socket communication is interrupted.   pymysql connection stays "open"20:50
zzzeekzaneb: however, messaging to the server was interrupted20:50
zzzeekzaneb: next operation tries to do something w/ the connection.  pymysql again communicates w/ the server, but server is like, "hey wait you didn't finish the thing we were doing before"20:50
zzzeekzaneb: you get either "commands out of sync" error, which is easier to catch, or this thing where cursor.description is None20:50
zzzeeksqlalhcemy *should* be invalidating for "commands out of sync", let me check20:51
zanebzzzeek: so you're saying the exception is not raised in the call to write to the socket?20:51
zzzeeka GreenletException for your timeout or whatever is riased but pymysql does not respond to that nor does SQLalchemy20:52
*** spedione is now known as spedione|AWAY20:52
zzzeekzaneb: now that i see what causes this I can acutllay make tests and confirm all this20:52
zzzeekzaneb: up until now i havent had that opportunitiy20:52
zzzeekzaneb: yeah for 2014 commands out of sync that connection is gone20:53
zzzeekzaneb: let me try to create a proof of concept at he pymysql level, as far as oslo.db patch i'd have to get to that later in the week20:56
*** priteau has joined #heat20:58
zanebzzzeek: awesome, thank you. what is the magic one-liner to invalidate the connection given a session that you know is questionable? I can try to test out solutions here20:58
zzzeeksession.connection().invalidate()21:00
*** randallburt1 has quit IRC21:00
zzzeekbut that should be *before* you'd call rollback()21:00
zzzeekzaneb: tehre's better ways to get more directly at the connection if that isn't working21:00
zzzeekthere's a "catch error" event21:00
zzzeekwher you can promote any exception you want to be "invalidate"21:00
zzzeekzaneb: it's actually kind of a one liner in oslo.db :)  but let me at least confirm this behavior21:01
zanebzzzeek: thanks, let me try it out and I'll get back to you21:04
zzzeekzaneb: how come in http://paste.openstack.org/show/582316/ i dont see the greenlet exception anywhere?21:05
*** ccamacho has quit IRC21:06
*** annegentle has quit IRC21:13
*** rajpatel has quit IRC21:15
zanebzzzeek: I'm pretty sure because the ResourceClosedError came up during an exception handler (for the GreenletExit) that was trying to clean up as the thread was exiting21:17
zzzeekzaneb: that is possible21:18
zanebzzzeek: so we're like "oh, ok, so this failed, I'll write the failed state to the db, WHOOPS"21:18
*** rajpatel has joined #heat21:22
*** Zer0Byte__ has quit IRC21:24
*** annegentle has joined #heat21:28
*** rpothier has quit IRC21:33
*** annegentle has quit IRC21:33
zzzeekzaneb: is this basically greenlet.kill() ?21:36
zzzeekzaneb: if i just make a greenlet talk to a DB and do kill(), I get pretty much one error w/ pymysql and it's a RuntimeError21:37
zzzeekGreenletExit seems to only occur from wait() ?21:37
*** cwolferh has quit IRC21:38
*** akshai has quit IRC21:39
zanebzzzeek: hmm, I wonder if pymysql is raising RuntimeError in its place somehow?21:40
zzzeekzaneb: BufferedReader is raising it. not sure if my test case is setting things up correctly21:41
zanebhttp://eventlet.net/doc/modules/greenthread.html#eventlet.greenthread.kill21:41
zzzeekzaneb: this is the only error i can get pymysql to raise so far http://paste.openstack.org/show/582329/21:41
zanebo.O21:42
zzzeekzaneb: let me try SQL that is slower21:42
zzzeekzaneb: these timeouts occur when the DB is hung or soemthing?21:42
zanebzzzeek: no, but because eventlet it co-operative multitasking, you're pretty much guaranteed to swap into the thread when it's doing I/O21:43
*** spzala has quit IRC21:43
zzzeekzaneb: oh.   but that doesn't raise greenlet errors21:44
zaneb(that or something else that eventlet has monkey-patched, like sleep())21:44
zanebzzzeek: well, when you call kill() from another thread, that thread is running, and the target thread is in the middle of some blocking, monkey-patched eventlet call21:45
zzzeekzaneb: yup got that21:45
zanebzzzeek: this bug applies equally to e.g. KeyboardInterrupt, but eventlet acts like a magnet for trouble by forcing the exception to always be raised at the worst possible moment :D21:46
* zaneb slow claps for eventlet. again.21:46
*** spotz is now known as spotz_zzz21:47
*** rajpatel has quit IRC21:52
*** rajpatel has joined #heat21:57
zzzeekzaneb: I can't make any bug happen.   been seeing this error for years can never isolate it22:00
zzzeekzaneb: https://gist.github.com/zzzeek/b762218a5f855ec7d1c3a998fe996893 i22:01
zzzeekI'm out of time to work on this today22:01
stevebakerjasond, zaneb: hey, could I get a review on this heatclient backport so I can do a stable release for tripleo? https://review.openstack.org/#/c/373531/22:03
zanebzzzeek: "except Exception as err:" won't catch it, since it's an exit exception. don't know if that makes a difference22:03
zzzeekzaneb: let me try22:03
jasondstevebaker: sure22:04
zzzeekzaneb: okey doke i can see the greenlet exit now but still can't get the pymysql command to break https://gist.github.com/zzzeek/b762218a5f855ec7d1c3a998fe99689322:06
zzzeekzaneb: i have some mor eideas22:06
*** Guest54237 has quit IRC22:07
zzzeekzaneb: OK it's the rollback(), that gets me partway there22:08
zanebzzzeek: in my testing, it fails 100% of the time when I see "ROLLBACK" in the logs, and 0% of the time when I don't22:08
zzzeekzaneb: yes ROLLBACK is part of it22:09
zzzeekzaneb: still trying to get a blank cursor.descriptoin22:09
zzzeekzaneb: ok this seems to do it https://gist.github.com/zzzeek/b762218a5f855ec7d1c3a998fe99689322:14
zzzeekzaneb: and if you set ensure_greenlet_exit_handled it goes away22:14
*** cwolferh has joined #heat22:17
zanebcool22:17
*** hoonetorg has quit IRC22:24
openstackgerritYosef Hoffman proposed openstack/heat-specs: New Resource Type OS::Nova::Quota  https://review.openstack.org/37354622:25
*** blomquisg is now known as blomquisg_gone22:25
openstackgerritYosef Hoffman proposed openstack/heat: Add OS::Nova::Quota resource  https://review.openstack.org/37354822:26
*** annegentle has joined #heat22:27
openstackgerritYosef Hoffman proposed openstack/heat-specs: New Resource Type OS::Nova::Quota  https://review.openstack.org/37354622:29
*** jasond has quit IRC22:32
*** Drago has quit IRC22:44
*** vijendar has joined #heat22:47
*** rajpatel has left #heat22:51
*** vijendar has quit IRC22:52
*** priteau has quit IRC22:53
zzzeekso zaneb, definitely done for now but this can't be handled by SQLA's event beause the exception here is not a subclass of Exception.  I can handle it in enginefacade.  But heat needs to use enginefacade :)22:55
zanebzzzeek: I'm still not clear on why SQLA events can't handle BaseException?22:55
zzzeekzaneb: I can look into it for 1.1 as this introduces major surprises for existing apps that use the handle_error event22:56
zanebthat's fair22:56
zzzeekor, enginefacade can do it which just means you're no longer doing "with session.begin()", you're doing "with enginefacade.begin()" (essentially)22:56
*** hoonetorg has joined #heat22:56
zanebzzzeek: not trying to be difficult, it just seems like there might be lots of sqlalchemy users who expect to be able to e.g. hit Ctrl-C on their program and have it roll back any in-progress transactions gracefully, other than the ones using enginefacade22:57
zzzeekzaneb: 11 years and this is the first :)22:58
zzzeekor, 3800 bug reports and like 50K mailing list emails, this is the first :)22:58
zaneblol22:59
zzzeekzaneb: when you kill a DB connection, transaction is gone22:59
zzzeekthis is a special case22:59
zzzeekthere's no analogue in non-greenlet python22:59
zzzeekmaybe a signal handler22:59
zzzeekso keyinterrupt is not a problem22:59
zanebyes, signal handler is the same as far as I can tell22:59
zanebKeyboardInterrupt _does_ come from a signal handler, doesn't it?23:00
zanebditto SystemExit23:00
zanebthe real difference here is that for a signal handler the exception could be raised randomly between any two python bytecodes, but eventlet guarantees that it will happen during your I/O call23:01
zanebso it makes it *much* easier to hit the bug23:01
zanebwithout eventlet or some sort of fault injection you would have 0 chance of reproducing this reliably23:02
*** hoonetorg has quit IRC23:02
zanebI'd speculate that's why you've never seen a bug report - nobody has ever got it to do this twice before :D23:02
zanebzzzeek: can't see how this is a different case: https://docs.python.org/2/library/thread.html#thread.exit23:05
zanebseems like an exact analogue in non-greenlet python to me23:05
zanebah, actually, no. that exits the *current* thread, not another one23:07
zzzeekzaneb: systemexit ends the whole program no ?23:08
zanebonly current thread I believe23:08
zzzeekzaneb: the details of how pymysql is interrupted is likely very different in that case also23:09
zanebok, there's no sane way to kill another native thread in python (http://stackoverflow.com/questions/323972/is-there-any-way-to-kill-a-thread-in-python#325528) so you're right, it's only signal handlers that are comparable23:14
*** adrian_otto has joined #heat23:15
*** hoonetorg has joined #heat23:20
zzzeekzaneb: i can make the "except Exception:" be "except self.exeption_we_should_catch" and make an option out of it23:24
openstackgerritMerged openstack/heat: Re-trigger on update-replace  https://review.openstack.org/37157223:26
openstackgerritMerged openstack/heat: Fix cancel update for nova server with defined port  https://review.openstack.org/30649023:26
stevebakerzaneb: should we backport those 2 to newton? ^^23:28
*** hoonetorg has quit IRC23:29
*** hoonetorg has joined #heat23:31
*** annegentle has quit IRC23:41
*** Alexey_Abashkin_ has joined #heat23:45
*** Alexey_Abashkin has quit IRC23:46
*** om has quit IRC23:50
*** om has joined #heat23:52

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