16:00:04 #startmeeting cinder-nova-api-changes 16:00:04 Meeting started Thu Dec 7 16:00:04 2017 UTC and is due to finish in 60 minutes. The chair is ildikov. Information about MeetBot at http://wiki.debian.org/MeetBot. 16:00:05 Useful Commands: #action #agreed #help #info #idea #link #topic #startvote. 16:00:08 The meeting name has been set to 'cinder_nova_api_changes' 16:00:11 johnthetubaguy jaypipes e0ne jgriffith hemna mriedem patrickeast smcginnis diablo_rojo xyang1 raj_singh lyarwood jungleboyj stvnoyes 16:00:29 @! 16:00:29 <_pewp_> jungleboyj (。・∀・)ノ 16:00:48 o/ 16:01:10 I don't think we can expect too many more for today 16:01:16 so let's do a quick recap 16:01:24 on this week's happenings 16:01:41 we have progress on the new attach patch in Nova, special and many thanks to mriedem 16:01:57 * jungleboyj claps. 16:01:58 this is how the field looks like right now: https://review.openstack.org/#/q/topic:bp/multi-attach-volume+(status:open+OR+status:merged) 16:02:13 don't get caught up on the topic 16:02:47 mriedem: so the question on my side now is that what's missing to be able to land the new attach patch and who's gonna do it? 16:03:18 i will approve it once tests all pass 16:03:23 however, 16:03:33 https://bugs.launchpad.net/cinder/+bug/1736773 16:03:34 Launchpad bug 1736773 in Cinder "attachment-show is including `connection_info` for non-admin callers, it shouldn't" [High,Triaged] - Assigned to John Griffith (john-griffith) 16:03:35 concerns me 16:03:49 in the sense of how we use it in the Nova code? 16:03:54 or in general? 16:03:57 depending on if/how that gets fixed, 16:03:59 it could break nova 16:04:15 as far as i know, nova isn't passing an admin token to get the attachment details 16:04:17 it's using the user token 16:04:21 or the nova service user token 16:04:46 so if a policy rule goes into place to only return connection_info for an admin, that will break our existing code because we won't be able to get the connection_info 16:04:50 as i said in the bug, 16:05:02 i think this is super latent with the os-initialize_connection volume action api 16:05:26 i'm not sure if there are different policy controls in place for those APIs in cinder, i didn't get that far 16:05:34 or if there are any policy controls in place at all 16:05:37 so should we switch to admin for that call now? 16:05:49 well, it will depend 16:06:32 as noted in the bug, 16:06:45 the connection_info dict in the response contains things like details about the target and credentials 16:07:21 *Sigh* 16:07:42 Changing that is going to break stuff I am working on as well. 16:07:48 so Nova is not supposed to get it at all? 16:07:49 looks like this is a policy check on updating an attachment https://github.com/openstack/cinder/blob/master/cinder/volume/api.py#L2075 16:07:57 ildikov: nova must get it 16:08:06 we use it to connect the volume to the host using brick 16:08:35 comparing to os-initialize_connection, there is a policy rule on that too https://github.com/openstack/cinder/blob/master/cinder/volume/api.py#L782 16:08:49 ok, so what does it depend on whether or not to use admin context to get those details? 16:08:59 https://github.com/openstack/cinder/blob/master/cinder/policies/volume_actions.py#L164 16:09:27 same as https://github.com/openstack/cinder/blob/master/cinder/policies/attachments.py#L37 16:09:41 but there isn't a policy rule for listing/showing attachment details 16:09:49 Would be good to fix that with a policy setting so if there are people who want that exposed we can still get it. 16:10:10 ah, ok, yeah 16:10:16 ildikov: the issue is that i, as a non-admin user, can create a volume and attach it to an instance, 16:10:27 and then get the details, as a non-admin, about the storage connection 16:10:37 including target IP and credentials 16:10:59 as i said, this has always been a problem with os-initialize_connection as far as i can tell 16:11:25 the main difference is there was never a CLI for initializing a connection to get the connection_info back, but the REST API was always there for anyone that knows how to use curl 16:11:39 there is a CLI for listing and showing volume attachment details 16:12:20 ok, put it together now 16:12:54 however it's a problem in general not just from Nova's perspective 16:13:14 so we need to figure out how to handle this 16:13:32 but do we need to hold the new attach patch on this? 16:14:07 idk 16:14:20 the thing is, 16:14:32 let's say cinder adds a policy rule to not show connection_info unless you're an admin by default 16:14:48 mriedem: ++ 16:14:58 that would require nova to add config and code for making sure we get an admin token for anytime we need that information, 16:15:02 since the user token might not cut it 16:15:06 and if you backport that change, 16:15:12 it means breaking all existing deployments 16:15:33 ^ if you also apply that policy change to os-initialize_connection 16:15:41 do you mean that for initialize or the new attach api? 16:16:00 i think if you fix this for the new API you also have to fix it for os-initialize_connection 16:16:03 it's the same issue 16:16:11 ok, but for os-initialize-connection that has nothing to do with what we do with the new flow 16:16:22 i realize that 16:16:50 but it doesn't make sense to say, "you can only get connection_info if you're an admin with this one API but not this other API" 16:16:58 e.g., 16:17:04 i could attach a volume with the new flow, 16:17:11 and then curl to os-initialize_connection to get those details 16:17:17 yeah, I got the point 16:17:43 so the question now whether or not to fix it? 16:17:56 or whether or not fix and backport it? 16:18:14 yeah 16:18:34 if nova.conf is always configured to talk to cinder with a user that has the admin role, then it might be ok 16:19:01 but i don't think we say anywhere that has to be the case 16:19:12 yeah, that would solve the issue 16:19:14 mriedem: That seems like a reasonable limitation to set. 16:20:01 the only other service i know of that nova talks to with an admin token at times is neutron 16:20:28 and that's to do things with the port binding profile 16:20:32 which is like a connection_info for a volume 16:21:11 well, if the issue is that we basically don't want users to access the connection_info just haven't fixed that for whatever reason till now, then I guess that's ok if Cinder becomes another service like Neutron 16:21:25 ildikov: ++ 16:21:45 it seems that it would be nice to get this fixed at a certain point 16:21:53 And if we can fix the connection_info with a policy then it gives users who don't want to use an admin user an option. 16:22:03 devstack sets up the neutron creds in nova.conf with an admin user https://github.com/openstack-dev/devstack/blob/master/lib/neutron-legacy#L372 16:22:11 and I feel the pain, but at least good things come out of implementing the new flow if we fix for instance this one 16:23:11 we don't set credentials in [cinder] in nova.conf in devstack at all 16:23:20 so everything we test against today in CI is using the user token 16:23:34 so it's Cinder code change, Nova code change plus devstack fix 16:24:42 also I need to run in 10 minutes :/ 16:24:56 Bummer. More moving pieces. 16:24:59 so questions 16:25:04 well, it requires some thought on how you roll something like this out 16:25:10 if you're going to backport it 16:25:22 i think if you add a policy control for both cinder APIs, 16:25:32 it has to default to admin_or_owner to not break existing code 16:25:54 with clear documentation that if you change that to admin-only, then the [cinder] creds in nova.conf must be an admin user 16:26:17 mriedem: That sounds good. 16:27:07 agreed 16:27:30 so would this all happen before thinking about landing the new attach code? 16:28:09 if the fix in cinder is backward compatible, then no 16:28:40 mriedem: Why is that? 16:28:56 so I guess we need to chat with jgriffith to ensure it is backward compatible 16:29:00 because i would prefer to not merge code that is immediately broken 16:29:30 the release note on the new flow attach code in nova says that this is all basically internal plumbing changes, no impacts to existing stuff, 16:29:38 and should work as long as computes are upgraded and cinder 3.44 is available 16:29:55 i don't want to add a "oh btw you need to run with an admin user now for cinder too btw for this new code to work" 16:30:01 which should still be true with admin_or_owner, right? 16:30:08 "even though this was always a problem" 16:30:19 ildikov: yes admin_or_owner is fine 16:30:20 well, we said we would fix both 16:30:28 the user token is the owner of the instance and volume 16:30:29 mriedem: Fair enough. 16:30:30 so if we break one we break the other one too 16:30:33 otherwise you can't GET the volume 16:30:38 yeah, that's what I meant 16:30:58 just stopped to be sure at anything recently 16:32:14 so i'll update the bug with notes 16:32:15 and thoughts 16:32:23 john is at kubecon? 16:32:30 yes, he is 16:32:34 ok 16:32:46 he's occasionally available, he has a talk I don't know when 16:33:02 so let's hold the code until we had a chat with him about this 16:33:21 we might have a cinderclient soon with the shared_targets microversion 16:33:35 ildikov: Yes, I would like to get that through today. 16:33:40 mriedem: should I bump the microversion in the new attach patch if that gets out in the meantime? 16:33:49 I guess I could ninja merge the 3.48 patch. 16:33:50 jungleboyj: nice, thanks! 16:34:11 jungleboyj: yeah, that's just a version bump, nothing else if everything else is in place 16:34:13 Would kind-of like jgriffith 's sign off though. 16:34:20 what is 3.48 16:34:20 ? 16:34:29 shared_targets? 16:34:31 yes 16:34:34 mriedem: Yep. 16:34:52 meh - at this point i think what we have is ok based on our discussion yesterday 16:35:01 the multiattach code in nova can always check that cinder has 3.48 16:35:10 before it allows attaching a multiattach volume to >1 instance 16:35:11 we just didn't have some previous microversion changes implemented in the client 16:35:21 i would say don't rush the cinder side 16:35:25 we're not blocked 16:35:30 well, it's almost done 16:35:43 except for all the client stuff it sounds like, plus a release, etc 16:35:46 and then we have one less thing to keep in mind, which might be nice every now and then 16:36:10 the stuff is mainly on the gate now 16:36:28 and the client side changes need to land anyway otherwise we mess up like the last time... 16:36:49 ok, let's talk to jgriffith and then we will see where things are and move forward 16:36:54 :-) I will see if jgriffith pops on later. If he doesn't I will just merge it and propose the release. 16:37:10 don't you guys have other cores? 16:37:16 i know sean is gone too 16:37:17 but 16:37:25 Yep .... 16:37:28 mriedem: Don 16:37:34 't get me started . 16:37:36 i'd just rather not rush things 16:37:44 you want to make me core? 16:38:20 joking 16:38:25 ok, we can skip the version bump and just get things tidy in the cinderclient for it's own sake 16:38:25 but i can hear your gears grinding from here 16:38:32 mriedem: That could be arranged. 16:38:42 ok guys, I need to run 16:38:47 I wish I could remove some of the other cores to more realistically show the state of things. 16:38:52 ildikov: Ok, thank you. 16:38:56 is there anything else we need to chat/could decide about here? 16:39:00 nope 16:39:08 I will continue to curate the client patches. 16:39:11 ok, cool, thank you both 16:39:17 let's keep in touch on the channels 16:39:23 ildikov: Will do. 16:39:23 jungleboyj: thank you 16:39:37 jungleboyj: and you're the PTL, you can do whatever you want ;) 16:39:45 chat later guys! 16:39:53 #endmeeting