Tuesday, 2017-03-28

*** jamielennox is now known as jamielennox|away00:54
*** jamielennox|away is now known as jamielennox00:59
*** larainema has quit IRC01:26
*** larainema has joined #openstack-shade01:27
openstackgerritAkira Yoshiyama proposed openstack/os-client-config master: Add allow_identity_admin to CloudConfig.get_session_endpoint()  https://review.openstack.org/45050001:47
jamielennoxShrews: sorry to miss this whilst you were actually here - it's _sometimes_ how it works03:45
jamielennoxfor almost every service in openstack if you do a list you see all the things in that project03:45
jamielennoxexcept in neutron, if you are admin and you list you see all the things in all the projects03:46
jamielennoxthat seems to be why there is a project= filter there at all03:46
jamielennoxso it's not a completely unreasonable change. for almost everyone using a non cloud-admin account they are getting that project specific behaviour03:46
jamielennoxin which case defaulting the project filter to the current scope is redundant but harmless03:47
jamielennoxhowever if you have an admin role and you list without that project it will do dumb things like try and modify networks in other projects - in which case setting project filter to current scope makes it behave like every other os_ module03:48
jamielennoxso changing the behaviour would only affect people who had admin role on the project they authed to, and generally make things sane when there are networks with the same name in multiple projects03:49
jamielennoxin which case we would ideally just remove the project= param altogether because now it just works like the other modules03:49
openstackgerritJamie Lennox proposed openstack/os-client-config master: Stop special-casing idenity catalog lookups  https://review.openstack.org/45025903:54
*** jamielennox is now known as jamielennox|away04:09
*** gouthamr has quit IRC04:23
*** jamielennox|away is now known as jamielennox04:30
*** yfried has joined #openstack-shade04:53
*** yfried has quit IRC04:59
*** jamielennox is now known as jamielennox|away06:36
*** yfried has joined #openstack-shade06:58
*** jamielennox|away is now known as jamielennox07:21
*** rcarrillocruz has joined #openstack-shade08:01
*** ioggstream has joined #openstack-shade08:04
*** yfried has quit IRC08:06
*** yfried has joined #openstack-shade08:06
*** yfried has quit IRC08:45
*** yfried has joined #openstack-shade09:27
*** ioggstream has quit IRC09:37
*** ioggstream has joined #openstack-shade10:16
*** ioggstream has quit IRC10:24
*** ioggstream has joined #openstack-shade10:39
*** ioggstream has quit IRC11:19
*** openstackgerrit has quit IRC11:33
*** yfried has quit IRC12:01
mordredjamielennox: yah - I believe that's the approach I was going for in other places12:16
mordredjamielennox: I've also been wanting a _general_ shade-wide approach for doing things in other projects - notmorgan started working on https://review.openstack.org/#/c/410453/ to make a dynamic project scope fixture for testing...12:17
mordredand we had chatted about adding a thing to shade once that's done to make it easy for admins to say something like with cloud.project_scope('some_project') as foo: foo.create_network() or something12:18
mordredbut we havent' gotten very far on that yet (that's also maybe not the right interfae for that either)12:18
*** openstackgerrit has joined #openstack-shade12:24
openstackgerritMonty Taylor proposed openstack/os-client-config master: Stop special-casing idenity catalog lookups  https://review.openstack.org/45025912:24
*** gouthamr has joined #openstack-shade12:46
openstackgerritMonty Taylor proposed openstack-infra/shade master: Move futures to requirements  https://review.openstack.org/45076512:49
openstackgerritMonty Taylor proposed openstack-infra/shade master: Move futures to requirements  https://review.openstack.org/45076512:52
Shrewsjamielennox: ah, that makes more sense. that sounds like something that maybe we should fix then12:56
mordredjamielennox, Shrews: we should also figure out if we can fix it in shade and get that logic out of the ansible modules13:09
Shrewsyeah, would be nice if we could do it in shade13:15
openstackgerritMonty Taylor proposed openstack-infra/shade master: Do not install test-requirements for ansible test  https://review.openstack.org/45080314:05
openstackgerritMerged openstack-infra/shade master: Move futures to requirements  https://review.openstack.org/45076514:25
*** ioggstream has joined #openstack-shade15:22
openstackgerritMonty Taylor proposed openstack/os-client-config master: Remove out of date comment  https://review.openstack.org/45087115:59
*** rcarrillocruz has quit IRC16:33
openstackgerritMerged openstack/os-client-config master: Stop special-casing idenity catalog lookups  https://review.openstack.org/45025917:21
*** ioggstream has quit IRC17:34
thingeemordred: yay shade independence coming!19:35
openstackgerritMerged openstack/os-client-config master: Remove out of date comment  https://review.openstack.org/45087120:00
*** gouthamr has quit IRC21:10
openstackgerritMonty Taylor proposed openstack-infra/shade master: Change metadata to align with team affiliation  https://review.openstack.org/45098121:12
*** gouthamr has joined #openstack-shade22:01
jamielennoxShrews, mordred: I'd be happy to do it in shade as well, i just figured it would be more of an api break there22:07
jamielennoxmordred: is there a reason that shade doesn't support security groups or just never got around to it?22:08
jamielennoxmordred: like adding and removing them for a host22:08
clarkbjamielennox: its not something we do since we open everything and then rely on local iptables. So likely just haven't had a need drive it yet22:09
jamielennoxclarkb: my need is basically that ansible's os_server takes security_groups as a param when creating a server, but if that list changes then they are not updated22:11
jamielennoxand from what i can see all this goes through shade and i shouldn't novaclient direct from os_server22:11
jamielennoxwould it be accepted if i wrote it?22:13
Shrewsjamielennox: shade supports security groups22:14
jamielennoxShrews: i can create them, but i can't see a way to assign them to a server22:15
Shrewsjamielennox: well, like you said, you can do it on create. but you want to update the security groups for an existing server?22:17
jamielennoxShrews:  yep22:17
Shrewsthat's something we missed. that should definitely be in shade rather than os_server22:17
Shrewsi guess update_server can't pass the right kwargs?22:18
jamielennoxoh - i don't know, i looked at how OSC does it and there is a specific API so i was trying to match that22:19
Shrewshrm, seems that only takes the two. what's the novaclient call to update the server groups?22:19
Shrewsif we already have that call in _tasks.py, then the thing that calls it should probably be the thing updated. if not, we could add a new shade api method, or maybe modify update_server()22:21
jamielennoxso not from https://developer.openstack.org/api-ref/compute/?expanded=update-server-detail but you'd really have to get into the source i think22:21
jamielennoxhttps://developer.openstack.org/api-ref/compute/?expanded=add-security-group-to-a-server-addsecuritygroup-action-detail#add-security-group-to-a-server-addsecuritygroup-action22:21
jamielennoxand yea, it's exposed in novaclient in a fairly obvious way22:22
jamielennoxhttps://github.com/openstack/python-novaclient/blob/master/novaclient/v2/servers.py#L175622:23
jamielennoxinterestingly it appears that add security group is the only API i've ever seen that _only_ takes a name, it doesn't look like you can pass a security group id even if you had it22:23
jamielennoxwhich is fun22:24
Shrewsso maybe a new add_server_security_group(), or put the smarts in update_server(). probably the former??? i haven't had dinner so i can't decide  :)  maybe mordred has a preference22:24
Shrewsand i've already proven twice today that my brain is broken22:24
jamielennoxi started to look at a add_security_groups_to_server22:25
jamielennoxname based on add_ips_to_server22:25
Shrewscool. feel free to name it something more clever22:25
jamielennoxbut there doesn't seem to be a standard22:25
Shrewswell, the add_router_interface() might be similar22:26
* Shrews needs to away for food now22:26
jamielennoxShrews: eat - thanks for the help22:27
mordredjamielennox, Shrews: I agree with the above - definitely should be an API call. If there is a sane way to also do it during update_server, cool- but it seems we might go nuts trying to do that :)22:33
jamielennoxmordred: for shade, what things need to be a task and which just a call?22:34
jamielennoxmordred: there are already calls like get_server and get_security_group that would need to be used a lot, but they don't seem to go via a task22:35
jamielennoxit doesn't look like there is any sort of list call so we would have to fetch each of those things individually and so potentially make a number of calls22:36
mordredjamielennox: there should be no new tasks made - and also no new code using novaclient22:38
jamielennoxmordred: damn, i thought i could slip in before the novaclient thing was finished22:38
mordredjamielennox: so - ideally just using self._compute_client - and there's no list call? (sigh)22:38
mordredjamielennox: I mean, you can - but using novaclient is honestly _harder_ because of unittests22:38
jamielennoxmordred: so i'm pretty sure i would need to add a list/add/remove22:39
mordredjamielennox: but - if you decide to use novaclient - it needs to go into a task22:39
jamielennoxmordred: do you have a patch up for novaclient -> ksa?22:39
jamielennoxhaving not done any shade work i'm copying patterns in functions around it22:39
mordredjamielennox: get_server_console uses ksa - as does list_flavors I believe22:40
jamielennoxok, will have a look at those specifically22:40
mordredjamielennox: I've been avoiding converting novaclient because that one is going to be _painful_22:40
jamielennoxand using ksa means i don't have to write tasks22:40
jamielennox?22:40
mordredjamielennox: correct. we have magical adapter wrapper that turns things into tasks for us22:41
jamielennoxi remember talking, didn't know how far you got - nice22:41
mordredjamielennox: for list- isn't the list just getting a server and seeing what groups it ha on it?22:41
jamielennoxyea - might be available on get server - not sure22:41
mordredjamielennox: we've actually managed to convert swift, glance, heat and magnum totally to ksa - and notmorgan is pretty far along converting keystoneclient - so we're not doing _terrible_22:42
jamielennoxi haven't figured out how to create a dev environ yet, just looking through it all22:42
mordredjamielennox: I frequently just open a repl and do "c = shade.openstack_cloud()" - then do poking at api calls with c._compute_client.get('/os-server-console') and whatnot22:43
jamielennox_compute_client gives you a novaclient or some wrapper around ksa?22:44
mordredksa22:44
jamielennoxmeh - i can figure that out22:44
mordredself._compute_client is the adapter mounted on compute endpoint - self.nova_client is the novaclient Client22:45
jamielennoxok22:46
jamielennoxis it reasonable for add_security_groups_to_server to take a list ?22:46
jamielennoxand probably remove22:46
mordredseems fine to me22:47
jamielennoxok, not sure how much time i've got for this one but it shouldn't be too hard22:48
jamielennoxfamous last words22:48
mordredjamielennox: well - if it winds up being too much overhead for you or you run out of time, just let me know and I'll be happy to add it for you22:49
jamielennoxmordred: if i don't have something up this week i'll pass it over22:49
mordredI'd love for you to be magically ramped up on shade internals - but also know you have more than one thing going on in your life :)22:49
mordredcool22:49
jamielennoxmordred: well, if it's a wrapper around a ksa interface i generally know my way around22:50
jamielennoxwith requests-mock for testing as well22:50
mordredyup! it's more our custom wrappers in both places I could see you headdesking over and being like "wtf?" :)22:51
jamielennoxheh, i won't look to closely22:51

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