Friday, 2017-02-10

clarkbhow do you coordinate betamax across multiple services?00:01
clarkblike that a thing?00:01
clarkbfor example booting from volume based on an image is going to hit all the apis00:02
clarkbnova, neutron glance cinder keystone maybe swift00:02
mordredclarkb: yah - it doesn't matter - betamax (And requests_mock) is mocking at the requests.Session level00:21
mordredclarkb: all of teh client libs (where we're using them) and the direct calls all use a shared Session00:22
mordredclarkb: so the betamax file just has full URLs for things00:23
mordredclarkb: example (abandoned): https://review.openstack.org/#/c/343916/3/shade/tests/unit/fixtures/citycloud/test_create_flavor.yaml00:23
mordredalso the fact that create flavor serializes to 9334 lines of yaml with json payloads as multiline strings is ... well ... it's a bit verbose00:25
mordredmorgan: ooh - I just had an idea for a different betamax serializer format ...00:26
morganmordred: "pirate"-formatter00:27
morganmordred: it uses "Ar" to make the stuff smaller?00:28
mordredmorgan: a run-parts-style directory - file per request and response - with {index}-{verb}-{serialized_url}.{request|response} - and then the files are first time VERB url, followed by headers/body in rfc822 format00:28
morganmordred: /me sees self out00:28
mordredit's not terribly hard to write or parse, but reading it should be super easy on the eyes00:28
morganmordred: i was thinking that early on, and then we use tar to bundle it into a single file in the repo00:28
mordredsure - or it could just be a billion files if you wanted - but yah00:28
morganmordred: tar (optional)00:28
mordredshould be nice and easy to browse an interaction that way00:29
morganbut if a single test was a tar file of responses... it would be nicely encapsulated00:29
mordredyup00:29
morganand easy to view if you needed to dig in00:29
morganand highly compressible00:29
morgansince.. text00:29
morgana00:29
mordredyup00:29
morganand mostly whitespace at that00:29
clarkbjust remember to let git do the compression for you :)00:33
*** jamielennox is now known as jamielennox|away01:07
*** jamielennox|away is now known as jamielennox01:21
*** gouthamr has quit IRC04:33
*** gouthamr has joined #openstack-shade04:55
*** gouthamr_ has joined #openstack-shade04:57
*** gouthamr has quit IRC05:00
*** yfried has joined #openstack-shade05:44
*** gouthamr_ has quit IRC05:52
*** yfried has quit IRC06:25
*** ioggstream has joined #openstack-shade08:31
*** openstackgerrit has quit IRC10:18
*** ioggstream has quit IRC12:25
thingeemordred: re fujitsu cloud, yeah got a notification on you responding to that. ugh...12:40
*** ioggstream has joined #openstack-shade13:23
mordredthingee: yah. :(13:33
Shrewsmordred: oh wow. bad fujitsu13:37
*** gouthamr has joined #openstack-shade13:56
mordredmorgan: two thoughts inspired by your patches14:04
*** Shrews has quit IRC14:29
*** Shrews has joined #openstack-shade14:32
*** yolanda has quit IRC15:38
*** yolanda has joined #openstack-shade15:38
mordreda) we should maybe make a method on OpenStackCloud that's similar to the first 2 things in _get_mock_url that gets an endpoint for a service type (I frequently dig in to the session directly to grab that as well)15:40
mordredb) it might be nice to extend self.register_uri to include a service param - so that you could say "self.register_uri('GET', 'identity', '/users')" and have the _get_mock_url piece you've got there be in the base class (the way I did this for nova urls is wonky and gross)15:46
*** openstackgerrit has joined #openstack-shade15:48
openstackgerritMonty Taylor proposed openstack-infra/shade master: Add accessor method to pull URLs from the catalog  https://review.openstack.org/43235815:48
openstackgerritMonty Taylor proposed openstack-infra/shade master: Add request validation to user v2 test  https://review.openstack.org/43236616:06
mordredmorgan: ^^ also, that second patch is an example of doing request validation as well16:13
openstackgerritMonty Taylor proposed openstack-infra/shade master: Add all_projects parameter to list and search servers  https://review.openstack.org/43238216:58
*** stevemar has left #openstack-shade17:10
*** cdent has joined #openstack-shade17:45
*** yolanda has quit IRC18:14
*** yolanda has joined #openstack-shade18:16
*** ioggstream has quit IRC18:21
*** cdent has quit IRC18:34
morganmordred: yeah i was going to a pass on the validation bit when nuking keystoneclient18:34
morganmordred: i figured keystoneclient knows how to format things sanely18:34
morganmordred: if it doesn't... :P18:35
mordredmorgan: yah - but we want to put the test there so that when we replace ksc with rest the tests don't change and we validate that our new code correctly submits the right thing18:54
morganmordred: dude......................19:01
morganmordred: when we drop ksc we can be a ton less chatty19:01
morganmordred: yeha my plan was convert to mock_requests, add validation, drop ksc19:01
morganin that order19:01
morganjust to try and keep the code more reviewable19:02
morganbut i can bundle mock_requests + validate19:02
morganThis is just silly:19:02
morganhttps://www.irccloud.com/pastebin/zvkzqgxA/19:02
morganget users, get user, put user, get user, put user, get user19:03
morganthat is absurd.19:03
morganwell it's stupid cause OS-KSADM for password... which afaict isn't needed now19:04
mordredmorgan: yes to less chatty :)19:05
morganthen again this whole V2 thing is still so awful to work with19:06
morgan=/19:06
mordredmorgan: well, luckily v3 coverage on public clouds seems to actually be quite good19:06
mordredmorgan: I was pleasantly surprised yesterday at how well it was covered19:07
* morgan nods.19:07
morganoh ugh, i... i think i need to rebase a bunch of the stuff into a merged tree inc. your new change for the validate bits19:08
morganmordred: uh. validate=<blah> does nothing atm19:34
morganfyi19:34
morganwe're not actually using that anywhere19:34
* morgan just checked with bogus values19:34
morganand it still passes19:34
mordreduhm - it totally does19:35
mordredbecause I started that patch with validate=dict(json={})19:35
mordredand then looked at the diff that was reported in the error19:36
morgani just put a bogus dict in and the test(s) still pass19:36
morganoh blah19:37
morganit only works if you specify as json=19:37
morganwe should make that more intuative.19:37
mordredvalidate takes more than just json ... but yeah- we should maybe throw an error if you pass an unknown key to validate for sure19:38
morganexactly19:38
mordredyou can also validate headers and whatnot19:38
morganoh weird19:41
morganlooks like keystoneclient does a blank put for an update on a v2 password update19:42
morganso it does: password-update, then update19:42
morganweeeiirrdddd19:42
mordredmorgan: wow. WHY???19:43
morganwell, i was just doing a password change19:43
morgannot a full user-update19:43
morganor shade is doing something wonky19:43
morganbut if i do cloud.update_user(id, password=newpassword)19:43
morganit does a put to the OS-KSADM then it does a put to the user19:43
morganbut the user put is empty19:43
morganweeeeiiirrrdddd19:44
mordredoh - I wonder19:44
mordredif it's because it's just going through an update flow19:45
mordredand passwords get changed differently19:45
morganit is.19:45
morganbut keystoneclient is very picky about password changes19:45
mordredso it's doing the blank put because there is nothing to update for theuser19:45
morganyep19:45
morganultra-chatty for ultra-chatty reasons19:45
mordredI wonder if that's shade's fault of kscs?19:45
morganboth19:45
morganshade doesn't have an update_password function19:45
morgankeystoneclient is dumb and does an update in a way for password that is no longer needed19:46
morgansince it's all rolled into put on the user resource19:46
mordredgotcha19:46
morganbasically put v2.0/users/<id>/OS-KSADM/password just normalizes password and then passes the EXACT reqeust to update_user internally19:46
morgan*lol*19:46
morganon the keystone server side19:46
mordredso we could, in shade, put an "if kwargs not empty: UserUpdate" to skip the second empty put19:47
morganyep19:47
morganand this is v2-only19:47
mordredyup19:47
morganin v3 it is only 1 call19:47
morganAND in v3 if it is a user changing his/her password it's totally different than admin password change19:47
Shrewsthis channel is too darn chatty. it's like you all are doing work or something19:48
morganShrews: Welcome to OpenStack facts, you will now be spammed with useless openstack trivia19:49
* mordred throws a morgan at Shrews19:54
dtroyerOpenStack Fact: Nova was named after a bar, but Keystone wasn't.20:48
* dtroyer retreats to goland for the weekend20:48
openstackgerritMorgan Fainberg proposed openstack-infra/shade master: Add request validation to user v2 test  https://review.openstack.org/43236621:53
openstackgerritMorgan Fainberg proposed openstack-infra/shade master: Convert test_users to requests_mock  https://review.openstack.org/43247221:54
*** gouthamr has quit IRC21:56
openstackgerritMorgan Fainberg proposed openstack-infra/shade master: Move mock utilies into base  https://review.openstack.org/43248722:41
*** jamielennox is now known as jamielennox|away22:58
morganmordred: wow, keystoneclient could be a lot more efficient23:00
morganwe do a list... so we can do a get23:00
morganwtf23:00
*** gouthamr has joined #openstack-shade23:20
morganmordred: uhm23:24
morganwhat causes "failed to delete domain" error... seems like no exceptions are being translated to that?23:25
morganoh23:26
morganblargh. that is an issue in shade23:26
morganyeah... this behavior is not possible23:27
morganafaict, you should never get "failed to delete domain", it isn't translating proper errors23:28
morganoh wait.. nvm23:28
morganmy bad23:28
morganmordred: so yeah, there is a case that is not well handled by cloud.delete_domain, the fact that a patch is needed first and could fail, you might want to translate that to a domain delete failure as well23:31
*** jamielennox|away is now known as jamielennox23:50
openstackgerritMorgan Fainberg proposed openstack-infra/shade master: convert test_domain to use requests_mock  https://review.openstack.org/43249523:50
openstackgerritMorgan Fainberg proposed openstack-infra/shade master: convert test_domain to use requests_mock  https://review.openstack.org/43249523:51
morganmordred, Shrews: thoughts on restructuring shade's tests to be: tests/<service>/test_case_file23:56
morganmordred, Shrews: such as tests/identity/test_[domains|project|users|identity_roles/roles|....]23:56
morganinstead of flat like it is23:57
morganit would make it easier to say run all of shade's tests for <service> at once23:57
* morgan takes a break.23:58

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