16:02:19 #startmeeting cinder-nova-api-changes 16:02:20 Meeting started Thu Oct 19 16:02:19 2017 UTC and is due to finish in 60 minutes. The chair is ildikov. Information about MeetBot at http://wiki.debian.org/MeetBot. 16:02:21 Useful Commands: #action #agreed #help #info #idea #link #topic #startvote. 16:02:25 The meeting name has been set to 'cinder_nova_api_changes' 16:02:35 johnthetubaguy jaypipes e0ne jgriffith hemna mriedem patrickeast smcginnis diablo_rojo xyang1 raj_singh lyarwood jungleboyj stvnoyes 16:02:35 o/ 16:02:56 derp 16:02:58 * johnthetubaguy wonders in and waves 16:04:01 I am groot 16:04:02 sorry for being late 16:04:05 * smcginnis is still glaring at zuul 16:04:42 we have a new version of the multi-attach spec: https://review.openstack.org/499777 16:04:47 thanks to jgriffith 16:05:23 reading the diff now 16:05:30 I need to read through it quickly, but if anyone has concerns with either of the bits in it feel free to raise it 16:06:31 we say Active/Active is out of scope? I thought that was largely the point of it 16:06:38 and if you want me to walk through it now would be a good time :) 16:06:50 johnthetubaguy I just copied what was already said 16:07:02 put it back in if you want... but that's what was there 16:07:13 I only wanted to update the process/flow stuff 16:07:14 this is news to me, 16:07:17 "NOTE: multi-attach checks are all done at attachment-create time, there is no longer a requirement to create a volume with multi-attach flags." 16:07:28 mriedem yeah, that's what I added 16:07:48 :S 16:08:02 so nova-api will call attachment-create and if it's not a multiattach volume, the volume has to be 'available' for that to work, 16:08:13 nope 16:08:17 oh... 16:08:20 mriedem YES 16:08:21 sorry 16:08:33 mriedem it goes through those 4 checks that I listed 16:08:35 if it's a multiattach volume, attachment-create will work even if the volume is in-use 16:08:53 mriedem yes, IFF the requirements are met 16:08:56 "The backend providing the volume supports it" 16:09:03 and multi-attach is defined at the first attachment-create 16:09:05 is that going to be an rpc call from cinder api to the backend? 16:09:14 or something set on the volume in the db? 16:09:29 mriedem we have that in the backend-capabilities already 16:09:32 like a capability of hte type 16:09:34 ok 16:09:59 I don't want to use types for this EXCEPT for the case of a user explicitly saying they want that capability 16:09:59 side question, but is cinder going to then deprecate the multiattach flag in the volume API? 16:10:06 YES!!!!!! 16:10:06 if it's not actually used anywhere 16:10:21 ok 16:10:24 I'd like to just delete it straight away and wash it from my memory forever 16:10:52 If I could go back in time it would've never merged into the code 16:11:21 so in cinder channel you said, "The idea being that in the end the main thing we need on the Nova side is just to check the multiattach property in the attachment record and use it for libvirt if Nova supports/allows it and that's it" 16:11:29 so there is going to be a multiattach flag on the attachment record now? 16:11:35 mriedem yes 16:11:50 hang on... 16:12:08 but it's the volume that's multi-attachable, not the attachment record, right? 16:12:16 no 16:12:17 the attachment is only for 1 volume + 1 instance 16:12:21 the first attachment needs to be multi-attach = true, how does that work? its a volume thing 16:12:30 the volume can be attached to multiple instances, which are multiple attachments 16:12:33 the attachment is the source of all info regarding how to and if you can attach 16:12:47 but that attachment is only per volume/instance combo 16:12:57 mriedem the point was raised that libvirt MUST set shared on every one of those 16:13:17 it's based on how you attached the first attachment that moved the volume from 'available' to 'in-use' 16:13:18 groot so the easiest way to track that is the attachment record 16:13:21 how does cinder know there might be multiple attachments then? 16:13:34 for the first attachment, in particular 16:13:36 because even if the volume is "mulit-attach" that doesn't matter 16:13:43 johnthetubaguy we have a database 16:13:56 but isn't it a user preference? 16:14:06 I am asking where the data came from, not where it is stored 16:14:23 johnthetubaguy and that's why there's an option to attachment-create 16:14:34 attachment-create --multiattach 16:14:39 but thats a Nova call, and nova doesn't have an API for that 16:14:52 ??? 16:15:01 johnthetubaguy attachment-create? 16:15:10 that doesn't take that flag today 16:15:10 nova does'nt know if it should pass a multiattach flag 16:15:31 this was all build assuming it was passed by a user when they create the volume 16:15:35 groot: Nova only has the volume-attach call with no extra parameters and the multiattach flag decided what to do 16:15:50 why wouldn't nova add it as part of this spec? 16:16:04 the other option then if you want.... 16:16:16 so the nova flow is horrid this way... its not just us being a stick in the mood 16:16:18 mud 16:16:22 is there any concern on who's allowed to set 'multiattach'? 16:16:22 if Cinder supports it we ALWAYS send the parameter back as true 16:16:32 we just auto-set it 16:16:43 thats worse for volume performance 16:16:54 we don't want to disable the cache when we don't have to 16:17:01 user needs to opt into that 16:17:04 somehow 16:17:11 Ok 16:17:13 -2 16:17:14 so if it goes in Nova, here is the flow 16:17:19 I'm fine with that 16:17:31 user attaches volume, passed multi-attach 16:17:52 user attaches same volume elsewhere, forgets to pass multi-attach, we fail saying you should have said multi-attach = true here 16:17:54 that seems nuts 16:18:06 johnthetubaguy just let me say for the record, the flag on the volume at creation is going to be problematic in the future 16:18:26 johnthetubaguy did you read the spec? 16:18:44 I realize it was just put up 16:18:53 not got that far down I guess 16:19:13 the spec points out that if it was already attached somewhere using multiattach then cinder will auto-set that flag on all subsequent attach calls 16:19:51 OK 16:20:03 it might be inconvenient as you need to know when you're attaching the first attachment to set it 16:20:26 ildikov not as inconvenient as knowing to set it at volume-create!!! 16:20:44 like checking whether the volume has attachment or not 16:21:19 so you are wanting a flow where you create a volume, fill it up, detach it, then flip it to multi-attach, so you don't need to create a snapshot then create a new volume? 16:21:19 "inconvenient" is sort of a a funny thing to throw out considering the alternative :) 16:21:35 johnthetubaguy yup, that's one use case 16:22:15 well, the other is not flexible however seems straightforward 16:22:18 johnthetubaguy also my opinion is that the changes I proposed actually work and are easier to mangae/track things 16:22:35 ildikov I'd argue that it is NOT straight forward at all 16:22:40 but that's just me :) 16:23:11 I think the problem is we are not all thinking through the same set of use cases / flows here 16:23:25 I didn't say not at all, just found that part a little inconvenient :) 16:24:13 if I think about the data creation, I like the the on-attachment idea. What I hate is its gonna take an age to iron out the Nova API changes, there are many of them implied there. 16:24:58 johnthetubaguy well then I guess it won't work :( 16:24:59 bummer 16:25:08 I don't know why it's so hard though 16:25:39 "nova volume-attach --multiattach " 16:25:45 What's so difficult there? 16:25:52 nova boot needs changing too 16:25:59 BDM v2 needs updates 16:25:59 Yeah? 16:26:05 it does in either case 16:26:15 if we like the flexibility of this better, than it would be better to do it now than implementing the whole thing with the current flag 16:26:24 the old way there are zero changes to the microversion of the API 16:26:46 johnthetubaguy: we would've bumped it anyway as multiattach is a new functionality 16:27:06 and a train wreck in the cinder code :( 16:27:10 anyway, I guess it's too hard to do 16:27:26 not sure about too hard 16:27:34 me neither 16:28:01 just its harder (Nova side), need to be worth it, seems like it could be 16:28:23 mriedem: I am curious what you think about an extra multi-attach flag for all volume attachments 16:28:27 well let's think through it a bit and decide if it "is" worth it I guess 16:28:36 just put my comments in the spec, 16:29:05 i don't see why the multiattach flag makes sense on the attachment record, like i said, the attachment record is per volume/instance, and can't be shared with another instance 16:29:09 so it's not multiattachable 16:29:13 the volume is multiattachable 16:29:21 i think the flag should be modeled on the volume as it always has been 16:29:34 if the backend doesn't support multiattach when the volume is created, cinder should fail the volume create 16:29:54 so how does the data get into the volume, I think that is the consideration here 16:30:00 that leaves it to the user if they are doing multiattach at volume create time rather than when attaching the volume to an instance, which they might only do once 16:30:06 mriedem attachment record on the cinder side is per-volume 16:30:11 * smcginnis is glad to not have to be the PTL on stage stating yet again "We've made progress towards supporting mutliattach, but there's more work we're hoping to get done in $RELEASE+1" 16:30:54 smcginnis nahh... I'll withdraw my suggestions 16:31:03 I don't want to argue about it or derail anything 16:31:11 groot: the volume has multiple attachments sure 16:31:18 Not saying that. We should get the right design. 16:31:31 smcginnis I'm not sure anything will be *right* :) 16:31:44 honestly i'm just really surprised that this is coming up now 16:31:49 like, this seems really left field to me 16:32:04 mriedem that's apparantly my fault 16:32:11 mriedem: groot: can we say that it gets set at attachment-create if the back end supports it, but it will be added to the volume as opposed to the attachment? 16:32:13 for some reason I thought I had communicated this all along 16:32:18 kind of the way between? 16:32:21 but obviously that's not the case 16:32:23 :( 16:32:47 ildikov: but like johnthetubaguy said, what if the user doesn't want the volume to be attached to multiple instances? 16:32:57 it seems like something the user should be opting into when creating the volume 16:33:16 mriedem: do you mean that someone else is using the volume than who created? 16:33:31 sure, volumes are not owned by a user right? they are owned by the project 16:33:35 mriedem why does creation instead of attach? 16:33:41 mriedem: as if it's the same user than don't call attachment-create with --multiattach 16:33:42 a user in the same project could attach the volume to another instance in the same project 16:33:46 I'd argue that attach time makes WAY more sense 16:34:21 and honestly you could create a type that says explicitly "dont multiattach" if you really wanted to for some odd reason 16:34:54 honestly it'd make more sense IMO to have a "forbid-multi-attach create-volume option than the other" 16:35:20 ^ is a tihng in the type? 16:35:48 so what happens today if i try to create a volume with multiattach=true, will it fail if the type capability (via the backend) doesn't support multiattach? 16:36:10 mriedem correct 16:36:39 which actually none of that code relating to that flag is actually *finished* so it doesn't really do anything today at all 16:37:09 it shouldn't even be considered/discussed except possibly as an example of a flag 16:37:12 I can see the use where a volume is created not thinking of multiattach, gets some useful data, then a user decides they could use that ReadOnly on multiple hosts. 16:38:06 snapshot the volume and create a new multiattach=true volume from the snapshot? 16:38:11 smcginnis: +1 that is what I was saying earlier, but they can snapshot that, and create a multi-attach form the snapshot? 16:38:12 smcginnis: there was a Cinder blueprint earlier to make that flag changeable after creation 16:38:38 ildikov: actually that is a better option, if no attachments, allow users to tweak it 16:38:56 well there ya go then. problem solved 16:39:21 johnthetubaguy: yep, that works too 16:39:25 ildikov sorry for messing up your spec :) 16:39:50 smcginnis: groot: would that work from your perspective? ^^ 16:40:05 groot: would've been a too easy day otherwise... :) 16:40:05 and Nova owns figuring out BFV etc 16:40:22 changing the multiattach flag on the volume is not something we need to worry about today, 16:40:24 or for this nova spec 16:40:31 it's a later enhancement 16:40:35 ildikov: Yeah, makes sense. 16:40:36 for now you can snapshot and recreate if needed 16:40:40 mriedem well wait 16:40:44 bah 16:40:45 ok 16:40:46 I just wanted to check on whether it's considered doable 16:40:47 fine 16:40:48 I give up 16:40:52 don't want to add it now 16:41:12 who is gonna recap to see where we have landed? 16:41:38 not me 16:41:40 it sounds like we're back to previous understanding of how things would work 16:41:40 no read_only, no bfv, bootable=false and mutliattach=true dissallowed by cinder for the moment 16:41:41 :) 16:41:53 volume sets multi-attach = true/false 16:41:57 i thought we were going to have bfv? 16:42:16 oh, I thought we said no a few weeks back :S 16:42:17 johnthetubaguy: the bootable + multiattach is questionable 16:42:28 because of no read-only mode 16:43:07 ok i haven't really followed the r/o / r/w stuff 16:43:18 totally confused about policy and all that 16:43:27 so the way I looked at it was this... 16:43:35 mriedem: we said at a certain point that we wouldn't want to boot multiple instances from a R/W volume 16:43:52 do the "simple" use case, r/w multi-attach as a first version 16:44:03 i.e. target the cluster whatnot people 16:44:32 so policy is on or off in Cinder, i.e. are you allowed to set multi-attach=true or not, period 16:44:47 if multi-attach=true, do not allow bootable=true, (for now) 16:44:57 that gives us something we could do in queens 16:44:59 possibly 16:45:10 and hits the 80% use case people seem to be asking about 16:45:14 ... then next time 16:45:22 * smcginnis needs to AFK for a bit, be back later 16:45:35 we add read-only multi-attach volumes as an option, and allow bootable=true for that combo 16:45:46 I say we, that is purely a Cinder change at that point 16:45:53 all of this is enforced by cinder 16:46:02 sigh 16:46:21 so over the last few weeks that seems to be where we landed, totally open to other ideas 16:46:56 the idea is we allow one use case, and come back next cycle to see how we can do better 16:47:03 oh i see from the spec, 16:47:10 "In the first iteration we will have Read/Write volumes and will not control that through policies. Due to this aspect we will not enable to multi-attach a bootable volume for which the check will be on the Cinder side. " 16:47:16 rather than be really permissive and regret it later 16:47:17 johnthetubaguy you can toggle a volume from non-bootable to bootable 16:47:35 that sentence totally confused me in PS5 16:47:36 groot: the policy check should be applied to all those changes, thats fine 16:47:48 but means, you can't have bootable=true and multiattach=true in cinder, 16:47:53 and it's not a policy thing, it's hard-coded 16:47:54 right? 16:47:58 yeah 16:48:00 mriedem: I wasn't 100% sure what we agreed on regarding to that one, so kept it high level... 16:48:27 mriedem: basically whatever we come up with for the BFV case will be hard coded 16:49:00 so the problem was we couldn't agree how read-only works, but we though best to only allow BFV for the read-only multi-attach volumes 16:49:05 not sure why nova wouldn't check that honestly, but i do'nt know the details 16:49:10 nova doesn't 16:49:26 nova just checkes bootable=true on the volume, cinder enforces the checks 16:49:48 there are multiple options, the current code proposal says not allow to boot from a multi-attach volume 16:50:03 you can identify when Nova tries to boot from a volume and add actions there 16:50:07 so...during bfv in nova, if bootable=true and the volume is r/w and has > 0 attachments, fail 16:50:10 or we play with the flags in Cinder 16:50:10 isn't that what we want? 16:50:17 so nova only allows bfv is the volume says bootable=true 16:50:43 so you could bfv with a r/w volume once 16:50:49 cinder can just disallow bootable=true for the cases it thinks that is bad 16:50:57 mriedem: that would be y understanding 16:51:02 *my 16:51:25 i'm thinking longer term interop wise, if cinder is hard-coding this stuff, at what point it starts to allow things and how is that discoverable by a user? 16:51:48 johnthetubaguy: that's another thing, we either say not to boot from multi-attach volume or not to multi-attach a bootable volume 16:51:55 mriedem eventually you end up back at my proposal FWIW 16:52:01 johnthetubaguy: we need to pick one regardless of any flags or anything 16:53:26 looking at https://developer.openstack.org/api-ref/block-storage/v3/#show-a-volume-s-details 16:53:26 ildikov: those sound like the same question, I am missing something 16:53:43 the r/w thing is not actually an attribute on the volume itself, it's on the attachment right? 16:53:57 groot: if we do it your way but store the multiattach info on volume level, I'm good :) 16:53:59 mriedem: that is why I said we ignore that for this cycle 16:54:24 johnthetubaguy: in one case you can boot from the volume in the other you can multi-attach it, but not both 16:54:27 https://developer.openstack.org/api-ref/block-storage/v3/#show-attachment-details 16:54:29 attach_mode 16:54:32 johnthetubaguy: that's not the same for me 16:55:33 ildikov: but cinder doesn't know what nova has done with the volume, in terms of booting it vs not booting it, Nova would be racey on any checks I believe 16:56:45 is talking going to make this easier? i.e. a hangout? 16:56:52 just looking at the nova vol attach code, nova always attaches in rw mode unless the connection_info on the attachment says otherwise 16:57:26 johnthetubaguy: never mind, I might've misread one of your lines, so just skip my last comments 16:57:35 johnthetubaguy: hangout would be good 16:57:53 https://hangouts.google.com/call/kefPGVo77ipoUkuKTMzzAAEI 17:02:50 we switched to the Hangouts ^^ 17:03:10 closing this meeting for now as our slot ran out 17:03:15 #endmeeting