19:00:55 #startmeeting db 19:00:56 Meeting started Thu May 23 19:00:55 2013 UTC. The chair is dripton. Information about MeetBot at http://wiki.debian.org/MeetBot. 19:00:58 Useful Commands: #action #agreed #help #info #idea #link #topic #startvote. 19:00:58 probably we should call devananda 19:01:01 The meeting name has been set to 'db' 19:01:02 devananda ping 19:01:09 pong 19:01:26 hi how are you?) have you a little bit time to discuss work around db?) 19:01:31 ah! right. yes, sure :) 19:01:38 nice 19:01:45 #topic havana-1 19:01:55 Anyone have anything they're trying to get in for havana-1 that needs more eyes? 19:02:01 I would like to finish db-improve-archiving in H1 19:02:28 so devananda could you take a look at it pls?) 19:02:35 boris-42: Are you just waiting for approvals? 19:02:42 yes=) 19:02:53 I fixed bug around indexes 19:03:10 boris-42: it seemed (perhaps mistakenly) that the fix-old-migrations migrations went through several revisions 19:03:40 i didn't follow too closely. was much being changed? 19:03:48 yes 19:03:53 there was a lot of changes 19:04:06 and I have copy pasted some of it 19:04:54 k. action me to go review those pls :) 19:05:14 reviews from others are helpful too even without +2 powers. Some of the core reviewers wait until they see several +1s before they bring in their +2s 19:05:43 indeed 19:05:47 yeah=) 19:05:55 #action devananda to review db-improve-archiving patches. 19:06:29 #topic bugs 19:06:42 Btw there are some new guys in our db team probably they also would like to say something 19:06:55 #topic new people 19:06:59 yeah 19:07:05 hey guys are you here?) 19:07:12 yep, Boris 19:07:20 here 19:07:33 o/ 19:07:34 I've been recently working on getting common Oslo DB code into Cinder 19:08:13 and helping Boris with testing for db-improve-archiving 19:08:30 I hope we can use this in other projects too when it's ready 19:08:51 I have a few ideas to work in Nova and Quantum as well 19:09:03 at the moment I'm working om rename all unique consraints in Nova database 19:09:24 for Nova I would really like us to switch to Alembic, which seems to be quite superior tools comparing to SQLAlchemy-Migrate 19:09:42 especially for maintaining of stable branchaes 19:09:44 rpodolyaka: +1 on alembic, I tried fighting that fight in Grizzly. But it's a huge disruptive change. 19:10:08 dripton: indeed 19:10:18 if some of these things (oslo-db, alembic) will make Ironic development easier 19:10:36 i'm happy to accept folks' patches to start making it happen from the ground up 19:10:41 rpdolyaka: I have some code to 90% convert migrate migrations to alembic migrations, but the transition from one to the other is painful. 19:11:04 devananda: so you're not doing db migrations in ironic at first. How are you populating the DB? 19:11:35 dripton: eh, i copied the existing migration code from nova. that said, i am not doing any _data_ migrations in ironic 19:11:38 until we approach an RC 19:12:03 devananda: ok, now I understand. Seems reasonable since nobody needs to upgrade from 0.0001 to 0.0002 19:12:08 right 19:12:18 once we have an RC, we'll need a nova_bm -> ironic ETL tol 19:12:20 tool 19:12:23 and then have to worry about data 19:12:57 viktors: Are you finding problems with the unique constraints as you go through them? 19:13:30 victors could you give us link to patch in oslo 19:13:39 1 min please 19:14:44 It's path to Oslo to proceed error messages from db to human-readable view https://review.openstack.org/#/c/29888/ 19:15:23 It's migration to nova database https://review.openstack.org/#/c/30108/ 19:16:00 viktors: I will take a look at both. 19:16:17 thanks ) 19:16:32 Are any of the new people PostgreSQL people? 19:16:43 dripton: on transition to Alembic. It probably sounds crazy. But maybe it makes sense to maintain both Alembic and SQLAlchemy-Migrate migrations till we release Havana (thus providing a way for users to upgrade to it) and then drop SQLAlchemy-Migrate support? 19:17:26 rpodolyaka: I think there would be resistance to the double maintainence, unless we could automate converting one to the other. But that might work. 19:17:59 some db-api-tests waiting for +2 https://review.openstack.org/#/q/status:open+project:openstack/nova+branch:master+topic:bp/db-api-tests,n,z 19:18:54 eyerediskin: awesome. If we can pile some more +1s on them then the +2s will follow. 19:19:17 * dripton heard crickets in response to postgres. 19:19:23 #topic bugs 19:19:35 Nova had a bug day yesterday. Did anyone find/fix any nasty DB bugs? 19:20:00 my migrations fix=)) 19:20:09 boris-42 wins. 19:20:52 ^_^ 19:20:53 boris-42: Error: "_^" is not a valid command. 19:21:00 I'm chasing a bug in db-archiving where the instances table doesn't all get archived, I think due to FK constraints. 19:21:13 And trying to fix the postgres tempest gate which has been broken for a couple of weeks. 19:21:24 are FKs enabled by default in production? 19:21:39 i thought we had disabled them last year ... 19:21:59 devananda: good question. They're enable on the QA box that found this bug, but maybe that's not a real production config. 19:22:26 k. either way, archiving shouldn't break because FK are on :) 19:22:27 default production config != real prioduction config 19:22:51 devananda: right, and in my tests it doesn't break, but QA people can break anything. 19:23:15 No other bugs that anyone needs help with? 19:23:27 #topic blueprints 19:24:00 boris-42 did you want to talk about other blueprints for havana? 19:24:16 how about to move @require_context/@require_admin_context from db/sqlalchemy/api.py to db/api.py? 19:24:29 yeah eyerediskin +1 19:24:57 eyerediskin could you pls describe why it is so important 19:25:03 Does that help reduce code for the mysql fast path? 19:25:50 that help reduce code for other backends 19:25:58 a little) 19:26:13 Is there a blueprint for it? Or a patch? 19:26:16 nope 19:27:01 If you do a blueprint then that'll smooth getting the patch approved. It can be a very short one since it's such a simple change. Or I guess it can be part of the existing bp for an alternate backend. 19:27:32 no dripton 19:27:47 ? 19:27:52 I would like to explain a little bit more 19:28:12 comstud is working on mysql-db-impl 19:28:24 mysqldb-db-impl 19:28:33 (to clarify) 19:28:33 yeah=) 19:29:04 so we would like to remove contex from db.sqlalchemy.api layer to db.api layer 19:29:32 so we will avoid copy paste of tons of context 19:29:49 I mean @require_context and @require_admin_context.. 19:30:28 makes sense to me 19:30:41 #topic open discussion 19:30:52 anyone have anything else? 19:31:14 comstud what do you think about it ^ 19:31:34 Say again? 19:31:43 Oh yeah... 19:31:50 i moved some things already 19:31:58 The problem with those decorators are... 19:32:02 they assume model level API calls 19:32:14 mysqldb stuff is all OOP, so they don't work 19:32:18 because there's the extra 'self' argument. 19:32:47 btw... I'm also in the process of splitting up sqlalchemy/models.py to support objects. 19:32:56 I dunno how that affects the other work.. or if I'm duplicating effort. 19:33:12 ie models.py -> models/base.py (or __init__.py) 19:33:15 and then models/instance.py etc 19:33:24 ooO 19:33:26 =) 19:33:33 comstud: i'm interested to see how you're doing that 19:33:41 and see if i can use that in ironic 19:33:46 rather than add it on later 19:33:50 Cools 19:34:00 I really just started this work today... 19:34:02 could I ask why do you that comstud?) 19:34:09 I have a patch to remove module imports from models.py that I can throw up anytime 19:34:16 boris-42: Sure 19:34:24 I thought this layout would be clean: 19:34:27 instance.py contains: 19:34:31 the sqlalchemy model 19:34:37 the Instance internal object 19:34:44 that Instance internal object will have: 19:34:47 @classmethod 19:34:50 def get_by_uuid() 19:35:10 this will break up that huge mess in api.py 19:35:24 and separating it into separate files seemed like a good thing 19:35:52 so we will move from facade pattern to teach models=) 19:35:53 That make sense? Might be more clear when I get some WIP patches up :) 19:35:57 reach* 19:36:05 looking forward to seeing the patches 19:36:27 so we will have in all models, methods that works with this model? 19:36:46 instead of one file with tons of methods? 19:36:58 comstud ^ 19:37:06 yeah 19:37:13 methods will be on the object classes instead 19:37:37 so we will be able to switch models and use different backends? 19:37:38 and for methods that interact with multiple models? 19:37:45 we will chose one=) 19:38:05 right 19:38:07 well 19:38:08 math.random(l) 19:38:09 switch objects 19:38:14 if I understand what you're saying 19:38:26 some other backend implement 19:38:30 right 19:38:39 that's what I'm trying to figure out right now with objects... 19:38:43 by the way we have to do something with tests.. 19:38:52 how do we ensure that all backends implement the same methods? 19:38:59 tests 19:39:03 tons of tests.. 19:39:04 dripton: tests that compare the backends 19:39:05 :) 19:39:15 that is the Pythonic answer 19:39:33 we have already tons of tests in test_db_api 19:39:50 oh they all should be then rewritten… to provide your changes comstud.. 19:40:17 one more ton of code.. 19:41:04 Anyone have anything else? 19:41:28 Thanks everyone, and remember to review patches! 19:41:31 #endmeeting