Thursday, 2014-07-03

*** gus has joined #openstack-oslo00:21
guszzzeek: (If you're around) - I was wondering if you'd seen https://review.openstack.org/#/c/104111/00:22
gusI wrote a test that tries to reproduce the transaction/eventlet deadlocks that neutron has been suffering from.00:23
gusit fails on sqlite (since you can't open an sqlite database twice), and fails on mysqldb (due to the eventlet deadlock).00:24
gusfyi, it passes with mysqlconnector - and presumably others but I haven't done an audit.00:24
gusI appreciate the desire to support mysqldb - I fear the only way to do so is to take a python/eventlet lock before entering a mysqldb transaction.  This will be expensive, since we'll be locking the entire database (or tables?) whereas a more knowledgeable database transaction would only lock on the relevant row range.  But if we limit it to only mysqldb, that won't penalise other drivers.00:29
gusIn particular, the neutron schedule-actions-for-db-transaction-closed bp is inadequate, since it only deals with *known* cases of overlapping transactions.00:30
gusYou could still get (eg) two simultaneous user requests to modify the same row and you would still deadlock (aiui).00:31
openstackgerritJoshua Harlow proposed a change to openstack/taskflow: Add proxy heartbeat support  https://review.openstack.org/10439700:50
zzzeekgus: looking00:56
openstackgerritJoshua Harlow proposed a change to openstack/taskflow: Add proxy heartbeat support  https://review.openstack.org/10439700:57
zzzeekgus: last night was talking to someone and we established that overlapping transactions w/ eventlet is not really feasible unless a eventlet-compat driver were used00:59
zzzeekgus: anytime MySQL locks a row, we can deadlock against eventlret00:59
openstackgerritJoshua Harlow proposed a change to openstack/taskflow: Add proxy heartbeat support  https://review.openstack.org/10439700:59
zzzeekgus: disturbing here is that you’re getting a lock w/o using REPEATABLE READ or SELECT FOR UPDATE00:59
gusyeah, I'm doing an INSERT INTO with the same value.  I'm no DB expert, but I assume it still needs to lock between those two conflicting updates.01:01
harlowja zzzeek  do u think its worthwhile for openstack to seriously consider pymysql (or other)01:02
harlowjait starts to feel that we should seriously start asking that question01:02
zzzeekharlowja: i just commented there, why cant we fork / enhance mysql-connector or mysqldb01:03
zzzeekwe dont need to be pure python to do this01:03
zzzeekgus: i htink the reason it deadlocks is because thread A locks, does something to defer to thread B, B hits the lock and blocks, deadlock, because eventlet + mysqldb doesnt know that “lock” means “defer"01:03
zzzeekits such a stupid issue01:04
zzzeekits entirely inapprorpiate how openstack does this right now01:04
harlowjazzzeek i know https://review.openstack.org/#/c/73437/ was tried (getting pymysql into openstack requirements)01:05
zzzeekyeah01:05
guszzzeek: what are your thoughts on my suggestion above?  I really do think the only way out is to 1) Say mysqldb is unsupported and use some other mysql driver, or 2) use one of the hooks to take a python/eventlet lock before mysqldb tries to block on the DB itself.01:07
zzzeekthe problem with #1 is that the only compatible drivers are pure python so are way slower in all other ways01:08
gusoh ok, I don't have any experience really with the alternatives.01:08
zzzeek#2 is a bandaid for now, lock eventlets with transactions01:08
gusI know mysqlconnector works.01:09
zzzeekgus: it does ?!01:09
gus#2 is going to be real expensive (for mysqldb), since we'd have to lock the entire db/table01:09
zzzeekgus: its written in C, isnt it?01:09
gusit passes my simple test, yes.01:09
zzzeekgus: im +100 on mysqlconnector because its mysql’s official driver, however, need to understand why it “works”01:09
gusyes, but it does something more clever with eventlets..01:09
zzzeekbecause eventlet needs to patch the socket01:10
guslet me dig up the stuff I was reading yesterday ...01:10
gusoh right, mysqlconnector is pure python01:12
harlowjaya, interseting that mysqlconnector is that much faster when its also pure python01:13
* harlowja just skimming over the mysqlconnector code and it doesn't seem like anything special01:14
gusare there speed benchmarks somewhere?  I'm similarly surprised there's such a difference.01:15
gusaiui, all these are basically just copying bytes to/from a mysql TCP socket.01:15
harlowja* http://pydoc.net/Python/mysql-connector-python/1.1.6/01:15
harlowja^ just the code (without requiring a download)01:16
zzzeekgus + harlowja : just added https://wiki.openstack.org/wiki/OpenStack_and_SQLAlchemy#MySQLdb_.2B_eventlet_.3D_sad01:18
harlowjanice01:19
harlowja+2 for just solving, even if we take a hit with 'its slower', i like the path of correctness first then optimize01:20
zzzeekyup01:21
zzzeeke.g. pypy :)01:21
harlowjasomeday that will happen, ha01:22
harlowjamysqldb will have bigger issues with py3 + asyncio anyway01:22
harlowjaeven if they fix the current problem01:22
zzzeeki hate hacky things01:23
harlowjau won't get disagreement from me, ha01:23
guszzzeek: +1 from me too.  The bp/schedule-actions-for-db-transaction-closed route seemed to be piling on significant complexity, without actually fixing the issue in all cases.01:24
zzzeekthis stuff woudl run great if eventlet were allowed to do its job, otherwise its totally dumb to be using async libraries01:24
zzzeeki dont see much in openstack that is CPU bound01:24
zzzeekon the python side01:24
harlowjachecksumming every now and then01:24
gus(even with eventlet, you still can't use more than one core which is sad in this day and age)01:24
harlowjachecksumming and string concat, thats pretty much the CPU bound things, lol01:25
guswell, and latency.01:25
guswith eventlet, you need to wait for your turn on the one-true cpu.01:25
harlowjaya, i've always considered eventlet like a temptress01:26
harlowjaoh so sexxyyyy01:26
harlowjaahhhh01:26
harlowjaand then thats how u get here, lol01:26
harlowjaand then u have to figure out how to get rid of all those dieases and stuff after the fact01:27
openstackgerritAngus Lees proposed a change to openstack/oslo-incubator: Add DBDuplicateEntry detection for mysqlconnector driver  https://review.openstack.org/10440501:28
harlowjaand then u come and use taskflow, and it saves u01:28
harlowjahahaha01:28
openstackgerritJoshua Harlow proposed a change to openstack/oslo.messaging: Add a thread + futures executor based executor  https://review.openstack.org/7091401:42
openstackgerritAngus Lees proposed a change to openstack/oslo-incubator: Allow tox tests with complex OS_TEST_DBAPI_CONNECTION URLs  https://review.openstack.org/10441001:46
*** zzzeek has quit IRC02:07
openstackgerritAngus Lees proposed a change to openstack/oslo-incubator: Don't drop pre-existing database before tests  https://review.openstack.org/10441902:27
openstackgerritJoshua Harlow proposed a change to openstack/taskflow: Add proxy heartbeat support  https://review.openstack.org/10439702:52
openstackgerritAngus Lees proposed a change to openstack/oslo.db: Add DBDuplicateEntry detection for mysqlconnector driver  https://review.openstack.org/10442502:57
openstackgerritAngus Lees proposed a change to openstack/oslo.db: Allow tox tests with complex OS_TEST_DBAPI_CONNECTION URLs  https://review.openstack.org/10442803:06
*** SridharG has joined #openstack-oslo03:10
*** praneshp has quit IRC03:12
openstackgerritAngus Lees proposed a change to openstack/oslo.db: Don't drop pre-existing database before tests  https://review.openstack.org/10443003:15
openstackgerritAngus Lees proposed a change to openstack/oslo-incubator: Test that concurrent sqlalchemy transactions don't block  https://review.openstack.org/10411103:25
gus(sorry for the autospam - I'm moving all those changes to oslo.db)03:25
*** dims has quit IRC03:32
*** mriedem has left #openstack-oslo03:34
*** mriedem has quit IRC03:34
harlowjawe love the autospam :-P03:38
openstackgerritA change was merged to openstack/taskflow: Add a tree type  https://review.openstack.org/9732503:40
openstackgerritA change was merged to openstack/taskflow: Create a top level time type  https://review.openstack.org/10168103:41
*** zhiyan_ is now known as zhiyan03:47
*** zzzeek has joined #openstack-oslo03:54
openstackgerritAngus Lees proposed a change to openstack/oslo.db: Test that concurrent sqlalchemy transactions don't block  https://review.openstack.org/10443603:55
*** dstanek is now known as dstanek_zzz03:57
openstackgerritJoshua Harlow proposed a change to openstack/taskflow: Increase the logging of the WBE response/send activities  https://review.openstack.org/10295903:57
openstackgerritJoshua Harlow proposed a change to openstack/taskflow: Tidy up the WBE cache (now WBE types) module  https://review.openstack.org/10324503:57
openstackgerritJoshua Harlow proposed a change to openstack/taskflow: Improve WBE testing coverage  https://review.openstack.org/10171704:11
openstackgerritJoshua Harlow proposed a change to openstack/taskflow: Use a common message dispatcher  https://review.openstack.org/10109404:11
openstackgerritJoshua Harlow proposed a change to openstack/taskflow: Allow handlers to provide validation callables  https://review.openstack.org/10167904:11
openstackgerritJoshua Harlow proposed a change to openstack/taskflow: WBE notification message validation  https://review.openstack.org/10365704:17
openstackgerritJoshua Harlow proposed a change to openstack/taskflow: WBE response message validation  https://review.openstack.org/10369004:17
openstackgerritJoshua Harlow proposed a change to openstack/taskflow: WBE request message validation  https://review.openstack.org/10369504:17
openstackgerritJoshua Harlow proposed a change to openstack/taskflow: Add basic WBE validation sanity tests  https://review.openstack.org/10401604:17
*** ajc_ has joined #openstack-oslo04:17
harlowjaoh the autorebase spam fun04:17
openstackgerritJoshua Harlow proposed a change to openstack/taskflow: Add proxy heartbeat support  https://review.openstack.org/10439704:43
openstackgerritAngus Lees proposed a change to openstack/oslo.db: Support OS_TEST_DBAPI_ADMIN_CONNECTION override  https://review.openstack.org/10444704:48
*** ihrachyshka has joined #openstack-oslo05:26
*** zzzeek has quit IRC05:30
*** ihrachyshka has quit IRC05:39
*** praneshp has joined #openstack-oslo05:41
*** ihrachyshka has joined #openstack-oslo05:45
*** harlowja is now known as harlowja_away05:47
*** ihrachyshka has quit IRC05:56
openstackgerritMarc Koderer proposed a change to openstack/oslotest: Add known issue about time.time mocking  https://review.openstack.org/9541106:22
*** sreshetn1ak has quit IRC06:34
*** ildikov has joined #openstack-oslo06:37
*** tkelsey has joined #openstack-oslo06:38
*** ihrachyshka has joined #openstack-oslo07:19
*** flaper87|afk is now known as flaper8707:24
*** i159 has joined #openstack-oslo07:25
*** markmc has joined #openstack-oslo07:27
*** liusheng has joined #openstack-oslo07:30
liushengHi folks, could you please review https://review.openstack.org/#/c/103506/  ?07:31
*** viktors|afk is now known as viktors07:32
*** ildikov_ has joined #openstack-oslo07:42
*** ildikov has quit IRC07:45
*** nacim has joined #openstack-oslo07:58
*** stannie has joined #openstack-oslo07:59
openstackgerritliusheng proposed a change to openstack/oslo.config: Fix the return of ConfigOpts's __call__ method  https://review.openstack.org/10350608:13
openstackgerritAlex Xu proposed a change to openstack/oslo-specs: Support policy configuration directories  https://review.openstack.org/10415708:16
openstackgerritThomas Herve proposed a change to openstack/oslo-incubator: Allow test_service to run in isolation  https://review.openstack.org/10447408:19
ihrachyshkagus: hey08:20
*** pblaho has joined #openstack-oslo08:20
openstackgerritThomas Herve proposed a change to openstack/oslo-incubator: Allow test_lockutils to run in isolation  https://review.openstack.org/10447508:24
*** praneshp has quit IRC08:34
openstackgerritA change was merged to openstack/oslo-incubator: Allow test_service to run in isolation  https://review.openstack.org/10447408:38
*** mrda is now known as mrda-away08:39
*** enykeev has joined #openstack-oslo08:43
*** jaosorior has joined #openstack-oslo08:55
*** ajo has quit IRC09:28
*** Alexei_9871 has joined #openstack-oslo09:34
*** ajo has joined #openstack-oslo09:42
openstackgerritgaryk proposed a change to openstack/oslo.vmware: Add support for using extensions  https://review.openstack.org/10091110:03
*** dstanek_zzz is now known as dstanek10:14
*** pblaho has quit IRC10:21
*** pcm_ has joined #openstack-oslo10:56
*** AAzza_afk is now known as AAzza11:20
*** tcammann_ has quit IRC11:26
*** dims has joined #openstack-oslo12:04
*** pblaho has joined #openstack-oslo12:13
*** yamahata has joined #openstack-oslo12:16
*** amotoki has joined #openstack-oslo12:19
openstackgerritRadoslav Gerganov proposed a change to openstack/oslo.vmware: Log additional details of suds faults  https://review.openstack.org/10453412:24
*** AAzza is now known as AAzza_afk12:27
*** ajc_ has quit IRC12:30
*** lbragstad has quit IRC12:40
*** jaosorior has quit IRC12:42
*** markmcclain has joined #openstack-oslo12:42
*** mtreinish has quit IRC12:45
*** dims_ has joined #openstack-oslo12:58
openstackgerritIlya Pekelny proposed a change to openstack/oslo.db: Add a base test case for DB schema comparison  https://review.openstack.org/9339813:02
*** dims has quit IRC13:02
ttxdhellmann: I +1ed the oslo.rootwrap spec we discussed Tuesday (https://review.openstack.org/#/c/94613/)13:05
*** sreshetnyak has joined #openstack-oslo13:11
*** oomichi has quit IRC13:14
*** alexpilotti has joined #openstack-oslo13:20
*** mriedem has joined #openstack-oslo13:20
*** jecarey has quit IRC13:26
*** zzzeek has joined #openstack-oslo13:37
*** zzzeek has quit IRC13:42
*** zzzeek has joined #openstack-oslo13:43
*** mriedem has quit IRC13:54
dhellmannttx: thanks13:54
*** mriedem has joined #openstack-oslo13:56
*** arnaud__ has joined #openstack-oslo13:57
openstackgerritMark McLoughlin proposed a change to openstack/oslo.config: Add cfgfilter.ConfigFilter  https://review.openstack.org/9723314:07
*** alexpilotti_ has joined #openstack-oslo14:08
*** alexpilotti has quit IRC14:09
*** alexpilotti_ is now known as alexpilotti14:09
dhellmannbknudson: have a sec to talk about oslo.i18n?14:14
bknudsondhellmann: sure14:14
dhellmannI spent some more time thinking about adoption, and I have some other alternatives.14:14
bknudsonI posted my change -- https://review.openstack.org/#/c/104400/14:15
dhellmannYesterday we talked about adding an i18n module to the incubator to cover the incubated modules' use of the library, and then copying that into the projects14:15
dhellmannoh, nice, I'll look at that, too14:15
bknudsonmonkey-patched oslo-incubator _, _LI, etc.14:15
dhellmannhrm14:15
bknudsonprobably not ideal14:15
dhellmannI realized last night that it's not technically a problem to have more than one translation function.14:15
bknudsonhttps://review.openstack.org/#/c/104400/1/keystone/i18n.py14:15
dhellmannSo if we have two versions of _() defined using the same domain they will just pull messages from the same catalog14:16
*** dims_ has quit IRC14:16
bknudsony, but then we have to initialize both libs14:17
dhellmannso that means we *could* wait to do anything with the other modules in the incubator until they are moved into a library, at which point the new library would need its own integration module with marker functions configured to use the library's domain14:17
dhellmannthere's minimal overhead in that initialization, though, right?14:17
bknudsondhellmann: y, but it's annoying and complicated already14:18
bknudsonespecially when you have to enable_lazy in 2 places14:18
bknudsonthis is https://review.openstack.org/#/c/104400/1/bin/keystone-all14:18
dhellmanntrue, the 2 calls to enable_lazy would be error-prone14:18
bknudsonalso, that code is copied in several places in keystone14:19
dhellmannright14:19
dhellmannwhat about putting it in the integration module?14:19
dhellmannI guess then we're starting to build up a longer list of things that integration module has to do the same way in every project, at which point it's something we would want in the incubator14:19
bknudsonI think it would work to put it in the integration module14:19
bknudsonthis is where things get kind of "magical", because we have to set up lazy initialization on import14:20
dhellmannyou can actually toggle it on and off14:21
dhellmannyou wouldn't want to, but the value is checked at runtime for each message14:21
bknudsonenable_lazy has to happen before any _() and keystone has some _() that happen on import14:21
dhellmannok14:21
bknudsonhttp://git.openstack.org/cgit/openstack/keystone/tree/keystone/exception.py#n7914:22
bknudsonit's in some exception class-level strings14:22
bknudsonalthough maybe I'm wrong about that14:22
dhellmannno, you're right, those are evaluated at import time14:22
dhellmannyou know, I was thinking of adding a wrapper function to the integration module but you could just put both calls to enable_lazy right there without a wrapper so they are called on import14:23
*** alexpilotti has quit IRC14:23
dhellmannthat assumes keystone wants all of its daemons to have lazy translation on or off, of course14:24
bknudsonfor some reason we're setting enable_lazy in keystone-manage which doesn't make sense14:24
bknudsonI think I should get rid of that14:24
dhellmannmaybe someone added it to all of the main programs, without considering whether it was useful in the management tool?14:25
bknudsony, it was probably me14:25
bknudsonbut it's still used in 1) keystone-all, 2) keystone wsgi launcher, 3) tests14:25
bknudsonkeystone.tests.__init__14:25
bknudsonI can look into moving it into keystone.i18n14:26
bknudsonI've got to admit I kind of prefer the monkey patching anyways14:26
bknudsonit's in one place so will be easy to remove14:26
bknudsonand it's not like those symbols are going to change.14:26
dhellmanntrue, they won't14:27
dhellmannas long as the import order is always correct, monkey patching should be safe14:27
dhellmannI'll review that patch. If monkeypatching works that's an alternative, but if someone doesn't like that I think just calling enable_lazy when the integration module is imported will achieve the same thing14:28
dhellmannit's good to have options :-)14:28
*** tsekiyama has joined #openstack-oslo14:29
*** alexpilotti has joined #openstack-oslo14:42
*** ihrachyshka has quit IRC14:43
viktorszzzeek: around?14:49
zzzeekhey14:49
viktorszzzeek: afaik, recently you and rpodolyaka discussed alembic migrations support in oslo.db14:49
viktorsand you told, that it’s would be nice to have common `env.py` file to reuse it in projects14:50
zzzeekmost of what ive seen so far is this emphasis on testing migrations ….yeah14:50
zzzeekviktors: yaeh i dont think env.py should be stated in any other project except a stub: “from oslo.db.migrations import env; env()”14:50
zzzeekoslo.db should be in control of every aspect of how a project sets up DB environment. its a framework14:51
viktorszzzeek: ok, so my question is - do you plan to add this file to oslo.db? Or we can you it?14:52
zzzeekthis is a big issue which means we have to go through every project using alembic and figure out what they need, then figure out what a common env.py looks like for them14:52
zzzeekcurrently im looking into oslo.db execption rewriting and baked queries14:53
viktorsthere is 4 projects in OS with use alembic at the monent14:53
zzzeekok14:53
zzzeekviktors: seems like we need a blueprint to do this dont we14:53
viktorsironic, barbican, neutron and sahara14:53
* SergeyLukjanov lurking14:53
viktorsSergeyLukjanov: https://github.com/openstack/sahara/blob/master/sahara/db/migration/alembic_migrations/env.py14:54
SergeyLukjanovviktors, yeah, I know :)14:54
viktorszzzeek: I'm not really sure about blueprint..14:55
zzzeekviktors: my understanding is that anythign that changes things for anyone needs a blueprint :)14:55
zzzeekwhy are we making this change, what is the rationale, who is impacted, etc. etc.14:55
zzzeekbut youve been here longer than me :)14:55
*** AAzza_afk is now known as AAzza14:56
zzzeekso you’d make the env.py for oslo.db14:57
viktorszzzeek: if we will file a specification, it should be more general, IMO14:57
zzzeekthen submit reviews to all of ironic, baribican, neutraon and sahara14:57
zzzeekall of which replace their env.py with “oslo.db env"14:57
zzzeekdo all those proejcts have oslo.db as a dependency already ?14:57
viktorszzzeek: their `env.py` are different, unfortunately14:58
viktorszzzeek: only neutron14:58
*** pcm_ has quit IRC14:58
*** pcm_ has joined #openstack-oslo14:59
*** james_li has joined #openstack-oslo15:00
zzzeekwell depends on differences.  if they all ultimatately call into run env in a similar way, in a transaction, etc. that part at least can be in oslo15:02
zzzeekbecause, waht we need for this specifcally is a way to inject our own DB connection stuff into the environment.   so oslo should have a vote in the process before alembic environment is actually called in env.py15:02
dhellmannkeep in mind the requirements of the projects not yet using alembic, too15:02
dhellmannkeystone and ceilometer may have multiple databases, for example15:02
dhellmannmultiple dbs with different schemas, that is15:03
*** nacim has quit IRC15:03
zzzeekdhellmann: yeah if they have migrations that run on multple dbs using a restructured env.py that is more complicated….but im still not getting my head around the whole use case all of this seems to be oriented towrads, that of unit testing migrations15:04
*** dims_ has joined #openstack-oslo15:04
dhellmannzzzeek: I know we test the migrations. I'm not sure of the details, I just noticed you guys talking about looking at existing projects for requirements.15:04
zzzeekbecause im not understanding things like “sql=True” in https://review.openstack.org/#/c/99965/13/oslo/db/sqlalchemy/test_migrations.py15:05
zzzeekviktors: well like i said if you just want to bypass env.py i can add that hook to alembic15:05
zzzeekviktors: but i think oslo.db should have control over the patterns used, probjects sohuldn’t make an env.py in isolation15:06
zzzeekbasically anytime a project is writing boilerplate in their app that is similar / the same to other apps, and it has to do with DBs, it should be in oslo.db instaed, and they should only have very high level declarations15:07
*** dims_ has quit IRC15:08
*** markmcclain has quit IRC15:10
i159zzzeek: about "sql=True". I don't know Alembic good enough, so it's just the way how it started to work. You welcome with suggestions.15:10
viktorszzzeek: I agree with you. But I don't know the best practices of alembic usage :)15:10
zzzeeki159: take out echo=True :)15:10
zzzeeki159: these fixtures arent tested then, is that right?  dont we test the fixtures also ?15:11
zzzeekviktors: OK the purpose of env.py is: 1. determine what database(s) we need to connect to;  2. determine which MetaData or MetaData’s we’d be autogenerating from; 3. call the Alembic Environment API with those two details.   that’s really it15:11
i159zzzeek: Are you talking about 99965 patch's mixin?15:12
zzzeekviktors: so we can make an oslo.db specfic API that simplifies that and handles the transactional scope and any kind of modifications to what DB is being conected to15:12
zzzeeki159: im looking at https://review.openstack.org/#/c/99965/13/oslo/db/sqlalchemy/test_migrations.py15:12
i159zzzeek: I have tested this mixin on Ironic15:13
zzzeeki159: the migrations there will be dumped into self.buf and not emitted to the DB, unless im missing something15:13
zzzeekbecause of sql=True15:13
zzzeekis that not waht’s being observed?15:13
rpodolyaka>>> i159: the migrations there will be dumped into self.buf and not emitted to the DB, unless im missing something - true :)15:14
rpodolyakabut that's not what we want15:15
rpodolyakai159: ^15:15
rpodolyakaas we *want* to issue those queries against the database15:15
rpodolyakato actually test the migration sctips15:15
viktorsrpodolyaka: what do you think about zzzeek's proposal as for env.py ?15:15
rpodolyakaviktors: ++15:16
rpodolyakaviktors: are you willing to volunteer? :)15:16
viktorsrpodolyaka: rather looking for volunteer  :)15:17
*** pblaho has quit IRC15:17
zzzeekall three of you have been submitting tons of migration / test stuff15:17
zzzeekthrow more coal on teh fire ! :)15:17
rpodolyakaheh15:18
viktors:)15:18
zzzeeki cant even follow it all15:18
viktorszzzeek: feel free to ask :)15:18
zzzeekthe subclassing and the test_XYZ everywhere, then it comes in as a dozen different reviews15:18
zzzeekviktors: Id need to just focus on it for a few days15:18
i159zzzeek: and suggest=)15:18
zzzeeki say, get it to work first15:18
rpodolyakait's probably not a good sign meaning the code is more complicated then it really should be15:19
zzzeekrpodolyaka: ive had trouble following test code everywhere, in all the proejcts ive looked15:19
zzzeekrpodolyaka: its not an oslo.db issue specifically15:19
viktorszzzeek: oslo.db proposal is to generalize code for work with database and make it better :)15:20
zzzeekviktors: yup15:20
zzzeekviktors: i wasnt focusing on tests/migrations first because it is the more thorny issue :)15:21
viktorszzzeek: so we can improve some feature (pretty migration testing, for example) in oslo.db and then re-use in in projects15:21
zzzeekviktors: so the things ive seen so far, look fine15:21
zzzeekthey are improvements15:21
zzzeekhere’s a vanilla env.py https://bitbucket.org/zzzeek/alembic/src/f38eaad4a80d7e3d893c3044162971971ae009bf/alembic/templates/generic/env.py?at=master15:23
zzzeekso you can see it 1. figures out what MetaData we might want to autogenrate from, if any, as its optional in any case 2. makes a decision based on —sql mode or not, doesnt seem like openstack really uses “offline” mode, 3. figures out where the DB is, connects, starts a transaction and calls run_migrations()15:24
zzzeekan oslo.db vesion of this would probably provide a function that does what run_migrations_online() does15:25
zzzeekso that it can control how the API is ultimately called15:25
zzzeeke.g. a facade15:25
zzzeek:)15:25
dhellmannzzzeek: if we could allow deployers to use offline mode and generate the SQL to run their own migrations, that might be good. I know there are some extremely large shops that do things like figure out how to hand-migrate their systems to avoid huge downtime blocking on updates to very large tables.15:27
dhellmanneven if they don't run them by hand, knowing what the migration is going to do can be helpful for capacity planning15:28
markmcflaper87, viktors, http://lists.openstack.org/pipermail/openstack-dev/2014-July/039291.html15:28
rpodolyakaunfortunately, some projects do crazy stuff in migrations scripts that requires us to use online migrations :(15:28
zzzeekdhellmann: I woudl agree, but at the same time it seems like some projects want to pursue extremely complex and interactive migration models, see https://review.openstack.org/#/c/102545/15:28
flaper87markmc++15:28
markmcflaper87, viktors, ^^ summary of the asyncio/oslo.messaging stuff15:28
zzzeekdhellmann:  a very elaborate system like that owuld be very difficult to reconclie with generation of —sql scripts15:29
viktorsmarkmc: are you looking for Victor Stinner? )15:29
markmcviktors, sorry, yes15:29
dhellmannmarkmc: I think you mean haypo15:29
markmcviktors, he's sitting beside me :)15:29
viktorsmarkmc: np15:29
dhellmannheh15:29
*** haypo has joined #openstack-oslo15:30
haypohey15:30
markmchaypo, http://lists.openstack.org/pipermail/openstack-dev/2014-July/039291.html :)15:31
dhellmannzzzeek: that sounds like an alternative approach to solving the problem of upgrading large live installations. My suggestion was just to expose information about what the migrations are going to do so deployers can look at it if they want to.15:31
openstackgerritIlya Pekelny proposed a change to openstack/oslo.db: Opportunistic migration tests  https://review.openstack.org/9342415:32
openstackgerritIlya Pekelny proposed a change to openstack/oslo.db: Implementation Alembic as migration engine  https://review.openstack.org/9996515:32
zzzeekdhellmann: this is straightforward if everyone is on the same system.15:32
*** praneshp has joined #openstack-oslo15:33
i159zzzeek: should we discuss now sumething else about oslo.db?15:36
zzzeeki159: is https://review.openstack.org/#/c/99965/14/migration/env.py specific to testing migrations only?  not actualyl running them ?15:37
dhellmannzzzeek: "same system" meaning "using the same approach"?15:37
zzzeekdhellmann: yes, some common API for migrations that knows how to delliver SQL scripts in a consistent way15:37
dhellmannzzzeek: ok, I think that's the goal15:38
zzzeekdhellmann: “offline” mode is difficult though when a system migrates to multple database connections in one go15:38
i159zzzeek: I have run it on Ironic, but it is not works yet, due to engine issue.15:38
dhellmannzzzeek: I don't know if that's something we do in keystone or ceilometer15:38
*** AAzza has left #openstack-oslo15:39
zzzeeki159: my q is, is this only for testing, and if so, why isnt the word “test” mentioned in the filename, the path, anywhere, its not clear that this file has anyhing to do with testing, other than that there is a hardcoded DB url in it, which I’ve come to assume is a “magic” value that is used in openstack projects15:39
zzzeekanother thing that confuses me, why tests/sqlalchemy/test_migrations.py and then oslo/db/sqlalchemy/test_migrations.py, is one a unit test file and the other a library for testing, or are htese both accessed directly by a test collector?  the convention test_XYZ.py indicates a file that is intended to be consuemd directly by  a test collector.  so then why is a test_XYZ file outside of tests?15:42
zzzeeki159: since you asked, these are things that make the code hard to follow15:42
zzzeekdhellmann: the work would be to take a survey of all migration environemnts, gather requirements so that an API that meets all of them can be constructed15:44
zzzeekdhellmann: one that relieves those projects of any kind of repetitive boilerplate or decision making as to how alembic should be used15:45
i159zzzeek: hardcoded DB url is just a plug (gag). env.py named as original one. This patch is deep in progress, its purpose at the moment is to uncover potential problems. When common approach will be clear, this patch will become good and clean as possible.15:45
dhellmannzzzeek: yeah, that will be a large project and should have lots of publicity so we get input from devs and deployers15:45
*** arnaud__ has quit IRC15:45
zzzeeki159: that’s great !  i was just pointing out why it confuses me :)15:45
i159zzzeek: I see =) Thanks you! Unfortunately I should go. Feel free to review. See you!15:46
zzzeeklater15:46
i159yep15:47
*** i159 has quit IRC15:47
zzzeekdhellmann: is there a reason we dont/cant use relative imports ?15:48
bknudsondhellmann: what do you mean keystone can have multiple dbs with different schemas?15:54
*** ihrachyshka has joined #openstack-oslo15:56
openstackgerritJoshua Harlow proposed a change to openstack/taskflow: Add proxy heartbeat support  https://review.openstack.org/10439715:56
dhellmannzzzeek: that's a project style decision, to keep things consistent, but I don't know the history15:57
dhellmannbknudson: aren't the different backends potentially in different databases? or are say identity and tokens both in the same db instance if they're both using the sql driver?15:57
dhellmannbknudson: I may just have misunderstood something...15:57
zzzeekdhellmann: so if i wnat to nix these ugly “from oslo.db.sqlalchemy” into just “from .” …. ? :)  http://git.openstack.org/cgit/openstack/oslo.db/tree/oslo/db/sqlalchemy/test_base.py#n2415:58
dhellmannzzzeek: no, there's a project-wide style guide that says to use absolute imports15:59
*** ildikov has joined #openstack-oslo15:59
zzzeekfor oslo you mean15:59
dhellmannzzzeek: for openstack15:59
Alexei_9871quick and stupid question about oslo.messaging: is it possible to do and RPC call/cast on fanout topic?15:59
zzzeekdhellmann: oh.  when you said “ a project style” somehow that sounded like “per project”15:59
dhellmannzzzeek: H304 "Do not make relative imports" - http://git.openstack.org/cgit/openstack-dev/hacking/tree/HACKING.rst16:00
*** mtreinish has joined #openstack-oslo16:00
zzzeekdhellmann: smash the system !16:00
dhellmannzzzeek: everyone has their least favorite hacking rule :-)16:00
bknudsondhellmann: they all have to be in the same database if they're in a database.16:00
zzzeekthe first rule of hacking rules is we do not talk about hacking rules16:01
bknudsondhellmann: you can have an LDAP backend, but then it isn't using the sql db16:01
dhellmannbknudson: yay! I misunderstood and it turns out things are easier than expected instead of harder!16:01
dhellmannzzzeek: I was wrong about the keystone db stuff ^^16:01
*** ildikov_ has quit IRC16:02
zzzeekdhellmann: my take on migrations right now is:  1. wait for ilya, roman, victor to get all their patches in and get dust to settle 2. spend a week understanding the whole issue better 3. propose anotehr round of improvemnts/enhancements as needed16:02
zzzeekdhellmann: they are moving too fast with things, if their stuff works then that is OK for now, getting a unified migration + testing + migration testing API will be iterative16:02
bknudsonwith the change for domain-specific backends there may be support for different db connection settings... but even then they'd have to be at the latest level.16:02
dhellmannzzzeek: that sounds like a good approach -- I expect it to take a fair amount of time to understand how all of the projects are actually using the db and to identify things we can/should do differently, so don't feel rushed16:02
zzzeekdhellmann: ive tried to poke into it and not felt like i was getting the whole picture16:03
dhellmannzzzeek, viktors, rpodolyaka: I haven't looked lately, but one thing we're going to need is lots of documentation on usage in the oslo.db doc tree16:03
*** ildikov has quit IRC16:03
dhellmannit may already be there, as I said I haven't looked recently16:03
dhellmanntime for lunch, bbiab16:04
*** mtreinish has quit IRC16:04
*** dhellmann is now known as dhellmann_16:04
*** mtreinish has joined #openstack-oslo16:04
*** dims_ has joined #openstack-oslo16:05
rpodolyakadhellmann: yeah, this is definitely the area we should improve in16:05
*** dims_ has quit IRC16:09
*** praneshp has quit IRC16:11
*** flaper87 is now known as flaper87|afk16:12
*** tkelsey has quit IRC16:18
*** dims_ has joined #openstack-oslo16:21
*** pcm_ has quit IRC16:26
*** pcm_ has joined #openstack-oslo16:26
*** zhiyan is now known as zhiyan_16:29
*** markmc has quit IRC16:31
*** dhellmann_ is now known as dhellmann16:44
*** stannie has quit IRC16:47
*** arnaud has joined #openstack-oslo16:52
*** Alexei_9871 has quit IRC16:52
*** ihrachyshka has quit IRC17:12
*** praneshp has joined #openstack-oslo17:13
*** tmcpeak has joined #openstack-oslo17:15
* bnemec watches as the oslo.messaging/asyncio thread goes right over his head :-)17:15
*** tmcpeak has left #openstack-oslo17:15
*** bnemec is now known as bnemec_appt17:15
dhellmannbnemec_appt: I'm glad to have experts on the case. :-)17:20
*** pcm_ has quit IRC17:30
*** pcm_ has joined #openstack-oslo17:31
dims_bnemec_appt, totally agree!17:37
*** praneshp_ has joined #openstack-oslo17:38
*** praneshp has quit IRC17:42
*** praneshp_ is now known as praneshp17:42
*** arnaud has quit IRC17:52
*** arnaud has joined #openstack-oslo18:02
*** arnaud has quit IRC18:02
*** pcm_ has quit IRC18:06
*** pcm_ has joined #openstack-oslo18:07
*** liusheng has quit IRC18:10
*** liusheng has joined #openstack-oslo18:11
boris-42dhellmann hi18:12
boris-42dhellmann I just finished work on version 0.2.0 https://github.com/stackforge/osprofiler18:16
boris-42dhellmann and I update README.rst18:16
boris-42dhellmann now it's much cleaner and simpler for understanding18:16
boris-42dhellmann I am going to test that everything still works after all these changes in real life (e.g. deploy openstack with patches and oslo.messaging changes)18:17
boris-42dhellmann and if everything is ok, I'll cut version 0.2.018:17
dhellmannboris-42: sounds good18:19
boris-42dhellmann so now NO API changes18:19
boris-42=)18:19
dhellmannnever say never...18:20
boris-42dhellmann I hope there won't be version 0.3.x at  all=)18:20
dhellmannboris-42: 1.0?18:21
boris-42dhellmann maybe is better then 0.218:21
dhellmannonly if you're sure you're ready18:21
boris-42dhellmann let's keep 0.2 I am sure18:21
boris-42dhellmann but not sure that community is sure=)18:21
boris-42dhellmann mostly I am worried about oslo.messaging stuff18:22
boris-42dhellmann and it's last one fundamental that is required18:23
*** arnaud__ has joined #openstack-oslo18:27
*** arnaud__ has quit IRC18:40
*** james_li_ has joined #openstack-oslo19:01
*** james_li has quit IRC19:04
*** james_li_ is now known as james_li19:04
*** arnaud__ has joined #openstack-oslo19:07
openstackgerritA change was merged to openstack/oslo-specs: Graduate oslo.concurrency  https://review.openstack.org/9729619:08
*** dims_ has quit IRC19:09
*** AAzza_afk has joined #openstack-oslo19:17
*** AAzza_afk is now known as AAzza19:17
*** arnaud__ has quit IRC19:18
boris-42dhellmann btw I have some question, about translations19:19
boris-42dhellmann why do we keep them in project trees?19:19
boris-42dhellmann e.g. nova repo now is really large19:19
*** SridharG has quit IRC19:19
boris-42And I think half of size are translations19:19
dhellmannboris-42: where else would you put them?19:20
boris-42dhellmann "nova-translations"19:20
boris-42dhellmann like we have *-specs19:20
dhellmannboris-42: the inputs for the catalog file come from the nova source code19:24
openstackgerritA change was merged to openstack/oslo-specs: Update adoption notes about Message objects  https://review.openstack.org/10423419:25
boris-42dhellmann yep agree19:25
boris-42dhellmann but does it mean that we should keep it together?19:26
*** AAzza is now known as AAzza_afk19:27
dhellmannboris-42: I don't think this is the most productive thing either of us could be doing right now. :-)19:30
boris-42dhellmann yep sure, I am not going to it know=)19:30
dhellmannboris-42: we would have to change a lot about how our packaging system works to move those files, for what I see as little benefit19:31
*** AAzza_afk is now known as AAzza19:38
boris-42dhellmann okay agree with that19:40
boris-42=)19:40
boris-42dhellmann thanks for review of spec19:40
*** ajo|mac has joined #openstack-oslo19:40
*** pblaho has joined #openstack-oslo19:49
*** jecarey has joined #openstack-oslo19:52
*** dims_ has joined #openstack-oslo19:53
*** AAzza is now known as AAzza_afk19:57
*** ajo|mac has quit IRC19:59
*** arnaud has joined #openstack-oslo20:03
*** pblaho has quit IRC20:08
*** pblaho has joined #openstack-oslo20:08
*** pblaho has quit IRC20:21
*** pcm_ has quit IRC20:21
*** james_li_ has joined #openstack-oslo20:23
*** james_li has quit IRC20:26
*** james_li_ is now known as james_li20:26
*** bnemec_appt is now known as bnemec20:27
jecareydhellmann: There's a bug in i18n in oslo-incubator that's fixed in the library, but I think it needs to be brought back.20:33
jecareyThe bug is that the _make_translation_func returns a method generated by checking lazy instead of a method that checks USE_LAZY at runtime.20:34
openstackgerritA change was merged to openstack/oslo-incubator: Allow test_lockutils to run in isolation  https://review.openstack.org/10447520:44
*** ihrachyshka has joined #openstack-oslo20:44
*** ildikov has joined #openstack-oslo20:53
*** zzzeek has quit IRC21:09
*** zzzeek has joined #openstack-oslo21:12
boris-42dhellmann tested new version21:15
boris-42dhellmann it works21:15
*** zzzeek has quit IRC21:15
*** zzzeek has joined #openstack-oslo21:20
boris-42dhellmann Ok I bumped it https://review.openstack.org/#/c/104691/121:30
*** james_li has quit IRC21:35
*** james_li has joined #openstack-oslo21:38
*** ajo|mac has joined #openstack-oslo21:43
openstackgerritJoshua Harlow proposed a change to openstack/taskflow: Move attribute dictionary to a dictionary type  https://review.openstack.org/10469521:46
*** ajo|mac has quit IRC21:48
openstackgerritJoshua Harlow proposed a change to openstack/taskflow: Move the stopwatch tests to test_types  https://review.openstack.org/10469821:52
*** ajo|mac has joined #openstack-oslo21:52
*** mrda-away is now known as mrda21:53
openstackgerritBoris Pavlovic proposed a change to openstack/oslo.messaging: Enable cross service profiling  https://review.openstack.org/10327122:06
openstackgerritpritesh proposed a change to openstack-dev/hacking: Add hacking check for editor configuration in source files  https://review.openstack.org/10196922:06
*** dims__ has joined #openstack-oslo22:13
*** dims_ has quit IRC22:15
openstackgerritpritesh proposed a change to openstack-dev/hacking: Add hacking check for editor configuration in source files  https://review.openstack.org/10196922:19
*** zzzeek has quit IRC22:20
*** yamahata has quit IRC22:41
*** harlowja_at_home has joined #openstack-oslo22:42
*** ajo has quit IRC22:48
*** ihrachyshka has quit IRC22:51
*** ildikov has quit IRC23:10
*** gmurphy has quit IRC23:13
*** gmurphy has joined #openstack-oslo23:15
*** alexpilotti has quit IRC23:19
*** james_li has quit IRC23:22
*** zzzeek has joined #openstack-oslo23:30
*** mtreinish has quit IRC23:31
*** tsekiyama has quit IRC23:32
*** mtreinish has joined #openstack-oslo23:39
*** oomichi has joined #openstack-oslo23:59

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