Earlier  
Posted Nick Remark
#openstack-nova - 2017-06-02
01:11:24 mriedem cfriesen_: or just create a new flavor for the test
01:11:37 openstackgerrit Merged openstack/nova master: Updated from global requirements https://review.openstack.org/470037
01:11:40 cfriesen_ mriedem: yeah, was just looking at that
01:17:04 cfriesen_ mriedem: is there a way to make a new flavor without needing to add new template files?
01:17:35 mriedem cfriesen_: yeah there is an api client used in the non-api sample functional tests
01:18:19 mriedem cfriesen_: something like this https://github.com/openstack/nova/blob/master/nova/tests/functional/integrated_helpers.py#L171 ?
01:18:44 melwitt you can checkout this badass functional test I wrote for an example https://review.openstack.org/#/c/355091/8/nova/tests/functional/test_boot_from_volume.py@54
01:19:22 mriedem cfriesen_: the api sample tests use that mixin i think https://github.com/openstack/nova/blob/master/nova/tests/functional/api_samples_test_base.py#L69
01:19:34 mriedem yeah, so you can re-use that method
01:19:38 mriedem to create a new flavor with what you need in it
01:19:49 mriedem even extra specs
01:20:22 mriedem although...the flavor ref is in the api sample request,
01:20:32 mriedem so things might get weird with subs
01:20:50 cfriesen_ I'll play with it, I guess
01:21:29 mriedem or modify that helper method to allow passing in a flavorid you define, which is some hard-coded uuid in your tests
01:21:38 mriedem and put that flavorid in the request samples
01:21:40 mriedem something like that
01:22:25 cfriesen_ realistically it would probably make sense for one of the default flavors to have extra specs just to test other code paths
01:22:34 mriedem thing is you'd have to delete the flavor between test cases, or add a check to make sure you don't try to create it if it already exists
01:22:46 mriedem yeah maybe, there is a flavor fixture
01:23:01 mriedem https://github.com/openstack/nova/blob/master/nova/tests/fixtures.py#L619
01:23:10 mriedem throw a new default flavor in that fixture maybe
01:23:14 cfriesen_ but I'm sure changing the fixtures would have wide ranging effects
01:23:18 mriedem note that could throw off other tests though
01:23:20 mriedem maybe
01:23:48 mriedem maybe do that in a separate change to see how big the change is
01:24:02 mriedem and then if it's not that bad, you do that separately, and then rebase your change on top of it to use that new flavor
01:24:14 cfriesen_ yeah, that'd be cleanest if it's not crazy
01:30:38 openstackgerrit Chris Friesen proposed openstack/nova master: add extra_specs to one flavor in test fixtures https://review.openstack.org/470076
01:32:05 openstackgerrit Takashi NATSUME proposed openstack/nova-specs master: Blacklist sphinx 1.6.1 and later https://review.openstack.org/470077
01:38:38 openstackgerrit Takashi NATSUME proposed openstack/nova-specs master: Blacklist sphinx 1.6.1 and later https://review.openstack.org/470077
01:56:11 cfriesen_ I tried creating some extra-specs in api_sample_tests/test_servers.py and got a 403 response. I'm guessing the tests are not run as an admin user?
01:57:56 cfriesen_ looks like it, I added "ADMIN_API = True" and now I can do it
01:58:10 melwitt yeah, you need something like "self.admin_api = self.api_fixture.admin_api" in setUp()
02:00:12 melwitt cfriesen_: I dunno if you saw my earlier link to a test that creates flavors, to use as an example. it might help https://review.openstack.org/#/c/355091/8/nova/tests/functional/test_boot_from_volume.py
02:05:07 cfriesen_ melwitt: can you mix the integrated_helpers stuff with the api samples tests though?
02:05:39 cfriesen_ melwitt: I've got the flavor extra spec creation working, now just trying to fix up the template matching
02:09:26 melwitt cfriesen_: oh, I didn't realize you were working on a api sample test. maybe not, I'm not sure
02:09:40 melwitt sounds like you're through the woods already anyway
02:10:46 cfriesen_ melwitt: I think so. it'd be nicer if the template/result comparison gave an error messsage better than "Failed to match Template to Response: Values do not match:"
02:11:18 melwitt yeah. I've worked on api samples a few times and it was frustrating
02:12:14 mriedem cfriesen_: if you're creating a new flavor with a dynamic id/name each time then i think the api samples are going to be hard
02:12:29 mriedem b/c the nova/doc/api_samples have to have something hard-coded for the actual api-ref docs
02:12:37 mriedem they can't have like %(uuid)s
02:12:40 cfriesen_ mriedem: I'm just adding extra-specs to flavor 1
02:12:53 melwitt if he's doing a new test he'll have new json that he can add the {uuid} matcher thing to, right?
02:13:10 melwitt oh
02:13:32 cfriesen_ or is that going to mess up other tests?
02:14:13 cfriesen_ If I have to make a new flavor I can do that, I think we can hardcode the flavor id
02:15:03 cfriesen_ all this just to put some extra-specs in the api sample
02:15:57 melwitt api samples, you just don't touch em
02:16:09 melwitt back away slowly
02:16:19 cfriesen_ it's all mriedem's fault
02:16:41 melwitt heh
02:17:24 cfriesen_ hmm...adding extra-specs to one of the default flavors really didn't break much at all: https://review.openstack.org/#/c/470076/1
02:18:12 cfriesen_ wonder if that's actually enough to use in functional tests
02:19:32 mriedem cfriesen_: i think that's your easiest bet
02:19:42 mriedem is modify an existing default flavor or add a new one with extra spec
02:19:52 mriedem then you can hard-code that flavor id into your samples
02:20:57 cfriesen_ I think that'll actually work
02:22:37 melwitt first I've heard of that
02:22:57 melwitt "constellations"
02:23:30 mriedem buckle up
02:24:29 melwitt heh
02:24:48 melwitt yeah, reading some of the comments. got sucked in
02:25:17 mriedem your boss is in there
02:25:22 mriedem bossing it up
02:25:30 melwitt I see that :)
02:32:25 openstackgerrit OpenStack Proposal Bot proposed openstack/nova master: Updated from global requirements https://review.openstack.org/470119
02:34:35 openstackgerrit OpenStack Proposal Bot proposed openstack/os-vif master: Updated from global requirements https://review.openstack.org/467173
02:44:50 openstackgerrit Chris Friesen proposed openstack/nova master: add new test fixture flavor with extra_specs https://review.openstack.org/470076
02:58:37 cfriesen_ when running functional tests is it possible to get debug logs emitted to somewhere? I'm getting a 400 status when I try to create a new server and I can't tell why
03:47:48 openstackgerrit Merged openstack/nova master: Add test ensure all the microversions are sequential in placement API https://review.openstack.org/458049
04:01:02 melwitt cfriesen_: run with OS_DEBUG = 1 tox ...
04:05:31 melwitt OS_DEBUG=1 tox ...
04:12:47 cfriesen_ melwitt: thanks, that's helpful
04:43:40 openstackgerrit Chris Friesen proposed openstack/nova master: add new test fixture flavor with extra_specs https://review.openstack.org/470076
04:51:29 openstackgerrit melanie witt proposed openstack/nova master: Add project_id and user_id to PUT /allocations https://review.openstack.org/469634
04:51:29 openstackgerrit melanie witt proposed openstack/nova master: Add database migration and model for consumers https://review.openstack.org/469633
04:51:30 openstackgerrit melanie witt proposed openstack/nova master: Add GET /usages to placement API https://review.openstack.org/469635
05:54:36 openstackgerrit Hironori Shiina proposed openstack/nova master: Ironic: Support boot from Cinder volume https://review.openstack.org/215385
05:57:10 openstackgerrit Huan Xie proposed openstack/nova master: XenAPI: use os-xenapi 0.2.0 in nova https://review.openstack.org/453493
06:10:59 openstackgerrit Chris Friesen proposed openstack/nova master: show flavor info in server details https://review.openstack.org/434514
06:12:51 openstackgerrit Chris Friesen proposed openstack/nova master: show flavor info in server details https://review.openstack.org/434514
06:19:35 openstackgerrit jichenjc proposed openstack/nova master: propagate OSError to MigrationPreCheckError https://review.openstack.org/469779
06:33:19 openstackgerrit Zhenyu Zheng proposed openstack/nova master: Support tag instances when boot(4/4) https://review.openstack.org/469800
06:53:29 openstackgerrit Zhenyu Zheng proposed openstack/nova master: Use plain routes list for os-consoles, os-console-auth-tokens endpoint instead of stevedore https://review.openstack.org/462175
07:26:41 openstackgerrit Zhenyu Zheng proposed openstack/nova master: Use plain routes list for block_device_mapping instead of stevedore https://review.openstack.org/462180
07:40:23 openstackgerrit Felix Ma proposed openstack/nova master: Handle bdm save failure in attach https://review.openstack.org/470181
07:50:19 openstackgerrit Michael Henkel proposed openstack/nova master: contrail: add vrouter VIF plugin type support https://review.openstack.org/441183
07:51:36 openstackgerrit Michael Henkel proposed openstack/nova master: contrail: add vrouter VIF plugin type support https://review.openstack.org/441183
08:27:20 openstackgerrit Zhenyu Zheng proposed openstack/nova master: Use plain routes list for user_data instead of stevedore https://review.openstack.org/462183
08:47:56 openstackgerrit Zhenyu Zheng proposed openstack/nova master: Support tag instances when boot(3/4) https://review.openstack.org/459593
09:16:41 cdent alex_xu: if you're still around, can you add a bit more detail on the scenario that would cause the duplicate problems in https://review.openstack.org/#/c/469578/ ? I had though that the combination of the local process lock, and the writer transaction would handle it? Are you concerned about the situation where there are different versions of the os-traits library on different machines?
09:38:05 openstackgerrit sean mooney proposed openstack/os-vif master: set mtu on all code paths https://review.openstack.org/469951
09:39:08 alex_xu cdent: I mean when multiple placement-api deployed on multiple nodes. When two users request to list traits, both of them will trigger the sync
09:39:36 alex_xu only one of them can sync successfully
09:39:51 alex_xu the transaction doesn't help that case I think
09:40:03 cdent that's the part i don't understand, why not?
09:40:14 cdent I had thought the transaction would?

Earlier   Later