Earlier  
Posted Nick Remark
#openstack-nova - 2017-05-24
19:41:23 sdague the biggest issue was the way the magic oslo.db stuff worked for that iirc
19:41:30 mriedem i'll poke
19:41:33 sdague it's honestly I think better to just ship the patch
19:41:40 mriedem maybe i can just extend test_base.MySQLOpportunisticTestCase
19:41:59 sdague mriedem: there was something weird about that when I tried
19:42:08 melwitt too bad there's not a sqlite pragma for that
19:43:32 sdague mriedem: https://review.openstack.org/#/c/283364/ that's a restore of an attempt to go down that path
19:43:39 sdague maybe it was working, but the fix never landed
19:44:04 sdague mriedem: the issue was about tricking engine fascade I think
19:44:39 mriedem trying it
19:44:42 sdague mriedem: anyway, that might be useful to build the pattern from
19:45:13 mriedem which mysql package do we need?
19:45:16 mriedem mysql-server?
19:46:10 mriedem bindep has both the server and client
19:46:16 mriedem but for some reason they fail to install on 16.04
19:46:50 mriedem ah here we go
19:49:01 ckopper mriedem: concerning the img_hide_hypervisor_id feature: there one more flag that needs to be set to hide the hypervisor for Windows VMs (not necessary for Linux). (<hyperv><vendor_id state="on" value="FakeID"/></hyperv>). Is this something that should go into a separate patch or would it be appropriate to add this as a comment to the current code review?
19:49:18 ckopper (thanks again for pointing me to it!)
19:49:21 mriedem ckopper: please comment on the review
19:49:25 ckopper thanks
19:52:52 mriedem sdague: do you remember if you had to do any special creds tweaking with the mysql server or anything locally to get it to connect?
19:53:05 mriedem i thought there was a special userid/password or something
19:54:01 mriedem ah
19:54:01 mriedem For the opportunistic testing you need to set up db's named 'openstack_citest'
19:54:01 mriedem with user 'openstack_citest' and password 'openstack_citest' on localhost.
19:55:42 sdague yep, that
19:55:50 mriedem also, tools/test-setup.sh
19:58:28 cdent mriedem, sdague, melwitt (whatever other cores are around): this https://review.openstack.org/#/c/456198/ is a fix to tooling used by the placement api-ref that makes the tooling work with multiple inc files instead of just one monolithic file. getting it merged will allow some placement api-ref work to proceed more easily without needing to be in the same stack
19:59:08 sdague +2
19:59:19 cdent thanks
20:01:11 cdent thanks melwitt and dansmith
20:01:30 dansmith two +Ws means you skip the gate I think
20:01:35 cdent \o/
20:01:43 melwitt heh, secret code
20:08:28 mriedem sdague: EngineFacadeFixture isn't in nova, is that part of your patch series somewhere?
20:09:26 mriedem huh removed here
20:09:27 mriedem https://review.openstack.org/#/c/434843/2
20:10:45 sdague mriedem: yeh, so I guess there is an oslo.db solution now?
20:10:51 mriedem yeah looking at ReplaceEngineFacadeFixture
20:12:54 mriedem it at least connected to my local mysql server which is progress
20:15:41 melwitt dansmith: is this true that online_data_migrations runs in the background after the command exits? someone working on a man page entry https://review.openstack.org/#/c/464634
20:15:54 dansmith no
20:16:20 melwitt okay, I didn't think so
20:16:21 mriedem there is no scheduling
20:16:24 mriedem or queueing
20:17:13 dansmith which is kinda the point
20:18:01 openstackgerrit Kevin Benton proposed openstack/nova master: WIP: Bulk query floating IPs in _nw_info_get_ips https://review.openstack.org/465792
20:21:14 mriedem i'm lost as to how to use the oslo.db opportunistic test fixture stuff
20:24:17 melwitt this is all I found about it https://specs.openstack.org/openstack/oslo-specs/specs/kilo/long-lived-transactionalized-db-fixtures.html#opportunistic-urls
20:26:04 sdague mriedem: if you put up a partial patch, I might play in the morning
20:27:30 mriedem ok yeah b/c i'm going to have to give up on this soon
20:28:17 sdague that's fine, having something to chew on over coffee in the morning is usually useful
20:42:58 mriedem zzzeek: i'm strugglying trying to use OpportunisticDBTestMixin to get a mysql-backed test running
20:43:19 mriedem i've got a test extending OpportunisticDBTestMixin and defining FIXTURE = test_fixtures.MySQLOpportunisticFixture
20:43:26 zzzeek mriedem: OK...are there no existing tests using it?
20:43:28 mriedem but teardown complains about not having a schema attribute on the test
20:43:30 mriedem nope
20:43:33 mriedem well,
20:43:48 mriedem our db schema migration tests do some stuff, but i can't make heads or tails of those
20:44:13 mriedem going through the setup code in oslo.db totally gets me lost
20:44:29 zzzeek mriedem: yeah
20:44:42 zzzeek mriedem: are you mixing in test_fixtures.OpportunisticDBTestMixin,
20:44:42 zzzeek oslo_test_base.BaseTestCase ?
20:44:57 mriedem not the BaseTestCase
20:45:25 zzzeek mriedem: try sticking "SCHEMA_SCOPE=None" on your test class ?
20:46:15 mriedem trying it
20:46:36 zzzeek mriedem: hmmm that's not it
20:46:40 zzzeek mriedem: stack trace ?
20:48:13 zzzeek mriedem: oh. this is all deprecated stuff anyway. you on newish oslo.db ?
20:48:21 mriedem yeah i'm trying to use the fixtures
20:48:22 zzzeek mriedem: e.g. dont need to backport to mitaka ?
20:48:33 mriedem with our nova base TestCase code
20:48:36 mriedem which has it's own DatabaseFixture
20:48:58 mriedem i started copying this https://review.openstack.org/#/c/283364/6/nova/tests/functional/regressions/test_bug_1538011.py but that's extending a deprecated test class in oslo.db
20:49:08 zzzeek mriedem: yeah i was goign to go in there and change it all a while back, a lot of this fixture stuff had nova in mind.
20:50:01 mriedem getting this back to where i started and then i can push it up
20:51:09 jose-phillips hey
20:51:27 jose-phillips someone now how to set a metadata with python novaclient
20:51:29 zzzeek mriedem: yeah i need stack trace to work w/ this here
20:51:38 zzzeek mriedem: need to see where it looks for .schema
20:51:51 jose-phillips should be nova.aggregates.set_metadata (openstackId,metadata) ?
20:51:59 zzzeek mriedem: id guess your fixture is mixing in stuff from your existing fixture stuff ?
20:52:19 mriedem zzzeek: yeah
20:52:50 mriedem hmm, maybe this worked for https://review.openstack.org/#/c/283364/6/nova/tests/functional/regressions/test_bug_1538011.py because it wasn't pulling in our TestCase default setup in nova
20:53:03 zzzeek mriedem: you'd need to start totally clean first. i had a plan to totally rewrork nova's fixtures at some point
20:53:05 mriedem which means i'd have to reinvent some things in my test
20:53:10 mriedem ok yeah
20:53:11 mriedem bummer
20:54:13 sdague zzzeek: is there a way we can get some version we can use with our existing fixture set?
20:54:39 zzzeek sdague: of course
20:55:11 sdague we do have this class of mysql related issues that would be good to have a pattern to write regressions for
20:55:27 zzzeek sdague: id have to look at it again to see if the base fixture had some patterns that werent' going to work. the main one is that weird way you rebuild the sqlite schema using a dumpfile
20:55:56 sdague zzzeek: yeh, but that isn't used in the NoDBTestCase
20:57:39 zzzeek sdague: if mriedem wants to give me code I can re-familiarize with everything and what nova looks like today and get his test to run
20:58:40 zzzeek sdague: i had a lot of ideas for fixing nova's DB fixtures and a lot of what is in oslo_db today is based around being able to do that w/ maximum flexibility
21:00:13 sdague zzzeek: sure, I don't know where that stands. All I've got is the code I abandoned, that used the old fixture that he linked https://review.openstack.org/#/c/283364/6/nova/tests/functional/regressions/test_bug_1538011.py
21:00:54 sdague the preamble that gets to the point of being able to run migration.db_sync(database='main')
21:01:04 sdague is kind of what needs to be figured out
21:01:17 mriedem i'm close
21:01:27 zzzeek sdague: are these the tests you want to run?

Earlier   Later