Monday, 2017-06-12

*** yolanda has quit IRC00:48
*** slaweq has joined #openstack-shade01:31
*** slaweq has quit IRC01:35
*** yolanda has joined #openstack-shade03:11
*** slaweq has joined #openstack-shade03:46
*** slaweq has quit IRC03:51
*** yfried has joined #openstack-shade03:53
*** yfried has quit IRC03:58
*** gkadam has joined #openstack-shade04:00
*** gkadam has quit IRC04:01
*** gkadam has joined #openstack-shade04:03
*** yolanda has quit IRC04:35
*** yolanda has joined #openstack-shade06:28
*** yolanda has quit IRC07:22
*** yolanda has joined #openstack-shade07:43
*** slaweq has joined #openstack-shade07:47
*** slaweq has quit IRC07:51
*** ioggstream has joined #openstack-shade08:02
*** yolanda has quit IRC08:03
*** yolanda has joined #openstack-shade09:23
*** cdent has joined #openstack-shade09:45
*** yolanda has quit IRC10:48
*** cdent_ has joined #openstack-shade10:59
*** cdent has quit IRC11:01
*** cdent_ is now known as cdent11:01
*** nokes has joined #openstack-shade11:31
*** noshankus has quit IRC11:32
*** nokes is now known as noshankus11:32
*** yolanda has joined #openstack-shade12:24
*** nokes has joined #openstack-shade12:26
*** noshankus has quit IRC12:27
*** nokes is now known as noshankus12:27
openstackgerritSamuel de Medeiros Queiroz proposed openstack-infra/shade master: De-client-ify Project Ops  https://review.openstack.org/47339412:39
samueldmqmorning shade12:39
mordredsamueldmq: morning! comment left for you12:43
samueldmqmordred: hey12:44
samueldmqmordred: thanks, that's useful12:44
mordred\o/12:44
samueldmqthere are a lot of things there I'd like to figure out12:44
samueldmqsee my comments (TODO,NOTE), as even gerrit review comments12:45
mordredkk12:45
samueldmqI might need to check the ksc code closer12:45
samueldmqgotta go afk for a bit, brb12:45
mordredkk12:49
*** gouthamr has joined #openstack-shade12:55
openstackgerritMonty Taylor proposed openstack-infra/shade master: DNM Test patch to find bug with nics  https://review.openstack.org/47345213:02
*** cdent has quit IRC13:20
*** cdent has joined #openstack-shade13:26
rodshttps://developer.openstack.org/api-ref/dns/?expanded=create-zone-detail#create-zone doesn't return a top-level container, yay for consistency13:27
mordredrods: \o/13:36
rodsmordred not a big deal just annoying because now I have to invert the params order here to make `key` optional https://github.com/openstack-infra/shade/blob/master/shade/meta.py#L57913:39
rodsunless we don't want to pass '' or None there when a top-level container is not needed to make it more explicit13:40
rodswhich I think wouldn't be a bad idea13:40
rodss/needed/present/g13:40
mordredrods: yah - maybe that - get_and_munchify(key=None, data=data)13:40
rodsya13:43
*** ioggstream is now known as ioggstrea14:31
*** ioggstrea is now known as _iogg14:31
*** _iogg is now known as ioggstrea14:31
*** ioggstrea is now known as ioggstream14:31
*** gkadam has quit IRC14:35
*** yolanda has quit IRC14:45
samueldmqmordred: shade functional tests is running on identity v3, correct?15:48
samueldmqare15:48
samueldmqI mean in the gate job gate-shade-functional15:48
samueldmqI guess we'd want to test mulitple versions in that15:51
mordredsamueldmq: we have jobs for both15:57
mordredsamueldmq: there is an env var that you can check in the functional tests - which you should find some examples of already15:57
openstackgerritRosario Di Somma proposed openstack-infra/shade master: Don't remove top-container for stack and zone REST API calls  https://review.openstack.org/47351715:58
*** slaweq has joined #openstack-shade16:15
*** slaweq has quit IRC16:19
samueldmqmordred: where do we test v2? gate-shade-functional-legacy?16:31
samueldmqyes, however it'd be great if we disabled identity v3 in those tests, to make sure only v2.0 is in use16:37
mordredsamueldmq: yes. and yes - we do some tricks to make sure shade doesn't use v316:38
morgansamueldmq: disabling v3 is likely going to be a bit weird.16:38
morganbut the tricks in shade are easier to use to ensure no v3 is used16:38
mordredmorgan: ++16:38
samueldmqwhere can I find those tricks?16:38
mordredsamueldmq: in the setup, we force v2 in the clouds.yaml - then we have a test that makes sure that shade doesn't detect v3 and use it anyway16:39
*** cdent has quit IRC16:39
mordredas long as the "use v2" env var is set16:39
morganwe could hook into the GETs and actually raise an exception (yay requests adapters) if a uri with /V3/ in identity is used16:39
mordred(so that we don't have to add that test to every test)16:39
samueldmqI mean, disabling v3 would be simple, but *could* make confusion maybe? since what we want to move is to v316:39
morgansamueldmq: yeah, i don't want to encourage in any test suite that v3 is optional16:39
morganv2, is going away, and therefore is.16:39
morganv3 is *not* optional, v2 is not really but shouldn't be used.16:40
samueldmqthat makes sense, for the sake of making the transition process less complicated (than what it already is)16:40
morgan++16:40
*** cdent has joined #openstack-shade16:41
morganmordred: maybe samueldmq can look into an adapter to add to requests/session object that can raise an exception (something we hook into ksa?) for testing that ensures v3 isn't used?16:41
mordredsamueldmq, morgan: https://github.com/openstack-infra/shade/blob/master/shade/tests/functional/test_devstack.py16:41
samueldmqI am not seeing anything telling shade it should be using v2 when -legacy16:41
morganand vice-versa16:41
* samueldmq https://github.com/openstack-infra/project-config/blob/a3685b02599da5b9ed1c5228e0c8b54287d64306/jenkins/jobs/shade.yaml#L37-L4416:41
morganmight be useful for any API transitions in openstack16:41
mordredtotally - that's the place in the tests where we verify that shade is testing what the test framework is requesting16:42
morgan"inspect uri, complain if pattern match shows inappropriate api is called"16:42
morganmordred: we should get samueldmq to weigh in on the KSA patch chain16:42
morganas well16:42
morgansince... you know +2 powers and smart dude.16:42
samueldmqthe one in the api discovery, correct?16:43
morgan(not that other keystone cores aren't smart, but he's here now!)16:43
morgansamueldmq: yeah.16:43
mordredsamueldmq: oh! thank you16:43
mordredsamueldmq: there is a bug in that test definition - it should also set SHADE_USE_KEYSTONE_V2=1 in the if legacy section16:43
mordredsamueldmq: if you can make a little patch there I can get it landed16:43
samueldmqmordred: exactly16:43
samueldmqsure, on it16:44
samueldmqmordred: thanks for the compliments16:44
mordredI missed setting that in the refactor16:44
samueldmqshade is fun16:44
mordredyay!16:44
mordredjust wait til y'all see the patch I'm writing right now based on an issue yolanda found :)16:44
* samueldmq makes popcorn16:45
morganmordred: i'm scurred16:46
morganmordred: today's running commentary is powered by Death Wish Coffee(tm). You should get some.16:47
mordredmmm16:52
samueldmqmordred: that coffee brand seems interesting17:00
samueldmqoops morgan ^17:00
samueldmqI need more chars to autocomplete you guys17:01
morgansamueldmq: hold on i'll make it more difficult17:03
*** morgan is now known as mordgan17:03
mordgansamueldmq, mordred: *shiftyeyes*17:03
samueldmqehhehe17:03
*** mordgan is now known as morgan17:03
samueldmqhe's gonna probably autocomplete himself now17:04
rodsafter https://review.openstack.org/#/c/473517/1 there are *just* other 72 tests to fix :)17:13
rodsmostly nova17:14
mordredrods: I'm doing create_server right now17:20
rodsmordred cool, I'm gonna work on the security group calls later in the evening17:23
samueldmqmorgan: mordred: ksa adapters are just like things we put in the services pipelines17:24
samueldmqis that correct?17:24
*** ioggstream has quit IRC17:24
samueldmqthat intercept the calls (in the order they're defined) and let them continue or not (or modify), whatever17:26
mordredsamueldmq: I'm not sure I fully understand your question ... but a ksa adapater has a session and then information about the service that wants to be used. so it knows how to find the base URL for a given service17:35
mordredsamueldmq: so if you have an adapter with service_type='compute', you can say get('/servers') and the adapter will translated that to GET https://compute.example.com/v2.1/servers17:36
samueldmqmordred: ah I thought you could combine adapters17:36
mordred(assuming https://compute.example.com/v2.1/servers is what's in the catalog and/or the resultof version discovery)17:36
samueldmqlike in a paste pipeline17:36
*** slaweq has joined #openstack-shade17:36
mordrednot really, no - it's all about encoding the base endpoint of a given service17:36
samueldmqah okay, so shade's raw_clients are adapters17:37
samueldmqcorrect?17:37
rodssamueldmq that's correct https://github.com/openstack-infra/shade/blob/master/shade/openstackcloud.py#L35417:39
samueldmqrods: nice, thanks17:39
*** slaweq has quit IRC17:41
samueldmqin https://review.openstack.org/#/c/473394/18:35
samueldmqI am mostly getting No mock address for the URL calls in our tests18:36
samueldmqdoes anyone have a tip on how to quickly fix that? (seems to be something simple I am missing)18:36
samueldmqdo I need to add all the URLs to the uri_registry one by one ? D:18:39
morgansamueldmq: you need to make sure everything is mcked out in the register_uris18:44
morganso.. yes18:45
morganif you look at other tests it models the entire process18:45
morganand they need to be in order in register_uris18:45
openstackgerritMonty Taylor proposed openstack-infra/shade master: Convert create_server mocks to request_mock  https://review.openstack.org/47355418:45
openstackgerritMonty Taylor proposed openstack-infra/shade master: RESTify create_server  https://review.openstack.org/47355518:45
morganso that you can do  the assert at the end of the test18:45
mordredsamueldmq, morgan, rods, Shrews: ^^ enjoy :)18:46
morganmordred: oh god18:46
mordredmorgan: actually wans't as terrible as I feared18:46
samueldmqoh wait, 433 lines touched in that test18:47
mordredsamueldmq: yah - step 1- convert from mocking novaclient to doing requests_mock but with novaclient still in place - that proves the http mocks in the test are correct18:48
mordredsamueldmq: step 2 - change the call from novaclient to compute adapter - preferrably not changing any of the tests18:49
mordredin this case, we do change the tests to remove an extra call novaclient injects that we don't need18:49
mordredbut we try to avoid that as much as possible18:49
mordredwe _could_ have that patch add the extra GET call itself and then do a third patch to remove the GET call and change the tests - but that seemed a little extra pedantic18:50
samueldmqyeah, could've been done in a third patch so it's clearer18:50
samueldmq++ but that seems to be fine (now that you explained18:50
samueldmqwhy do we have tests using requests_mock in shade if we were using the python-*clients19:00
samueldmqwhy did we have them before the restification work? did we check on the python-*client adapters?19:01
mordredsamueldmq: yah - before we started this, we were just mocking the calls to python-*client19:01
mordredsamueldmq: but the nice thing about moving to requests_mock is that we can express the thing we want to test in terms of the actual rest interactions19:01
mordredand it _should_ work whether we're using python-*client to do the REST for us, or doing it directly19:02
* mordred afks for a bit19:02
samueldmqkk gotcha19:03
samueldmqI was wondering why https://github.com/openstack-infra/shade/blob/master/shade/tests/unit/test_project.py#L142 was working19:03
samueldmqsince update_* in keystone are PATCH calls, and tehre is no PATCH registry in that test19:03
samueldmqhmm I like request_mock, it fails when the URLs called dont match exactly how you registered the URIs19:10
*** slaweq has joined #openstack-shade19:30
openstackgerritSamuel de Medeiros Queiroz proposed openstack-infra/shade master: De-client-ify Project Ops  https://review.openstack.org/47339419:55
mordredsamueldmq: https://developer.openstack.org/api-ref/identity/v2-admin/index.html?expanded=update-tenant-detail#update-tenant in v2, update tenant seems to be POST20:23
samueldmqmordred: just to make it more interesting, thanks20:24
mordredsamueldmq: :)20:28
samueldmqmordred: in grant_role https://github.com/openstack-infra/shade/blob/master/shade/operatorcloud.py#L167920:42
samueldmqwhat is that domain for? for the project? for the user? or are we assuming project and user are always in the same domain?20:42
mordredsamueldmq: it's for both at the moment if either user or project are passed by name20:44
samueldmqgotcha, just checking as that question appeared when I was fixing tests20:45
mordredsamueldmq: in the current api, if you want to do user and domain in different domains, you'd need to do a get_user and get_project call and pass those objects in as objects not names20:45
openstackgerritSamuel de Medeiros Queiroz proposed openstack-infra/shade master: De-client-ify Project List  https://review.openstack.org/47358120:45
mordredsamueldmq: yah - it's a good question - and worth considering whether we should add support for other things20:45
samueldmqmordred: ^ let's see how the functional tests like that20:46
mordredsamueldmq: and/or update the docs to be clearer20:46
mordredsamueldmq: woot20:46
samueldmqmordred: ++20:46
openstackgerritMonty Taylor proposed openstack-infra/shade master: RESTify create_server  https://review.openstack.org/47355520:47
openstackgerritMonty Taylor proposed openstack-infra/shade master: Don't fetch extra_specs in functional tests  https://review.openstack.org/47358320:47
openstackgerritSamuel de Medeiros Queiroz proposed openstack-infra/shade master: Improve grant docs on when and how use domain arg  https://review.openstack.org/47358921:03
samueldmqmordred: ^ I need to do it right away or I forget about it :)21:03
openstackgerritSamuel de Medeiros Queiroz proposed openstack-infra/shade master: De-client-ify Project List  https://review.openstack.org/47358121:08
*** gouthamr has quit IRC21:19
*** gouthamr has joined #openstack-shade21:39
*** slaweq has quit IRC21:47
*** slaweq has joined #openstack-shade21:47
*** gouthamr has quit IRC21:47
*** gouthamr has joined #openstack-shade21:48
*** gouthamr has quit IRC21:48
*** slaweq has quit IRC21:51
*** slaweq has joined #openstack-shade21:55
openstackgerritSamuel de Medeiros Queiroz proposed openstack-infra/shade master: De-client-ify Project Create  https://review.openstack.org/47360922:05
*** yolanda has joined #openstack-shade22:34
*** slaweq has quit IRC22:38
*** cdent has quit IRC22:38
*** slaweq has joined #openstack-shade22:38
*** cdent has joined #openstack-shade22:39
*** slaweq has quit IRC22:40
*** slaweq has joined #openstack-shade22:41
*** slaweq has quit IRC22:43
openstackgerritMonty Taylor proposed openstack-infra/shade master: Don't fetch extra_specs in functional tests  https://review.openstack.org/47358322:44
openstackgerritMonty Taylor proposed openstack-infra/shade master: Convert create_server mocks to request_mock  https://review.openstack.org/47355422:44
openstackgerritMonty Taylor proposed openstack-infra/shade master: RESTify create_server  https://review.openstack.org/47355522:44
openstackgerritMonty Taylor proposed openstack-infra/shade master: Add boot from volume unit tests  https://review.openstack.org/47361622:44
*** cmurphy has joined #openstack-shade22:46
*** gouthamr has joined #openstack-shade22:52
openstackgerritSamuel de Medeiros Queiroz proposed openstack-infra/shade master: De-client-ify Project List  https://review.openstack.org/47358123:13
openstackgerritSamuel de Medeiros Queiroz proposed openstack-infra/shade master: De-client-ify Project Create  https://review.openstack.org/47360923:38
*** cdent has quit IRC23:39
openstackgerritSamuel de Medeiros Queiroz proposed openstack-infra/shade master: De-client-ify Project Delete  https://review.openstack.org/47362823:52

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