Thursday, 2017-08-10

*** rods has quit IRC00:16
*** ioggstream has quit IRC01:10
*** gkadam has joined #openstack-shade03:41
*** gouthamr has joined #openstack-shade04:31
*** squid has joined #openstack-shade04:41
*** calebb has quit IRC04:43
*** squid is now known as calebb04:43
*** calebb has quit IRC04:52
*** squid has joined #openstack-shade04:53
*** squid is now known as calebb04:53
*** gouthamr has quit IRC05:16
*** yfried has joined #openstack-shade05:59
*** slaweq has quit IRC06:05
*** slaweq has joined #openstack-shade06:29
*** rods has joined #openstack-shade06:48
openstackgerritRui Chen proposed openstack-infra/shade master: Support to get resource by id  https://review.openstack.org/49208010:57
*** noshankus has joined #openstack-shade11:04
*** gkadam has quit IRC11:52
*** rods has quit IRC12:24
samueldmqmorning shade12:27
samueldmqmordred: what lib do you use as a grpc client so that it's possible to test oaktree12:27
samueldmq?12:28
samueldmqit might be great if I start adding some tests in that project12:29
mordredsamueldmq: if you look in devstack/test.py in the oaktree repo you'll see a small client script12:30
mordredsamueldmq: grpc libs produce their own client libs - so it's easy ;)12:30
*** slaweq has quit IRC12:31
samueldmqmordred: oh that's easy!12:31
samueldmqcreating functional tests for that seem easy then12:31
*** ioggstream has joined #openstack-shade12:31
*** slaweq has joined #openstack-shade12:32
mordredyes indeed, I agree!12:32
samueldmqmordred: why do we need a new repo to define the oaktree model? I have a couple of questions if you're up for a quick convo now12:35
*** slaweq has quit IRC12:36
samueldmqok. that adds protobuf into the mix, I need to learn that12:38
mordredsamueldmq: I stuck the model is in a separate repo because it is just the protofbuf definitions and the auto-generated code for python, c++ and go - it requires sepcial tooling to build12:38
mordredyah12:38
mordredthe library produced by oaktreemodel can be used by clients to connect as well as the server12:38
samueldmqmordred: so that generates the server and client versions for other languages too ?12:39
mordredoaktree itself is just the server - so it uses the oaktreemodel library for the grpc/protobuf definitions but actually connects those stubs with shade calls on the backend12:39
mordredsamueldmq: it does12:39
mordredsamueldmq: in oaktreemodel we actually commit the generated go sources to the repo, so that go get will work with it12:39
samueldmqmordred: why do we need that then? other languages would be able to use the oaktree grpc APIs, so we enable other languages that way12:39
mordredbut the build jobs can produce the python lib and c++ lib12:39
samueldmqwe wouldnt need ot run the servers in those languages12:40
mordredthat's right12:40
mordredthose are just for client bindings12:40
mordredsomeone can always just grab the grpc protobuf files and compile their own client - but it's easy enough for us to produce client libs for multiple languages - and that way we can test them in the gate too12:40
samueldmqmordred: so to use grpc you need to provide protobuf stuff that is used to build the clients12:41
samueldmqand then only that way the clients will be able to talk to your grpc server12:41
samueldmqis that correct?12:41
mordredthat's right in general - but when we produce client libs for people, those people dont' have to do any protobuf/grpc build steps themselves12:42
samueldmqI thought grpc was like, let's say soap, where there would be clients out in the wild there for different languages12:42
samueldmqone could just grab a generic client and use it12:42
samueldmqmordred: aha so you're going one step ahead. and making native clients for other languages12:43
mordrednope - grpc is strongly pre-typed - it's done for network efficiency12:43
mordredyah. exactly12:43
samueldmqas opposed to just enabling shade/oaktree to other languages12:43
mordredso someon eCAN just pip install oaktreemodel12:43
mordredand they don't have to do any grpc/protobuf things12:43
mordredor they can do a go depend on git.openstack.org/openstack/oaktreemodel12:43
samueldmqoh that's awesome, and they would have a native client for whatever language we provide already/they want to build a client for12:44
mordredbut - since it's grpc, if someone wants to do a language that we haven't made a client for, the grpc files exist and are public, so they can also build one themselves12:44
*** rods has joined #openstack-shade12:44
mordredsamueldmq: ++12:44
samueldmqmordred: I wonder if the model itself (objects oaktree server returns) should be with the server code (or in third repo?)12:46
samueldmqand the magic that does things for the various clients with protobuf etc would be a separate thing,as it looks to be12:46
samueldmqit sounds like let's say objects keystone return (abstract it is http api) but those objects are defined in ksc12:47
mordredsamueldmq: so - the thing with grpc is that there is no difference between the objects the server returns and the client uses12:48
mordredit's the exact same objects (which is one of the cool things)12:48
mordredso we COULD have oaktreemodel, oaktreeclient and oaktree - but oaktreeclient would not have much code in it12:48
mordredwe MIGHT still want to do that - and for go and C++ - because we might find that the gRPC api is too low-level and a 'nice' api wants to wrap it...12:49
mordredwe do this a LITTLE in model.py in oaktreemodel12:49
samueldmqmordred: yeah, but the distiction would be clear. (not much code isn't an issue, we show grpc is easy!)12:49
* samueldmq nods12:49
mordredyah - might be worth splitting those for that reason for sure12:49
samueldmqcool, and we're in a good timing to make those changes12:50
samueldmqI can probably get a mentee from Outreachy to work with us too. I mean, I will try12:50
*** slaweq has joined #openstack-shade12:51
samueldmqmordred: I will experiment it and we can probably have more of these interesting discussions at the pt12:51
samueldmqptg12:51
rodsmordred Hi, I'm back :)12:52
rodssorry I've been a little busy at work lately12:52
rodswhat's the next step? what can I help with?12:52
slaweqmordred: hello, can You check my patch https://review.openstack.org/#/c/491033/ ?12:53
openstackgerritMonty Taylor proposed openstack/oaktreemodel master: Add python make_client helper factory function  https://review.openstack.org/49252412:54
slaweqand take a look on https://review.openstack.org/#/c/491248 also - I don't know why QoS tests are still not running on functional tests12:54
slaweqmaybe You will have some idea what I missed here or in project-config repo12:54
mordredslaweq: ok. I'll look ...12:54
slaweqmordred: thx a lot12:54
slaweq:)12:54
mordredrods: welcome back! I _may_ have just signed us up for a new set of fun work ... but I need to write up thouhts on that12:55
mordredin the mean time - I have a maybe fun challenge if you're interested12:55
rodsmordred sure12:56
mordredrods: you know how we do the list then client-side filtering for get operations? well - we got a complaint over in the ansible modules that this is expensive/slow for more simple cases12:56
mordredso Rui Chen wrote this: https://review.openstack.org/492080 ... I'm not super crazy about it being the only interface to do that12:56
mordredrods: I was thinking we could make a flag for the constructor - like "use_direct_get" or something - that defaults to false12:57
mordredrods: but if it's true then the get_entity function could, if it is passed a dict with an id in it, use the get call instead of the list/filter12:57
rodsmordred ya, makes sense12:58
mordredrods: that way for consumers like ansible, we can always set that flag and people won't pay the cost of the list - but the code/interface in shade can remain consistent12:58
mordredrods: I looked at it briefly yesterday and was thinking that instead of passing the search method to get_entity, we could just pass the cloud object and resoure name - then have get_entity look for the flag, and do a getattr to find either get_{resource_name} or search_{resource_name} depending on the flag12:59
rodsmordred ok, I'll work on it13:00
mordredmaybe we go ahead and also accept the Rui Chen patch, so get entity can look for get_{resource_name}_by_id or search_{resource_name} - it's not terrible idea ot have an explicit method people can use13:00
mordredrods: awesome - thanks!13:00
mordredrods: also - if you get a chance, you might want to read the mailing list thread "[openstack-dev] [python-openstacksdk] Status of python-openstacksdk project"13:01
mordredrods: because I have just proposed adopting the openstacksdk project, making some changes to it and then potentially merging shade and openstacksdk into one library - you may have thoughts/feedback on such an idea13:01
rodsmordred will do , thx13:02
mordredslaweq: so - we're getting a neutron did not start: http://logs.openstack.org/48/491248/1/check/gate-shade-functional/9ab482d/logs/devstacklog.txt.gz#_2017-08-10_05_31_38_03713:16
mordredslaweq: I see we got qos into the service plugins: http://logs.openstack.org/48/491248/1/check/gate-shade-functional/9ab482d/logs/etc/neutron/neutron.conf.txt.gz13:17
mordredso that's good13:17
mordredslaweq: ah: http://logs.openstack.org/48/491248/1/check/gate-shade-functional/9ab482d/logs/screen-q-svc.txt.gz#_Aug_10_05_30_40_97534113:17
mordredslaweq: so it seems the qos driver wasnt found - does an additinoal library need to be installed or something?13:18
openstackgerritMonty Taylor proposed openstack/oaktreemodel master: Add glide dependency tracking files  https://review.openstack.org/49253013:18
openstackgerritMonty Taylor proposed openstack/oaktreemodel master: Symlink tools/test-setup.sh to bootstrap.sh  https://review.openstack.org/49253113:18
slaweqmordred: thx for help13:18
slaweqI forgot about it13:18
slaweqI will do another patch to project-config to fix it13:18
slaweqit would be better if there would be possibility to run shade on top of such patch from project-config to test it before merge13:19
slaweqdo You know if there is such possibility?13:19
slaweqI think that "Depends-On" is not enough for that13:19
mordredslaweq: there is not today - but there is in zuulv3 which we will be rolling out at the PTG13:21
mordredslaweq: lucky for us, we're also using shade as one of the projects to develop zuulv3 jobs, so I'll be making zuul v3 devstack-gate jobs very soon (start working on it today or tomorrow)13:22
mordredand that will make doing these things MUCH easier13:22
mordredin fact, maybe I'll get a simple version started and we can use this as a test case of whether it works :)13:22
slaweqok, we can use it as a test :)13:23
slaweqbut for sure we should fix it quickly because for now I think that I broke all functional tests for shade :(13:24
mordredoh - yah - we should fix that for sure13:30
slaweqmordred: ok, I will handle it today for sure13:34
slaweqI will ping You when patch will be in review13:35
mordredsweet13:59
*** gouthamr has joined #openstack-shade14:00
*** slaweq has quit IRC14:19
*** rods has quit IRC14:26
*** rods has joined #openstack-shade14:50
*** rods has quit IRC14:54
kmallocmordred: was looking at cache-control... I think we should just bake most of that stuff into ksa15:00
kmallocRequests-mock should do nothing of the sort, imo15:01
*** slaweq has joined #openstack-shade15:10
slaweqmordred: hello again15:11
slaweqI just pushed patch https://review.openstack.org/#/c/492567/ to add qos extension driver in functional tests15:11
slaweqit should be enough now :)15:11
slaweq(I hope)15:11
slaweqand funny thing is that IIRC I was author of code which validate required extensions and raise this exception which we have now in shade functional tests15:12
slaweqand I forgot about it :)15:12
*** yfried has quit IRC15:40
mordredslaweq: that happens to me all th etime :)15:43
mordredkmalloc: so - cache-control / requests-mock - the main issue there is that you can't use requests-mock to test something that uses cache-control because they both mount into the requests.session15:44
mordredkmalloc: the update I think we need to requests-mock is to figure out how to allow such mounted adapters to be stacked - so that what you'd wind up with (or could if you chose) was requests_mock mountde underneath cache-contrl15:46
mordredthat way in unittests you can still have requests_mock intercept the remote connection as it works currently for the times when cachecontrol decides that it does need to make a remote connection and not serve content from its local cache15:47
mordredthe main issue at hand is that since requests-mock would override cache-control you have no way to verify that you've plumbed cache-control into things correctly, or that a patch hasn't broken the cache-control integration. obviously in most cases you can assume cache-control is going to do its job properly and that shouldn't really be the subject of your unittests15:48
*** rods has joined #openstack-shade16:09
kmallocmordred: like i said, i think we should hook that into KSA at a low level16:50
kmallocor.. need requests to support layered adapters16:50
kmalloci don't think cache-control should be baked into requests-mock (at all)16:50
mordredkmalloc: I'm not following what you mean by "hook that into ksa"16:50
mordredoh - golly no16:50
mordredI totally agree - it should definitely not be baked into requests-mock16:51
kmalloccache-control is not great looking at it16:51
kmallocit's passible16:51
kmallocbake the caching constructs into ksa or make ksa able to leverage cache-control instead of needing to hook into requests as well. move the cache-stuff up a layer16:51
kmalloccache-control is beta-ish (by not great, it needs some more maturity)16:52
kmallocnot bad code.16:52
kmallocit *seems* like requests-mock should be at a lower level than cache-control16:52
mordredyah - so - there's other things that need both cache stuff and requests-mock that don't necessarily use ksa - so that would be an improvement for the ksa case, but wouldn't fix the larger issue16:52
mordredyes. I agree16:52
kmallocif we're battleing to be at the same level... we should work with requests16:52
kmallocit's likely an issue in how requests is limited in these ytypes of adapters16:53
*** slaweq has quit IRC16:53
mordredin a perfect world I believe we'd want requests_mock to be at the lower level than cache-control - so yeah, we might need to work with requests to solve this16:53
kmallocthat was what i was getting at16:54
mordredkmalloc: I mean, for now just adding cache-control header awareness to ksa would, I believe, be fine for all the cases we've actually got16:54
kmalloclooking into it, it looked like a limitation in requests.16:54
kmallocthe interface is simple.16:54
kmallocwhich is good... and bad.16:54
mordred++16:54
*** slaweq has joined #openstack-shade17:16
*** ioggstream has quit IRC17:42
*** yfried has joined #openstack-shade17:44
*** slaweq_ has joined #openstack-shade17:46
*** slaweq has quit IRC17:50
*** gouthamr_ has joined #openstack-shade17:51
*** gouthamr has quit IRC17:51
*** yfried has quit IRC18:17
*** rods has quit IRC18:42
*** rods has joined #openstack-shade18:45
*** openstackgerrit has quit IRC19:03
*** slaweq has joined #openstack-shade19:33
*** slaweq_ has quit IRC19:36
slaweqmordred: plop20:44
slaweqmordred: http://logs.openstack.org/48/491248/1/check/gate-shade-functional/d3fe2ef/logs/testr_results.html.gz20:44
slaweqit's better now20:44
slaweqat least functional tests are running and QoS tests are passing as expected20:44
slaweqmordred: sorry for this wrong patch which broke functional tests for shade20:45
mordredno worries - I'm glad we've got qos testing now ... now to figure out why the console log test is unhappy20:46
slaweqI think it's now related to Qos tests :)20:47
slaweqthere was some timeout reached20:47
*** gouthamr_ has quit IRC20:50
*** openstackgerrit has joined #openstack-shade20:58
openstackgerritMonty Taylor proposed openstack-infra/shade master: Make get_server_console tests more resilient  https://review.openstack.org/49268320:58
openstackgerritMonty Taylor proposed openstack-infra/shade master: Remove keystoneclient and ironicclient as direct depends  https://review.openstack.org/49268420:58
mordredslaweq: https://review.openstack.org/492683 should fix it - best I can tell it's a race-condition bug - we can test that thing in a more resilient manner20:59
slaweqmordred: I commented Your patch21:04
mordredslaweq: yah - so - chatted with mriedem a little bit in #openstack-infra ... in this case there actually was no console output for nova to report - my thinking is that making sure we're getting back the {'console': ''} payload is all we can safely test for - otherwise we're testing nova and devstack not shade ... but I could also see just letting unittest take care of it21:08
mordredShrews: ^^ you have any thoughts?21:11
slaweqmordred: I can agree that checking only if {'console': ''} was returned should be fine21:11
* Shrews reads sb21:12
slaweqbut I'm not sure then why You need this private method also21:12
mordredslaweq: the private method is becaue the normal method returns '' on http errors - so we wouldn't know in the test if we got a '' because nova did the right thing, or if the method just returned ''21:13
mordredslaweq: by splitting it and then using the private one - if we don't get {'console': str} back or have an http error, the method will fail and so will the test21:13
slaweqok, I understand21:13
slaweqso it can be like that for me21:14
Shrewsmordred: yeah, i don't think we should be testing content there21:14
openstackgerritMonty Taylor proposed openstack-infra/shade master: Make get_server_console tests more resilient  https://review.openstack.org/49268321:14
mordredof course, if I could write python correctly it would be better :)21:14
Shrewspffft21:14
slaweqmordred: some unit tests are also failing in this patch: http://logs.openstack.org/83/492683/1/check/tox-py35-constraints/c852b4b/testr_results.html.gz21:15
mordredyah - I changed the name of a variable and didn't change it everywhere :(21:15
slaweq:)21:16
slaweqmordred: sorry for my questions but IMO get_server_console will not return {'console': ""} in case of other HTTP errors21:18
slaweqit will then return None or raise exception, no?21:18
mordredyes - that's right - it will only return "" if it gets BadRequest21:19
slaweqok, and thanks this private method You will not get "" in such case bad BadRequest exception will be raised and test will fail for known reason21:20
slaweqsorry for many questions but now I understand it (I hope) :)21:21
*** gouthamr has joined #openstack-shade21:23
*** ioggstream has joined #openstack-shade22:06
*** openstackgerrit has quit IRC22:18
*** slaweq has quit IRC22:23
mordredquestions are good!22:28
*** openstackgerrit has joined #openstack-shade22:37
openstackgerritMonty Taylor proposed openstack-infra/shade master: Make get_server_console tests more resilient  https://review.openstack.org/49268322:37
openstackgerritMerged openstack-infra/shade master: Make QoS rules required parameters to be not optional  https://review.openstack.org/49103323:06
*** gouthamr has quit IRC23:12
*** slaweq has joined #openstack-shade23:23
*** slaweq has quit IRC23:28
*** ioggstream has quit IRC23:31
*** pabelanger has quit IRC23:47
*** pabelanger has joined #openstack-shade23:47

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