17:00:26 #startmeeting cinder-nova-api-changes 17:00:26 Meeting started Mon Nov 14 17:00:26 2016 UTC and is due to finish in 60 minutes. The chair is ildikov. Information about MeetBot at http://wiki.debian.org/MeetBot. 17:00:27 Useful Commands: #action #agreed #help #info #idea #link #topic #startvote. 17:00:30 The meeting name has been set to 'cinder_nova_api_changes' 17:00:51 scottda ildikov DuncanT ameade cFouts jaypipes takashin alaski e0ne jgriffith tbarron andrearosa hemna erlon gouthamr ebalduf patrickeast smcginnis diablo_rojo gsilvis xyang1 raj_singh lyarwood 17:01:04 o/ 17:01:47 jgriffith: hi :) 17:02:14 Hi 17:02:22 howdy 17:02:51 Nova guys are busy today, so I agreed with them to continue the discussion on johnthetubaguy's spec: https://review.openstack.org/#/c/373203/ 17:03:20 o/ 17:03:35 I'm in transit ATM, in case I don't respond promptly 17:03:46 I thought we might have a chat still to see the roadmap of the Cinder API patch/activity https://review.openstack.org/#/c/387712/ 17:04:18 scottda: copy that 17:04:26 jgriffith: Need to go through your latest updates. 17:04:38 jgriffith: Do we have a feel yet whether v1 or v2 are in favor? 17:04:55 smcginnis: v3 :) 17:05:05 lol 17:05:19 smcginnis: I *think* the v2 updates are the direction that most closely satisfy the nova spec 17:05:22 smcginnis: we're getting there to have create/delete calls 17:05:54 smcginnis: so it basically has 1 extra call for nova if they want it, otherwise it's pretty similar to the v1 approach 17:05:54 smcginnis: additionally we still have reserve in the patch, I guess that's for things like shelve 17:06:10 OK, cool. My preference was v1, but like I think I mentioned in BCN, if we can't get Nova to agree with the change then it doesn't do much good. 17:06:20 ildikov: Shelve looked like the tricky one. 17:06:26 smcginnis: and the latest chat on the review is whether we call 'update' as 'finalize' 17:06:36 * ildikov likes nit picking about names :) 17:06:36 ildikov: smcginnis yeah; so the bigest thing is an "attachment_create" does a reserve on the volume (status = 'reserved') and creates an empty attachment 17:06:42 ildikov: :) 17:06:46 ildikov: Saw that. I agree, it's minor, but naming is important long term. 17:07:17 finalize_reservation_or_do_update_to_existing() 17:07:25 Rolls off the tongue. 17:07:31 from my side it would be awesome to see if the general API's and workflow are the right direction for folks or not 17:07:33 jgriffith: is that 'reserve' something that we expose on the API? 17:07:43 I'm hesitant to write much more code if this isn't what people want to see 17:08:06 ildikov: nope; it's the "attachment_create" call 17:08:15 jgriffith: ok 17:08:39 ildikov: the requirement for nova was the whole empty attachment thing; and they wanted to get rid of reserve (which makes sense to me) so that's what that call does now 17:08:55 jgriffith: would something like that be needed for shelve - as it kinda reserves the volume - or we're confident about having 'attachment_create' is enough? 17:08:56 just sets status to reserved and returns an ID of an empty attachment object 17:09:38 ildikov: yeah, for things like creating an attachment for a shelved Instance and for boot-from-volume that's the sort of thing you'd need this for 17:10:05 ildikov: shelving in and of itself isn't problematic, attaching to a shelved Instance is the trick 17:10:29 ildikov: even if it is sort of a strange use case 17:10:33 jgriffith: yeap, right, a bit of a nightmare-ish thing... 17:11:25 smcginnis: that's a bit of a long name :) 17:11:40 ildikov: ;) 17:12:08 smcginnis: but at least contains everything, so I stop complaining 17:12:17 Hah! 17:12:38 * ildikov uses Mondays to complain, sorry about that... :) 17:13:13 jgriffith: is your v2 patch containing v3-like changes up to date regarding the things we talked about above? 17:15:21 jgriffith: I'll try to review this afternoon. 17:15:27 Sorry, gotta run for a lunch appointment. 17:15:32 smcginnis: do you think it would worth having 2 minutes about this on the Cinder meeting this week to get more eyes on this from the team? 17:15:46 ildikov: Yeah, certainly wouldn't hurt. 17:15:58 ildikov: If I don't add it to the agenda, feel free to remind me. 17:16:12 smcginnis: ok cool, will do that tnx! 17:16:58 smcginnis: we need more reviews on this as it's a new API, which is hard to change later if people realize they don't like it 17:17:23 ildikov: s/"hard to change"/"impossible to change"/ 17:18:22 jgriffith: I try not to be this dramatic at the beginning of the week, but you certainly have a point 17:19:15 anything else for today? 17:19:44 #action smcginnis to add the API proposal topic to this week's Cinder meeting 17:20:53 jgriffith: I've just seen your reply on the review 17:21:09 ildikov: yeah, hopefully those responses *help* 17:21:12 jgriffith: do you want to chat about the naming here or let's just leave it on the review? 17:21:17 ildikov: I'm certainly fine with changing the naming around 17:21:29 ildikov: totally up to folks here 17:21:44 ildikov: I'm certainly not going to draw a line in the sand over naming 17:21:56 ildikov: but be careful, or else the API will end up with a desert related name :) 17:22:06 jgriffith: as for me it's really only about the name, so I don't want to change the planned functionality on the API 17:23:11 jgriffith: personally I wouldn't mind, I have a good relation with deserts :) 17:23:34 haha 17:23:36 jgriffith: hi, question for you about the comments here: https://review.openstack.org/#/c/387712/5/cinder/volume/manager.py@4391 17:23:53 xyang1: yeah? 17:23:55 jgriffith: let's keep the discussion on the review then and give people the chance to come up with something sane 17:24:12 jgriffith: do you mean the use case described my Jay is not supported yet 17:24:18 ildikov: works for me; it's easy to change to "update" if that's where we end up 17:24:41 xyang1: the use case described by jay.xu appears to be multi-attach 17:25:01 xyang1: so correct, it's not implemented here *yet* but the design allows it 17:25:04 jgriffith: +1 17:25:21 jgriffith: sorry, I am lost 17:25:36 xyang1: ok... how can I help *find* you :) 17:25:42 :) 17:26:29 jgriffith: volA attached to VM1 and VM2 on the same host 17:26:42 xyang1: so that's multi-attach 17:27:00 xyang1: and we will have the ability via attachments table to detect and notify Nova of that 17:27:08 xyang1: that's actually the *easy* case 17:27:19 xyang1: the case that is commented in the review is different 17:27:53 xyang1: Nova has expressed a case where VolA and VolB attached to InstanceX and InstanceY shares a single connection to HostZ 17:28:09 xyang1: I don't know anything about what backends work like this or how they work :( 17:28:43 xyang1: but regardless that would be pretty driver-specific, so I figured that has to live in the backend/driver 17:29:15 xyang1: when we do multi-attach VolA attached to InstanceX, InstanceY on HostZ... that's easier to address 17:29:16 jgriffith: so our backend will create a different host lun number for every volume, so in this case, that may be 2 connections instead of 1 17:29:26 xyang1: Cinder will have enough information to understand that 17:29:52 xyang1: right, ALL backends that I'm aware of will have a different connection (lun ID) 17:30:21 xyang1: but this is something that the Nova side has asked for specifically... it may be an NFS, or RBD thing 17:30:32 xyang1: I fully admit I'm not very familiar with those backends 17:30:37 and how they work 17:30:49 jgriffith: so seems we are confused with the shared connection definition 17:30:59 xyang1: I'm not confused :) 17:31:08 xyang1: I understand it perfectly :) 17:31:31 I mean Jay and I:) 17:31:43 xyang1: I know... I'm just giving you grief :) 17:32:19 If I want to test this patch, which client patch is the right one 17:32:34 xyang1: none of them currently I'm afraid 17:32:44 ok 17:32:46 xyang1: so if I can get reviews on what's up there and the API I'll move forward 17:33:04 * johnthetubaguy sneaks in the back 17:33:12 xyang1: but I spent a lot of time on the last couple of iterations and never got anywhere; so I'm admittedly being kinda lazy 17:33:29 xyang1: not dumping a bunch of code until we're at least somewhat decided on this direction 17:33:33 jgriffith: I can look into the Nova patch in parallel when we get to this stage 17:33:41 johnthetubaguy: is that you back there sneaking in late? 17:34:04 johnthetubaguy: I'll remind you that this class begins promptly at 17:00 :) 17:34:05 johnthetubaguy: we're talking about shared connections, so if you have anything to add, this is the time :) 17:34:22 * jgriffith remembers those instructors back in school 17:34:48 heh 17:34:58 jgriffith: LOL :) 17:35:22 shared connections suck, but it seems they exist 17:35:39 jgriffith: you can help me reminding kinds to do their homeworks too as you know all the key expressions ;) 17:35:53 haha, sadly I do 17:36:05 the nova spec goes into quite a lot of detail on how shared connections would work with the new proposed flow 17:36:09 with a few diagrams 17:36:12 johnthetubaguy: yeah, they're annoying but as long as they're a thing we'll have to deal with them 17:36:23 jgriffith: yup 17:36:55 johnthetubaguy: BTW, do we have anything on the gate to test this use case? 17:38:15 ildikov: not on our side, AFAIK 17:38:56 johnthetubaguy: if we can just figure out the "who" on those I can track down ways to get it tested 17:39:18 yeah, unsure if the os-brick folks have more details on the who 17:39:19 johnthetubaguy: I thought Ceph was one of those cases (but perhaps I'm wrong) and NFS types 17:39:28 I am assuming its some fibrechannel thingy 17:39:36 johnthetubaguy: I pinged hemna on that the other day and got nothing 17:39:47 johnthetubaguy: even FC uses luns for each volume 17:39:59 jgriffith: +1 17:40:36 who knows when to drop the FC connection, or is that not really an option? 17:40:44 jgriffith: our FC backend creates a host lun id for every volume 17:41:28 johnthetubaguy: doesn't really work that way; and if it does via zone-manager you drop it when you no longer have any devices; BUT the way that usually works is FC is *always* connected (connected in quotes) 17:41:39 johnthetubaguy: you just may not have any devices mapped/connected 17:41:46 johnthetubaguy: FC is just scsi 17:42:02 fair enough 17:42:02 johnthetubaguy: scsi over FC... thus sometimes confusing 17:42:34 we should find out who does the shared thing 17:42:48 johnthetubaguy: agreed.. maybe dev ML? 17:43:04 I guess 17:43:05 can I leave that with you cinder folks? 17:43:10 johnthetubaguy: ildikov I can post a question up there if folks think it's helpful? 17:43:13 johnthetubaguy: yep 17:43:19 thanks that would be good 17:43:21 johnthetubaguy: we can/should figure that out 17:43:24 +1 17:43:25 jgriffith: that would be great, thanks! 17:43:41 johnthetubaguy: ildikov who knows, maybe we get lucky and this goes away :) 17:43:51 * ildikov started to wonder whether shared connection is just an urban legend... 17:44:00 although it's trivial to solve 17:44:04 ildikov: was thinking the same 17:44:19 so the latest version just drops a bit of locking logic, so thats not so bad 17:44:23 There's no Urban Legends in OpenStack!!!! 17:44:24 :) 17:44:36 LOL :) 17:44:54 countryside legends? 17:44:59 Ok, I'll try and track down any cases where a connection is shared 17:45:24 it's good though if both of you feel it's an easy on to solve, I hope we will have only this kind if any 17:45:47 ildikov: doesn't hurt to keep it in the specs/patches as is currently 17:46:04 jgriffith: I didn't mean to remove it 17:46:17 and best of all requires the drivers who care about it to deal with it 17:46:42 ildikov: no, I know what you meant; I'm just saying that it's not intrusive to leave the solution we have in place to deal with it 17:46:42 do we want to talk live-migrate, I think thats what we were doing at the end of the last hangout? 17:46:43 jgriffith: I just got surprised that after talking about it that much no one here knows a single example :) 17:46:43 anyway 17:47:13 johnthetubaguy: sure 17:48:05 johnthetubaguy: my thought there was we just create a new attachment and connect like we do currently. We just provide an option to indicate that it's part of a migration so even if we're not supporting multi-attach allow this to be called 17:48:07 jgriffith: I think we're on the same page :) 17:48:34 I tried to cover that all here: 17:48:35 http://docs-draft.openstack.org/03/373203/12/check/gate-nova-specs-docs-ubuntu-xenial/6e33afc//doc/build/html/specs/ocata/approved/cinder-new-attach-apis.html#live-migrate 17:48:42 johnthetubaguy: so Nova would still create a new attachment, it would just have two attachments for the same volume for a brief period of time 17:48:56 yep, thats what I would like 17:49:04 johnthetubaguy: your wish is my command 17:49:05 :) 17:49:18 for me, its clear its related to a migration, because both attachments have the same instance_uuid 17:49:19 ahh... yeah, doc works 17:49:33 johnthetubaguy: ahh, good point 17:49:43 johnthetubaguy: in that case I wouldn't even need to clutter the API with anything 17:49:45 johnthetubaguy: we might think about how to make it clear for everyone 17:49:48 johnthetubaguy: that's even better 17:50:11 johnthetubaguy: it got clear to me too, when you reminded me, but for anyone who does not follow this activity it will still be tricky 17:50:30 ildikov: johnthetubaguy I'll exploit the Instance UUID to detect it and add a field to the attachment record to idicate it's being migrated 17:50:37 multi_attach=True means allows multiple server_uuids 17:50:41 ildikov: johnthetubaguy or actually just set the attach-status to "migrating" 17:51:10 honestly, this is a bit of our shared model we need people to understand, else we will hit nasty bugs 17:51:12 johnthetubaguy: to clarify server_uuids == instance_uuids ? 17:51:19 yeah 17:51:27 Nova API says "server" not instance 17:51:30 jgriffith: johnthetubaguy: what if for some reason the second attach request happens by mistake? 17:51:38 johnthetubaguy: right, just wanted to clarify 17:51:46 a "server" is on a "host", which is sadly a little unclear 17:51:55 johnthetubaguy: right, I will need longer transition time for that in my head, my bad, sorry :S 17:52:14 johnthetubaguy: should I change the attach API's s/instance_xxx/server_xxxx/g ? 17:52:18 ildikov: we know which host it was, and that will probably need manual cleanup 17:52:30 ildikov: second attach by accident? 17:52:39 johnthetubaguy: +1 17:52:52 or just "don't do that" :) 17:53:10 jgriffith: I personally didn't want to :) 17:53:15 jgriffith: it probably wants to be nova agnostic I guess, so maybe we need something that is easier to get 17:53:34 the evacuate case makes things interesting, FWIW 17:53:42 but thats the next discussion 17:53:48 johnthetubaguy: well I'm already faking it anyway... if it's nova calling I use instance_uuid, if not I use the host 17:54:04 johnthetubaguy: will this renaming be cleaned up in the Nova code ever? 17:54:23 ildikov: seems unlikely, way too hard 17:54:33 johnthetubaguy: do you mean the questions about who puts the attachment into 'error' state, etc? 17:54:42 yeah 17:54:51 johnthetubaguy: that's what I thought just wanted confirmation from an insider 17:54:54 so os-brick disconnect fails 17:55:35 I think put attachment into the error state is useful 17:56:29 is that about evacuate or os-brick disconnect in general? 17:56:36 in general at first 17:57:26 I think I talk about it here: http://docs-draft.openstack.org/03/373203/12/check/gate-nova-specs-docs-ubuntu-xenial/6e33afc//doc/build/html/specs/ocata/approved/cinder-new-attach-apis.html#spawn-and-delete 17:57:45 basically, the volume is attached from the VM, but not disconnected from the host 17:57:57 so put the attachment into an ERROR state, so we know whats happening 17:58:18 that would allow someone else to attach to that volume, as its not attached on first VM any more, I guess 17:59:25 I guess except if the VM is on the same host as the previous one? 17:59:39 well, that would probably fail the connect 17:59:48 although I'm not an expert of what that means practically of disconnect fails 17:59:52 which is where we just delete the attachment 18:00:08 me neither, honestly 18:00:15 its just cases that have been brought up 18:00:25 I have attempted to go through them. 18:01:49 I think we need some os-brick insides to go through these cases in details 18:02:51 jgriffith: will that be Cinder in the future who sets the state of the attachment to 'error'? 18:03:53 ildikov: the concept I thought we discussed with Matt was to allow them to just then delete/remove the attachment 18:04:29 ildikov: wait...for the disconnect case? 18:04:48 jgriffith: for example for that 18:05:25 ildikov: I guess we could add the ability to put the attachment into error state, but I'm unclear what that buys us 18:05:58 ildikov: error, removed... what would the difference be? 18:06:09 jgriffith: I guess the question here is how clean up will happen in certain cases and what info is needed for that, etc. 18:06:26 ildikov: in either case we would need to dissociate the volume with that attachment record anyway 18:06:44 ildikov: that's kind of a brick problem isn't it? 18:06:46 jgriffith: if os-brick is enough to figure that out, then removing the attachment sounds fine to me 18:07:06 ildikov: I mean from cinder's perspective, disassociate the volume from the connection so it's not tied up any longer 18:07:22 jgriffith: my thought was just that we kind of removing the "evidence" of something went wrong 18:07:43 ildikov: you'll still have logs though 18:07:46 jgriffith: which might be bad 18:08:12 and honestly this goes down the philosophy of a hyper HA device vs a cloud IMO 18:08:47 I guess I'd have to think/talk through this case more 18:08:48 fair enough 18:09:06 maybe it's more important/critical than I'm thinking 18:09:27 I think we would need someone who knows os-brick better and see how failover works 18:09:32 but I don't see it as a really big deal or terrible thing. We currently deal with it a little in Brick and a little in Cinder 18:11:23 I guess we can start with how it's handled today and see where that leads us 18:11:44 ildikov: seems reasonable 18:11:46 if there's any chance not to overcomplicate things I'm all in for that 18:12:38 we're over time for today, but we can bring this up next week and see what others think 18:12:52 jgriffith: johnthetubaguy: does it sound ok? ^^ 18:13:11 ildikov: sounds good to me 18:13:57 coolio 18:14:43 then I let you go for today :) 18:14:49 have a nice day/evening! 18:15:11 talk to you next week the latest! 18:15:51 #endmeeting