)]}'
{"specs/rocky/approved/volume-multiattach-enhancements.rst":[{"author":{"_account_id":17386,"name":"Steve Noyes","email":"steve.noyes@oracle.com","username":"ssn1ssn"},"change_message_id":"77cc30edd2e862c8fd9a431d515dd808a90e5d43","unresolved":false,"context_lines":[{"line_number":29,"context_line":"   Users currently cannot create multiple servers in a single request with a"},{"line_number":30,"context_line":"   multiattach volume because the compute API specifically blocks more than"},{"line_number":31,"context_line":"   one server trying to attach to the same volume (and is not multiattach"},{"line_number":32,"context_line":"   aware in that respect)."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"2. Add the ability to pass through the *attach_mode* when attaching volumes."},{"line_number":35,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"df7087c5_c0d29d00","line":32,"updated":"2018-03-13 15:11:33.000000000","message":"I would also add something like- \"Additionally, the current volume-reserve API handshake with Cinder does not support the creation of multiple servers in a single request.\" \n\nThis could possibly have an impact on Cinder depending on what is needed to fix this. Or did you figure out a way around that at the Dublin PTG?","commit_id":"24ee7e1a9d3f146286201470f040afe9f21fb0ce"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8fdf8ed922ac18f15effc6b6b19fd01fcc9da9d9","unresolved":false,"context_lines":[{"line_number":29,"context_line":"   Users currently cannot create multiple servers in a single request with a"},{"line_number":30,"context_line":"   multiattach volume because the compute API specifically blocks more than"},{"line_number":31,"context_line":"   one server trying to attach to the same volume (and is not multiattach"},{"line_number":32,"context_line":"   aware in that respect)."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"2. Add the ability to pass through the *attach_mode* when attaching volumes."},{"line_number":35,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"df7087c5_6a48485b","line":32,"in_reply_to":"df7087c5_c0d29d00","updated":"2018-03-13 18:53:33.000000000","message":"That\u0027s covered in the \"Dependencies\" section below.","commit_id":"24ee7e1a9d3f146286201470f040afe9f21fb0ce"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"95a60d33a017c2284847fe28a0c5cd536f898679","unresolved":false,"context_lines":[{"line_number":48,"context_line":"   passing through the attach mode. By default the attach mode will match the"},{"line_number":49,"context_line":"   default in Cinder which is read/write:"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"   https://github.com/openstack/cinder/blob/12.0.0/cinder/volume/manager.py#L4391"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"Use Cases"},{"line_number":54,"context_line":"---------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"df7087c5_39087490","line":51,"updated":"2018-03-13 17:27:01.000000000","message":"Thanks for adding this ref, the cinder api ref mentions that it defaults to \u0027ro\u0027 for GET but does not state it for POST\n\n[1]https://developer.openstack.org/api-ref/block-storage/v3/index.html#show-attachment-details","commit_id":"24ee7e1a9d3f146286201470f040afe9f21fb0ce"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8fdf8ed922ac18f15effc6b6b19fd01fcc9da9d9","unresolved":false,"context_lines":[{"line_number":48,"context_line":"   passing through the attach mode. By default the attach mode will match the"},{"line_number":49,"context_line":"   default in Cinder which is read/write:"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"   https://github.com/openstack/cinder/blob/12.0.0/cinder/volume/manager.py#L4391"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"Use Cases"},{"line_number":54,"context_line":"---------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"df7087c5_8ac4bc60","line":51,"in_reply_to":"df7087c5_39087490","updated":"2018-03-13 18:53:33.000000000","message":"That\u0027s a bug in the docs. The view builder gets the information from the versioned object which doesn\u0027t default the field, but does default what it gets set to:\n\nhttps://github.com/openstack/cinder/blob/68dfa92afaa75983c6f72c43e7897100d2c72382/cinder/api/v3/views/attachments.py#L34\n\nhttps://github.com/openstack/cinder/blob/68dfa92afaa75983c6f72c43e7897100d2c72382/cinder/objects/volume_attachment.py#L51\n\nhttps://github.com/openstack/cinder/blob/68dfa92afaa75983c6f72c43e7897100d2c72382/cinder/objects/volume_attachment.py#L166\n\nhttps://github.com/openstack/cinder/blob/68dfa92afaa75983c6f72c43e7897100d2c72382/cinder/volume/manager.py#L4357\n\nI\u0027ll push a fix to the cinder docs.","commit_id":"24ee7e1a9d3f146286201470f040afe9f21fb0ce"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"b543c279cc113a46fbff54eb61f305481080607a","unresolved":false,"context_lines":[{"line_number":48,"context_line":"   passing through the attach mode. By default the attach mode will match the"},{"line_number":49,"context_line":"   default in Cinder which is read/write:"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"   https://github.com/openstack/cinder/blob/12.0.0/cinder/volume/manager.py#L4391"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"Use Cases"},{"line_number":54,"context_line":"---------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_e3b58ece","line":51,"in_reply_to":"df7087c5_8ac4bc60","updated":"2018-03-28 14:01:54.000000000","message":"Thanks","commit_id":"24ee7e1a9d3f146286201470f040afe9f21fb0ce"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"95a60d33a017c2284847fe28a0c5cd536f898679","unresolved":false,"context_lines":[{"line_number":76,"context_line":"  allow passing an ``attach_mode`` field, which will default to \"rw\" for"},{"line_number":77,"context_line":"  read/write. The other possible value will be \"ro\" for read-only. This will"},{"line_number":78,"context_line":"  allow for boot-from-volume scenarios where the volume should be attached in"},{"line_number":79,"context_line":"  read-only mode."},{"line_number":80,"context_line":"* Add an ``attach_mode`` parameter to the request body of the"},{"line_number":81,"context_line":"  ``POST /servers/{server_id}/os-volume_attachments`` volume attach API."},{"line_number":82,"context_line":"  Similar rules apply to the ``block_device_mapping_v2`` schema: default is"}],"source_content_type":"text/x-rst","patch_set":1,"id":"df7087c5_b4decb6a","line":79,"updated":"2018-03-13 17:27:01.000000000","message":"Are my following guesses true?\n* The API will ignore the attach_mode if the destination_type of the bdm is set to \u0027local\u0027 . Alternatively it could reject the request that specifies attach_mode.\n\n* A request with image/snapshot to volume mapping with attach_mode \u0027ro\u0027 will succeed as the attach_mode will not mean that the volume will be created in read-only mode in cinder.","commit_id":"24ee7e1a9d3f146286201470f040afe9f21fb0ce"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"0ab5278eaaf6f5ed6a266fb016072b60cc802b1f","unresolved":false,"context_lines":[{"line_number":76,"context_line":"  allow passing an ``attach_mode`` field, which will default to \"rw\" for"},{"line_number":77,"context_line":"  read/write. The other possible value will be \"ro\" for read-only. This will"},{"line_number":78,"context_line":"  allow for boot-from-volume scenarios where the volume should be attached in"},{"line_number":79,"context_line":"  read-only mode."},{"line_number":80,"context_line":"* Add an ``attach_mode`` parameter to the request body of the"},{"line_number":81,"context_line":"  ``POST /servers/{server_id}/os-volume_attachments`` volume attach API."},{"line_number":82,"context_line":"  Similar rules apply to the ``block_device_mapping_v2`` schema: default is"}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_a28cfb35","line":79,"in_reply_to":"","updated":"2018-04-03 23:24:03.000000000","message":"Is a bdm of type local basically a qcow2 image or orther image file or disk on the hypervisor that is used as a block device instead of a volume? Not familiar with that terminology as i had assumed bdms applied only to cinder volumes","commit_id":"24ee7e1a9d3f146286201470f040afe9f21fb0ce"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f8a178b67a6dad4c2febc5a3c4939a5e017ef054","unresolved":false,"context_lines":[{"line_number":76,"context_line":"  allow passing an ``attach_mode`` field, which will default to \"rw\" for"},{"line_number":77,"context_line":"  read/write. The other possible value will be \"ro\" for read-only. This will"},{"line_number":78,"context_line":"  allow for boot-from-volume scenarios where the volume should be attached in"},{"line_number":79,"context_line":"  read-only mode."},{"line_number":80,"context_line":"* Add an ``attach_mode`` parameter to the request body of the"},{"line_number":81,"context_line":"  ``POST /servers/{server_id}/os-volume_attachments`` volume attach API."},{"line_number":82,"context_line":"  Similar rules apply to the ``block_device_mapping_v2`` schema: default is"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9f6a8fd7_372206a6","line":79,"in_reply_to":"9f6a8fd7_66700974","updated":"2018-04-18 13:52:21.000000000","message":"Done","commit_id":"24ee7e1a9d3f146286201470f040afe9f21fb0ce"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"16a4c47735b0f8306b39e507c1f9b6cc87b352d4","unresolved":false,"context_lines":[{"line_number":76,"context_line":"  allow passing an ``attach_mode`` field, which will default to \"rw\" for"},{"line_number":77,"context_line":"  read/write. The other possible value will be \"ro\" for read-only. This will"},{"line_number":78,"context_line":"  allow for boot-from-volume scenarios where the volume should be attached in"},{"line_number":79,"context_line":"  read-only mode."},{"line_number":80,"context_line":"* Add an ``attach_mode`` parameter to the request body of the"},{"line_number":81,"context_line":"  ``POST /servers/{server_id}/os-volume_attachments`` volume attach API."},{"line_number":82,"context_line":"  Similar rules apply to the ``block_device_mapping_v2`` schema: default is"}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_b8e43ce1","line":79,"in_reply_to":"bf659307_28c2d7ea","updated":"2018-04-13 16:37:23.000000000","message":"its tempting to reject (BadRequest) attach_mode\u003dro for things where we will just ignore attach_mode.","commit_id":"24ee7e1a9d3f146286201470f040afe9f21fb0ce"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"034e632b5c0a9854a4ad4d2bc0811bdbe2ffe08e","unresolved":false,"context_lines":[{"line_number":76,"context_line":"  allow passing an ``attach_mode`` field, which will default to \"rw\" for"},{"line_number":77,"context_line":"  read/write. The other possible value will be \"ro\" for read-only. This will"},{"line_number":78,"context_line":"  allow for boot-from-volume scenarios where the volume should be attached in"},{"line_number":79,"context_line":"  read-only mode."},{"line_number":80,"context_line":"* Add an ``attach_mode`` parameter to the request body of the"},{"line_number":81,"context_line":"  ``POST /servers/{server_id}/os-volume_attachments`` volume attach API."},{"line_number":82,"context_line":"  Similar rules apply to the ``block_device_mapping_v2`` schema: default is"}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_28c2d7ea","line":79,"in_reply_to":"bf659307_a28cfb35","updated":"2018-04-06 01:54:59.000000000","message":"See: https://docs.openstack.org/nova/latest/user/block-device-mapping.html#valid-source-dest-combinations\n\nIt\u0027s either an ephemeral or swap disk on the local compute host, and not persisted like a volume in Cinder.","commit_id":"24ee7e1a9d3f146286201470f040afe9f21fb0ce"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"70b493184fea829855c8e7398b2501e059666460","unresolved":false,"context_lines":[{"line_number":76,"context_line":"  allow passing an ``attach_mode`` field, which will default to \"rw\" for"},{"line_number":77,"context_line":"  read/write. The other possible value will be \"ro\" for read-only. This will"},{"line_number":78,"context_line":"  allow for boot-from-volume scenarios where the volume should be attached in"},{"line_number":79,"context_line":"  read-only mode."},{"line_number":80,"context_line":"* Add an ``attach_mode`` parameter to the request body of the"},{"line_number":81,"context_line":"  ``POST /servers/{server_id}/os-volume_attachments`` volume attach API."},{"line_number":82,"context_line":"  Similar rules apply to the ``block_device_mapping_v2`` schema: default is"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9f6a8fd7_66700974","line":79,"in_reply_to":"bf659307_b8e43ce1","updated":"2018-04-16 18:34:30.000000000","message":"I guess we could check for that here and bomb out if you\u0027ve specified destination_type\u003d\u0027local\u0027 and attach_mode\u003d\u0027ro\u0027:\n\nhttps://github.com/openstack/nova/blob/f0400313f30843fba114584f582b93f7cb5e5e48/nova/block_device.py#L166\n\nSince I guess you\u0027re asking for explicit API behavior yeah?","commit_id":"24ee7e1a9d3f146286201470f040afe9f21fb0ce"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"b543c279cc113a46fbff54eb61f305481080607a","unresolved":false,"context_lines":[{"line_number":76,"context_line":"  allow passing an ``attach_mode`` field, which will default to \"rw\" for"},{"line_number":77,"context_line":"  read/write. The other possible value will be \"ro\" for read-only. This will"},{"line_number":78,"context_line":"  allow for boot-from-volume scenarios where the volume should be attached in"},{"line_number":79,"context_line":"  read-only mode."},{"line_number":80,"context_line":"* Add an ``attach_mode`` parameter to the request body of the"},{"line_number":81,"context_line":"  ``POST /servers/{server_id}/os-volume_attachments`` volume attach API."},{"line_number":82,"context_line":"  Similar rules apply to the ``block_device_mapping_v2`` schema: default is"}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_63d65ef4","line":79,"in_reply_to":"df7087c5_0a9c2c5b","updated":"2018-03-28 14:01:54.000000000","message":"Thanks for the clarification.","commit_id":"24ee7e1a9d3f146286201470f040afe9f21fb0ce"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8fdf8ed922ac18f15effc6b6b19fd01fcc9da9d9","unresolved":false,"context_lines":[{"line_number":76,"context_line":"  allow passing an ``attach_mode`` field, which will default to \"rw\" for"},{"line_number":77,"context_line":"  read/write. The other possible value will be \"ro\" for read-only. This will"},{"line_number":78,"context_line":"  allow for boot-from-volume scenarios where the volume should be attached in"},{"line_number":79,"context_line":"  read-only mode."},{"line_number":80,"context_line":"* Add an ``attach_mode`` parameter to the request body of the"},{"line_number":81,"context_line":"  ``POST /servers/{server_id}/os-volume_attachments`` volume attach API."},{"line_number":82,"context_line":"  Similar rules apply to the ``block_device_mapping_v2`` schema: default is"}],"source_content_type":"text/x-rst","patch_set":1,"id":"df7087c5_0a9c2c5b","line":79,"in_reply_to":"df7087c5_b4decb6a","updated":"2018-03-13 18:53:33.000000000","message":"\u003e The API will ignore the attach_mode if the destination_type of the bdm is set to \u0027local\u0027 . Alternatively it could reject the request that specifies attach_mode.\n\nI hadn\u0027t thought about local BDMs. The code would just ignore it. The schema would validate that if you specify attach_mode, it\u0027s either rw or ro, but for local BDMs we wouldn\u0027t end up using the field so it would just be ignored. I see that more of a docs clarification than anything, i.e. \"attach_mode only applies when destination_type\u003d\u0027volume\u0027\".\n\n\u003e A request with image/snapshot to volume mapping with attach_mode \u0027ro\u0027 will succeed as the attach_mode will not mean that the volume will be created in read-only mode in cinder.\n\nThe volume doesn\u0027t have a \u0027mode\u0027 on it, the attachment does, and we\u0027ll specify the mode when creating the attachment between the volume, instance and compute host. So source_type of image/snapshot/volume shoudn\u0027t matter regarding the attach_mode.","commit_id":"24ee7e1a9d3f146286201470f040afe9f21fb0ce"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"0ab5278eaaf6f5ed6a266fb016072b60cc802b1f","unresolved":false,"context_lines":[{"line_number":155,"context_line":"   {"},{"line_number":156,"context_line":"       \"volumeAttachments\": ["},{"line_number":157,"context_line":"           {"},{"line_number":158,"context_line":"               \"device\": \"/dev/sdd\","},{"line_number":159,"context_line":"               \"id\": \"a26887c6-c47b-4654-abb5-dfadf7d3f803\","},{"line_number":160,"context_line":"               \"serverId\": \"4d8c3732-a248-40ed-bebc-539a6ffd25c0\","},{"line_number":161,"context_line":"               \"volumeId\": \"a26887c6-c47b-4654-abb5-dfadf7d3f803\","}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_cfda0c16","line":158,"in_reply_to":"","updated":"2018-04-03 23:24:03.000000000","message":"non of the hyperviours actully correctly support seting the \"drive Letter\" or in this case device path right. this is just a legacy thing that is in the attachemmt info?","commit_id":"24ee7e1a9d3f146286201470f040afe9f21fb0ce"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"034e632b5c0a9854a4ad4d2bc0811bdbe2ffe08e","unresolved":false,"context_lines":[{"line_number":155,"context_line":"   {"},{"line_number":156,"context_line":"       \"volumeAttachments\": ["},{"line_number":157,"context_line":"           {"},{"line_number":158,"context_line":"               \"device\": \"/dev/sdd\","},{"line_number":159,"context_line":"               \"id\": \"a26887c6-c47b-4654-abb5-dfadf7d3f803\","},{"line_number":160,"context_line":"               \"serverId\": \"4d8c3732-a248-40ed-bebc-539a6ffd25c0\","},{"line_number":161,"context_line":"               \"volumeId\": \"a26887c6-c47b-4654-abb5-dfadf7d3f803\","}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_2899771e","line":158,"in_reply_to":"bf659307_cfda0c16","updated":"2018-04-06 01:54:59.000000000","message":"Yes, see:\n\nhttps://review.openstack.org/#/c/452546/","commit_id":"24ee7e1a9d3f146286201470f040afe9f21fb0ce"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"95a60d33a017c2284847fe28a0c5cd536f898679","unresolved":false,"context_lines":[{"line_number":239,"context_line":""},{"line_number":240,"context_line":"The ``nova.notifications.objects.instance.BlockDevicePayload`` object will"},{"line_number":241,"context_line":"mirror the ``attach_mode`` field from the ``nova.objects.BlockDeviceMapping``"},{"line_number":242,"context_line":"object."},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"Other end user impact"},{"line_number":245,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"df7087c5_540c0fec","line":242,"updated":"2018-03-13 17:27:01.000000000","message":"+1\nI suggest to use an enum for the attach_mode filed in the Payload.","commit_id":"24ee7e1a9d3f146286201470f040afe9f21fb0ce"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f8a178b67a6dad4c2febc5a3c4939a5e017ef054","unresolved":false,"context_lines":[{"line_number":239,"context_line":""},{"line_number":240,"context_line":"The ``nova.notifications.objects.instance.BlockDevicePayload`` object will"},{"line_number":241,"context_line":"mirror the ``attach_mode`` field from the ``nova.objects.BlockDeviceMapping``"},{"line_number":242,"context_line":"object."},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"Other end user impact"},{"line_number":245,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9f6a8fd7_57253aaa","line":242,"in_reply_to":"bf659307_230aa689","updated":"2018-04-18 13:52:21.000000000","message":"Done","commit_id":"24ee7e1a9d3f146286201470f040afe9f21fb0ce"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8fdf8ed922ac18f15effc6b6b19fd01fcc9da9d9","unresolved":false,"context_lines":[{"line_number":239,"context_line":""},{"line_number":240,"context_line":"The ``nova.notifications.objects.instance.BlockDevicePayload`` object will"},{"line_number":241,"context_line":"mirror the ``attach_mode`` field from the ``nova.objects.BlockDeviceMapping``"},{"line_number":242,"context_line":"object."},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"Other end user impact"},{"line_number":245,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"df7087c5_8aa7dca7","line":242,"in_reply_to":"df7087c5_540c0fec","updated":"2018-03-13 18:53:33.000000000","message":"\u003e I suggest to use an enum for the attach_mode filed in the Payload.\n\nYou can remind me when the time comes to review the code. :)","commit_id":"24ee7e1a9d3f146286201470f040afe9f21fb0ce"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"b543c279cc113a46fbff54eb61f305481080607a","unresolved":false,"context_lines":[{"line_number":239,"context_line":""},{"line_number":240,"context_line":"The ``nova.notifications.objects.instance.BlockDevicePayload`` object will"},{"line_number":241,"context_line":"mirror the ``attach_mode`` field from the ``nova.objects.BlockDeviceMapping``"},{"line_number":242,"context_line":"object."},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"Other end user impact"},{"line_number":245,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_230aa689","line":242,"in_reply_to":"df7087c5_8aa7dca7","updated":"2018-03-28 14:01:54.000000000","message":"I will try to remember. :)","commit_id":"24ee7e1a9d3f146286201470f040afe9f21fb0ce"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"95a60d33a017c2284847fe28a0c5cd536f898679","unresolved":false,"context_lines":[{"line_number":276,"context_line":"--------------"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"None. Since the default attach mode is read/write, everything will work as it"},{"line_number":279,"context_line":"always has."},{"line_number":280,"context_line":""},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"Implementation"}],"source_content_type":"text/x-rst","patch_set":1,"id":"df7087c5_745273e0","line":279,"updated":"2018-03-13 17:27:01.000000000","message":"Does it mean that the attach_mode field of the BDM table will be defaulted to \u0027rw\u0027 by the DB schema upgrade script?\nEven for non volume BDMs?","commit_id":"24ee7e1a9d3f146286201470f040afe9f21fb0ce"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f8a178b67a6dad4c2febc5a3c4939a5e017ef054","unresolved":false,"context_lines":[{"line_number":276,"context_line":"--------------"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"None. Since the default attach mode is read/write, everything will work as it"},{"line_number":279,"context_line":"always has."},{"line_number":280,"context_line":""},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"Implementation"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9f6a8fd7_97875262","line":279,"in_reply_to":"bf659307_08627317","updated":"2018-04-18 13:52:21.000000000","message":"Done","commit_id":"24ee7e1a9d3f146286201470f040afe9f21fb0ce"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7f56dc79a01f6b3a5bbafcd6f851ea21a67cc335","unresolved":false,"context_lines":[{"line_number":276,"context_line":"--------------"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"None. Since the default attach mode is read/write, everything will work as it"},{"line_number":279,"context_line":"always has."},{"line_number":280,"context_line":""},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"Implementation"}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_9504cf19","line":279,"in_reply_to":"bf659307_836db233","updated":"2018-03-30 13:35:04.000000000","message":"If we go that route, which is fine with me, then I need to modify the data model impact section of the spec.","commit_id":"24ee7e1a9d3f146286201470f040afe9f21fb0ce"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"0ab5278eaaf6f5ed6a266fb016072b60cc802b1f","unresolved":false,"context_lines":[{"line_number":276,"context_line":"--------------"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"None. Since the default attach mode is read/write, everything will work as it"},{"line_number":279,"context_line":"always has."},{"line_number":280,"context_line":""},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"Implementation"}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_c219efd6","line":279,"in_reply_to":"bf659307_9504cf19","updated":"2018-04-03 23:24:03.000000000","message":"So in the object case the db would only have the attachment mode set for new attachments or following an update to existing attachments. E. G we wont be setting a default in the db  as part of an offline or online migration","commit_id":"24ee7e1a9d3f146286201470f040afe9f21fb0ce"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"034e632b5c0a9854a4ad4d2bc0811bdbe2ffe08e","unresolved":false,"context_lines":[{"line_number":276,"context_line":"--------------"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"None. Since the default attach mode is read/write, everything will work as it"},{"line_number":279,"context_line":"always has."},{"line_number":280,"context_line":""},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"Implementation"}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_08627317","line":279,"in_reply_to":"bf659307_c219efd6","updated":"2018-04-06 01:54:59.000000000","message":"\u003e So in the object case the db would only have the attachment mode\n \u003e set for new attachments or following an update to existing\n \u003e attachments. E. G we wont be setting a default in the db  as part\n \u003e of an offline or online migration\n\nCorrect. Which I think is fine, and something we can handle in the object code when we pull older entries out of the database that don\u0027t have a mode set (we\u0027ll just default to \"rw\").","commit_id":"24ee7e1a9d3f146286201470f040afe9f21fb0ce"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"b543c279cc113a46fbff54eb61f305481080607a","unresolved":false,"context_lines":[{"line_number":276,"context_line":"--------------"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"None. Since the default attach mode is read/write, everything will work as it"},{"line_number":279,"context_line":"always has."},{"line_number":280,"context_line":""},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"Implementation"}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_836db233","line":279,"in_reply_to":"df7087c5_6ad8481d","updated":"2018-03-28 14:01:54.000000000","message":"So the defaulting will be done in the object level not in the db level. That seems good to me.","commit_id":"24ee7e1a9d3f146286201470f040afe9f21fb0ce"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8fdf8ed922ac18f15effc6b6b19fd01fcc9da9d9","unresolved":false,"context_lines":[{"line_number":276,"context_line":"--------------"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"None. Since the default attach mode is read/write, everything will work as it"},{"line_number":279,"context_line":"always has."},{"line_number":280,"context_line":""},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"Implementation"}],"source_content_type":"text/x-rst","patch_set":1,"id":"df7087c5_6ad8481d","line":279,"in_reply_to":"df7087c5_745273e0","updated":"2018-03-13 18:53:33.000000000","message":"I hadn\u0027t considered non-volume BDMs (local BDMs are the only non-volume BDMs). I guess I was just thinking the BlockDeviceMapping.attach_mode field would default to \u0027rw\u0027, but we wouldn\u0027t even need to default it in the field, we could add a property to the object itself and then return the default based on the destination type, but I\u0027m not sure it\u0027s valid to define property methods on versioned objects where the name is the same as a field on the object.","commit_id":"24ee7e1a9d3f146286201470f040afe9f21fb0ce"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a3e5cfdf614aaaf25a4f57ca3415c0f51aba4c6b","unresolved":false,"context_lines":[{"line_number":74,"context_line":"  single request."},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"* Change the ``block_device_mapping_v2`` request body parameter schema to"},{"line_number":77,"context_line":"  allow passing an ``attach_mode`` field, which will default to \"rw\" for"},{"line_number":78,"context_line":"  read/write. The other possible value will be \"ro\" for read-only. This will"},{"line_number":79,"context_line":"  allow for boot-from-volume scenarios where the volume should be attached in"},{"line_number":80,"context_line":"  read-only mode."},{"line_number":81,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_e6f2ac9a","line":78,"range":{"start_line":77,"start_character":42,"end_line":78,"end_character":13},"updated":"2018-05-20 22:54:02.000000000","message":"Should default to None in the API. The BlockDeviceMapping object will handle the default for volume BDMs and set it to \"rw\".","commit_id":"f6713fc2adcd6884d81c2df479b3fb78aefa9da0"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"a6730d26a061dd436d0821250971c00851807e31","unresolved":false,"context_lines":[{"line_number":74,"context_line":"  single request."},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"* Change the ``block_device_mapping_v2`` request body parameter schema to"},{"line_number":77,"context_line":"  allow passing an ``attach_mode`` field, which will default to \"rw\" for"},{"line_number":78,"context_line":"  read/write. The other possible value will be \"ro\" for read-only. This will"},{"line_number":79,"context_line":"  allow for boot-from-volume scenarios where the volume should be attached in"},{"line_number":80,"context_line":"  read-only mode."},{"line_number":81,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_8107061d","line":78,"range":{"start_line":77,"start_character":42,"end_line":78,"end_character":13},"in_reply_to":"5f7c97a3_e6f2ac9a","updated":"2018-05-22 19:41:28.000000000","message":"Either seems fine, you can even leave it as None on the attachment request and have Cinder set it to its default if that\u0027s more convenient (I think that\u0027s what you\u0027re getting at in the below comment?).\n\nThe only trick with Cinder is keeping compatibility with the old connector option but that shouldn\u0027t be a Nova problem.  My proposal is that a specified field in the Attachment request always wins, if there\u0027s nothing in the attachment request then I check the mode setting in the connector (because of the bizarre metadata option that live in Cinder).","commit_id":"f6713fc2adcd6884d81c2df479b3fb78aefa9da0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a3e5cfdf614aaaf25a4f57ca3415c0f51aba4c6b","unresolved":false,"context_lines":[{"line_number":79,"context_line":"  allow for boot-from-volume scenarios where the volume should be attached in"},{"line_number":80,"context_line":"  read-only mode."},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"  .. note:: The ``attach_mode`` field will only apply to block device"},{"line_number":83,"context_line":"      mappings where ``destination_type\u003dvolume``. If ``destination_type\u003dlocal``"},{"line_number":84,"context_line":"      and ``attach_mode`` is specified, it will result in a"},{"line_number":85,"context_line":"      ``400 HTTPBadRequest`` error response to the user. This is because local"},{"line_number":86,"context_line":"      block devices are for swap or ephemeral disks and are not modeled as"},{"line_number":87,"context_line":"      volumes in the block storage service, where the ``attach_mode`` field"},{"line_number":88,"context_line":"      will be used. Rather than ignore the ``attach_mode`` request in this"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_66ff7c67","line":85,"range":{"start_line":82,"start_character":2,"end_line":85,"end_character":56},"updated":"2018-05-20 22:54:02.000000000","message":"If attach_mode defaults to rw and can only be rw or ro (not omitted), then it will be impossible to specify local BDMs without hitting this 400. So I think we need to make attach_mode optional, but validate that if it is specified, it is only valid if destination_type\u003d\u0027volume\u0027.","commit_id":"f6713fc2adcd6884d81c2df479b3fb78aefa9da0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"729eb3c38abb3ed0752e644db20e35a4e4e39dc1","unresolved":false,"context_lines":[{"line_number":355,"context_line":""},{"line_number":356,"context_line":".. _Known issues: https://docs.openstack.org/nova/latest/admin/manage-volumes.html#known-issues"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"References"},{"line_number":359,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":360,"context_line":""},{"line_number":361,"context_line":"* https://bugs.launchpad.net/nova/+bug/1747985"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_805a1c80","line":358,"updated":"2018-05-15 16:44:07.000000000","message":"https://bugs.launchpad.net/cinder/+bug/1704201 might also be semi-related but it looks like that is the only existing way to make attachments to a volume in read-only mode today, but it only works if you\u0027re an admin.","commit_id":"f6713fc2adcd6884d81c2df479b3fb78aefa9da0"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"a6730d26a061dd436d0821250971c00851807e31","unresolved":false,"context_lines":[{"line_number":355,"context_line":""},{"line_number":356,"context_line":".. _Known issues: https://docs.openstack.org/nova/latest/admin/manage-volumes.html#known-issues"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"References"},{"line_number":359,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":360,"context_line":""},{"line_number":361,"context_line":"* https://bugs.launchpad.net/nova/+bug/1747985"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_c4698cbe","line":358,"in_reply_to":"5f7c97a3_805a1c80","updated":"2018-05-22 19:41:28.000000000","message":"Yeah, that thing needs to go away, Cinders new mode on attach request option will still allow this to work but allow us to deprecate it for removal.","commit_id":"f6713fc2adcd6884d81c2df479b3fb78aefa9da0"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"98cad251e3f8b9fdc1bac0bf57889db52e5229c8","unresolved":false,"context_lines":[{"line_number":31,"context_line":"   one server trying to attach to the same volume (and is not multiattach"},{"line_number":32,"context_line":"   aware in that respect)."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"2. Add the ability to pass through the *attach_mode* when attaching volumes."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"   Related bug: https://bugs.launchpad.net/cinder/+bug/1741476"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_ad391140","line":34,"range":{"start_line":34,"start_character":0,"end_line":34,"end_character":76},"updated":"2018-06-05 10:37:07.000000000","message":"It\u0027s not clear to me how granular this would be. Will the flag apply to all attachments/servers or would it be specified on a per-server basis? I\u0027m guessing the latter","commit_id":"04013216ea7c30ebcd4f0e93269c2b75ef8ee286"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5dee401dec5e48e4faf6a53403a8faaf37e15a4a","unresolved":false,"context_lines":[{"line_number":31,"context_line":"   one server trying to attach to the same volume (and is not multiattach"},{"line_number":32,"context_line":"   aware in that respect)."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"2. Add the ability to pass through the *attach_mode* when attaching volumes."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"   Related bug: https://bugs.launchpad.net/cinder/+bug/1741476"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_47e7f047","line":34,"range":{"start_line":34,"start_character":0,"end_line":34,"end_character":76},"in_reply_to":"5f7c97a3_65922d5b","updated":"2018-06-05 18:25:12.000000000","message":"It\u0027s per attachment.","commit_id":"04013216ea7c30ebcd4f0e93269c2b75ef8ee286"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"bf43af84c60aed325604f269f171d5a0026d583f","unresolved":false,"context_lines":[{"line_number":31,"context_line":"   one server trying to attach to the same volume (and is not multiattach"},{"line_number":32,"context_line":"   aware in that respect)."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"2. Add the ability to pass through the *attach_mode* when attaching volumes."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"   Related bug: https://bugs.launchpad.net/cinder/+bug/1741476"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_65922d5b","line":34,"range":{"start_line":34,"start_character":0,"end_line":34,"end_character":76},"in_reply_to":"5f7c97a3_ad391140","updated":"2018-06-05 15:58:19.000000000","message":"I believe the intent is for this to be unique to an attachment, so between a single server and volume.","commit_id":"04013216ea7c30ebcd4f0e93269c2b75ef8ee286"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"98cad251e3f8b9fdc1bac0bf57889db52e5229c8","unresolved":false,"context_lines":[{"line_number":57,"context_line":"servers in a single request using the same multiattach volume."},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"As an end user of the compute API, I want to be able to attach the same"},{"line_number":60,"context_line":"volume to multiple servers but have only one of those servers be able to"},{"line_number":61,"context_line":"write to the volume."},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"As a Scientific SIG user [1]_, I want to create multiple servers with the same"},{"line_number":64,"context_line":"read-only multiattach root volume for my baremetal instances."}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_2d1741a6","line":61,"range":{"start_line":60,"start_character":27,"end_line":61,"end_character":20},"updated":"2018-06-05 10:37:07.000000000","message":"...or not.","commit_id":"04013216ea7c30ebcd4f0e93269c2b75ef8ee286"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"98cad251e3f8b9fdc1bac0bf57889db52e5229c8","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"The following changes will be made to the compute API in a new microversion."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"* Change the compute API _check_and_transform_bdm logic [2]_ such that if the"},{"line_number":72,"context_line":"  new microversion is requested and a multiattach volume is being used, that"},{"line_number":73,"context_line":"  multiattach volume can be re-used with multiple servers being created in a"},{"line_number":74,"context_line":"  single request."}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_8d6a1519","line":71,"range":{"start_line":71,"start_character":25,"end_line":71,"end_character":49},"updated":"2018-06-05 10:37:07.000000000","message":"You knew this was coming, surely\n\n  ``literal``\n\nand it was almost perfect...","commit_id":"04013216ea7c30ebcd4f0e93269c2b75ef8ee286"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"bf43af84c60aed325604f269f171d5a0026d583f","unresolved":false,"context_lines":[{"line_number":74,"context_line":"  single request."},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"* Change the ``block_device_mapping_v2`` request body parameter schema to"},{"line_number":77,"context_line":"  allow passing an ``attach_mode`` field. If not specified, volume BDMs will"},{"line_number":78,"context_line":"  default to \"rw\" for read/write. The other possible value will be \"ro\" for"},{"line_number":79,"context_line":"  read-only. This will allow for boot-from-volume scenarios where the volume"},{"line_number":80,"context_line":"  should be attached in read-only mode."}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_bbbaa66b","line":77,"range":{"start_line":77,"start_character":21,"end_line":77,"end_character":32},"updated":"2018-06-05 15:58:19.000000000","message":"nit - so we are stashing and using access_mode in the returned connection_info from Cinder, it would be nice if we could refactor both ends to use one key for this!","commit_id":"04013216ea7c30ebcd4f0e93269c2b75ef8ee286"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e112635ec59ae6bcf3da570387429ddc6b2609b5","unresolved":false,"context_lines":[{"line_number":74,"context_line":"  single request."},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"* Change the ``block_device_mapping_v2`` request body parameter schema to"},{"line_number":77,"context_line":"  allow passing an ``attach_mode`` field. If not specified, volume BDMs will"},{"line_number":78,"context_line":"  default to \"rw\" for read/write. The other possible value will be \"ro\" for"},{"line_number":79,"context_line":"  read-only. This will allow for boot-from-volume scenarios where the volume"},{"line_number":80,"context_line":"  should be attached in read-only mode."}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_7a594859","line":77,"range":{"start_line":77,"start_character":21,"end_line":77,"end_character":32},"in_reply_to":"5f7c97a3_475e10ea","updated":"2018-06-06 17:21:45.000000000","message":"Actually the volume attachment records in cinder have an attach_mode field on them, so that\u0027s what I was modeling this after:\n\nhttps://developer.openstack.org/api-ref/block-storage/v3/#show-attachment-details\n\nSo given that, I\u0027m inclined to leave this as attach_mode to mirror what\u0027s in the cinder API resource, rather than what\u0027s hidden in connection_info. Long-term we can probably ignore what\u0027s in connection_info since it\u0027ll be stored on our BDM record.","commit_id":"04013216ea7c30ebcd4f0e93269c2b75ef8ee286"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"bfe2eb09a6c5a99cc50c73fcbdedb9192606f5ba","unresolved":false,"context_lines":[{"line_number":74,"context_line":"  single request."},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"* Change the ``block_device_mapping_v2`` request body parameter schema to"},{"line_number":77,"context_line":"  allow passing an ``attach_mode`` field. If not specified, volume BDMs will"},{"line_number":78,"context_line":"  default to \"rw\" for read/write. The other possible value will be \"ro\" for"},{"line_number":79,"context_line":"  read-only. This will allow for boot-from-volume scenarios where the volume"},{"line_number":80,"context_line":"  should be attached in read-only mode."}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_6c116453","line":77,"range":{"start_line":77,"start_character":21,"end_line":77,"end_character":32},"in_reply_to":"5f7c97a3_7a594859","updated":"2018-06-08 10:44:37.000000000","message":"Yeah indeed so changing the connection_info[\u0027data\u0027][\u0027access_mode\u0027] key to \u0027attach_mode\u0027 would still be good to see but not critical.","commit_id":"04013216ea7c30ebcd4f0e93269c2b75ef8ee286"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5dee401dec5e48e4faf6a53403a8faaf37e15a4a","unresolved":false,"context_lines":[{"line_number":74,"context_line":"  single request."},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"* Change the ``block_device_mapping_v2`` request body parameter schema to"},{"line_number":77,"context_line":"  allow passing an ``attach_mode`` field. If not specified, volume BDMs will"},{"line_number":78,"context_line":"  default to \"rw\" for read/write. The other possible value will be \"ro\" for"},{"line_number":79,"context_line":"  read-only. This will allow for boot-from-volume scenarios where the volume"},{"line_number":80,"context_line":"  should be attached in read-only mode."}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_475e10ea","line":77,"range":{"start_line":77,"start_character":21,"end_line":77,"end_character":32},"in_reply_to":"5f7c97a3_bbbaa66b","updated":"2018-06-05 18:25:12.000000000","message":"Hmm, I forgot about access_mode since during attach it\u0027s only used in the legacy flow as a parameter to the os-attach API, and in that API it\u0027s called \"mode\":\n\nhttps://github.com/openstack/cinder/blob/9d263f711dfc578fea83558b450e9aa1355c5209/cinder/api/schemas/volume_actions.py#L57\n\nAnd in the attachment update (new style) API it\u0027s also called \u0027mode\u0027 in the connector dict:\n\nhttps://github.com/openstack/cinder/blob/9d263f711dfc578fea83558b450e9aa1355c5209/cinder/volume/manager.py#L4371\n\nSo maybe I should just call it access_mode as well to match what\u0027s in the connection_info dict as you mentioned.","commit_id":"04013216ea7c30ebcd4f0e93269c2b75ef8ee286"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"bf43af84c60aed325604f269f171d5a0026d583f","unresolved":false,"context_lines":[{"line_number":93,"context_line":"  Similar rules apply to the ``block_device_mapping_v2`` schema: default is"},{"line_number":94,"context_line":"  \"rw\" and the only other valid option is \"ro\"."},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"When creating or updating a volume attachment with a host connector dict, the"},{"line_number":97,"context_line":"``mode`` key will be added to the connector dict which is the current way to"},{"line_number":98,"context_line":"pass this information through to Cinder since it is not a top-level parameter"},{"line_number":99,"context_line":"on those APIs."},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"The compute RPC API version will be bumped to indicate which compute services"},{"line_number":102,"context_line":"support user-defined attach modes. This will allow us to check (and fail) from"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_119e1bb8","line":99,"range":{"start_line":96,"start_character":0,"end_line":99,"end_character":14},"updated":"2018-06-05 15:58:19.000000000","message":"I think we also need to highlight the changes required on the Cinder side here to make this possible. At present the volume layer logic controlling the setting of access_mode within the connection_info dict of crazy appears to have a few issues [1].\n\nIt would be great if we could remove the use of volume metadata and just use the o.vo objects to store our value of attach_mode for use in the connection_info dict later.\n\n[1] https://github.com/openstack/cinder/blob/master/cinder/volume/manager.py#L4375-L4385","commit_id":"04013216ea7c30ebcd4f0e93269c2b75ef8ee286"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5dee401dec5e48e4faf6a53403a8faaf37e15a4a","unresolved":false,"context_lines":[{"line_number":93,"context_line":"  Similar rules apply to the ``block_device_mapping_v2`` schema: default is"},{"line_number":94,"context_line":"  \"rw\" and the only other valid option is \"ro\"."},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"When creating or updating a volume attachment with a host connector dict, the"},{"line_number":97,"context_line":"``mode`` key will be added to the connector dict which is the current way to"},{"line_number":98,"context_line":"pass this information through to Cinder since it is not a top-level parameter"},{"line_number":99,"context_line":"on those APIs."},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"The compute RPC API version will be bumped to indicate which compute services"},{"line_number":102,"context_line":"support user-defined attach modes. This will allow us to check (and fail) from"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_67bf8cd0","line":99,"range":{"start_line":96,"start_character":0,"end_line":99,"end_character":14},"in_reply_to":"5f7c97a3_119e1bb8","updated":"2018-06-05 18:25:12.000000000","message":"John Griffith made a comment in the last patch set on this spec about the volume admin metadata stuff, but I\u0027m not sure that internal plumbing in Cinder is required to make this work on the nova side. Also, I would like to see the access_mode move out of the host connector dict and connection_info dict and just be a top-level resource in the attachment record from Cinder, which is 1:1 with our BlockDeviceMapping object (and connector and connection_info are also 1:1 with attachments in Cinder).\n\nSo I\u0027m not sure what needs to change here, if anything, or are you suggesting that we first prioritize cleaning up the Cinder attachments APIs wrt access_mode before doing any work on the nova side?","commit_id":"04013216ea7c30ebcd4f0e93269c2b75ef8ee286"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"bfe2eb09a6c5a99cc50c73fcbdedb9192606f5ba","unresolved":false,"context_lines":[{"line_number":93,"context_line":"  Similar rules apply to the ``block_device_mapping_v2`` schema: default is"},{"line_number":94,"context_line":"  \"rw\" and the only other valid option is \"ro\"."},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"When creating or updating a volume attachment with a host connector dict, the"},{"line_number":97,"context_line":"``mode`` key will be added to the connector dict which is the current way to"},{"line_number":98,"context_line":"pass this information through to Cinder since it is not a top-level parameter"},{"line_number":99,"context_line":"on those APIs."},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"The compute RPC API version will be bumped to indicate which compute services"},{"line_number":102,"context_line":"support user-defined attach modes. This will allow us to check (and fail) from"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_2c904c95","line":99,"range":{"start_line":96,"start_character":0,"end_line":99,"end_character":14},"in_reply_to":"5f7c97a3_2cf8837a","updated":"2018-06-08 10:44:37.000000000","message":"Yeah this was my concern after reviewing the c-vol code, I didn\u0027t want to call it out until I had a chance to test it so thanks for following up!","commit_id":"04013216ea7c30ebcd4f0e93269c2b75ef8ee286"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e04632f14deede86d3b0e92de498c5abedd9c25f","unresolved":false,"context_lines":[{"line_number":93,"context_line":"  Similar rules apply to the ``block_device_mapping_v2`` schema: default is"},{"line_number":94,"context_line":"  \"rw\" and the only other valid option is \"ro\"."},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"When creating or updating a volume attachment with a host connector dict, the"},{"line_number":97,"context_line":"``mode`` key will be added to the connector dict which is the current way to"},{"line_number":98,"context_line":"pass this information through to Cinder since it is not a top-level parameter"},{"line_number":99,"context_line":"on those APIs."},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"The compute RPC API version will be bumped to indicate which compute services"},{"line_number":102,"context_line":"support user-defined attach modes. This will allow us to check (and fail) from"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_6ca3db01","line":99,"range":{"start_line":96,"start_character":0,"end_line":99,"end_character":14},"in_reply_to":"5f7c97a3_30eea78b","updated":"2018-06-06 12:56:23.000000000","message":"One thing I was thinking about, was if the readonly setting on the volume itself is global, and if we have 2 attachments on a volume and the first is created as read-only but the second is created as read/write, will the second get created as read-only because the volume admin metadata was marked as read-only from the first attachment? In other words, does Cinder properly model the access mode per attachment? I could probably test that out with simple curl requests to the volume API. But if it\u0027s a problem in Cinder, it\u0027s likely a bug that will just be a dependency to fix as part of this series.","commit_id":"04013216ea7c30ebcd4f0e93269c2b75ef8ee286"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b911f1e29196f109cbda7297f82b5ad5250f6cb1","unresolved":false,"context_lines":[{"line_number":93,"context_line":"  Similar rules apply to the ``block_device_mapping_v2`` schema: default is"},{"line_number":94,"context_line":"  \"rw\" and the only other valid option is \"ro\"."},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"When creating or updating a volume attachment with a host connector dict, the"},{"line_number":97,"context_line":"``mode`` key will be added to the connector dict which is the current way to"},{"line_number":98,"context_line":"pass this information through to Cinder since it is not a top-level parameter"},{"line_number":99,"context_line":"on those APIs."},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"The compute RPC API version will be bumped to indicate which compute services"},{"line_number":102,"context_line":"support user-defined attach modes. This will allow us to check (and fail) from"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_30eea78b","line":99,"range":{"start_line":96,"start_character":0,"end_line":99,"end_character":14},"in_reply_to":"5f7c97a3_67bf8cd0","updated":"2018-06-06 01:16:33.000000000","message":"I did create a read-only volume and attach it to a server and the block device disk config xml is set to readonly:\n\n    \u003cdisk type\u003d\u0027block\u0027 device\u003d\u0027disk\u0027\u003e\n      \u003cdriver name\u003d\u0027qemu\u0027 type\u003d\u0027raw\u0027 cache\u003d\u0027none\u0027 io\u003d\u0027native\u0027/\u003e\n      \u003csource dev\u003d\u0027/dev/sda\u0027/\u003e\n      \u003cbackingStore/\u003e\n      \u003ctarget dev\u003d\u0027vdb\u0027 bus\u003d\u0027virtio\u0027/\u003e\n      \u003creadonly/\u003e\n      \u003cserial\u003e70539836-fbb9-478d-9cd1-0e733c0eb0cc\u003c/serial\u003e\n      \u003calias name\u003d\u0027virtio-disk1\u0027/\u003e\n      \u003caddress type\u003d\u0027pci\u0027 domain\u003d\u00270x0000\u0027 bus\u003d\u00270x00\u0027 slot\u003d\u00270x05\u0027 function\u003d\u00270x0\u0027/\u003e\n    \u003c/disk\u003e\n\nSo we at least know that plumbing works.","commit_id":"04013216ea7c30ebcd4f0e93269c2b75ef8ee286"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9b444557da36e25ae7e6298aade3fb74418ab426","unresolved":false,"context_lines":[{"line_number":93,"context_line":"  Similar rules apply to the ``block_device_mapping_v2`` schema: default is"},{"line_number":94,"context_line":"  \"rw\" and the only other valid option is \"ro\"."},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"When creating or updating a volume attachment with a host connector dict, the"},{"line_number":97,"context_line":"``mode`` key will be added to the connector dict which is the current way to"},{"line_number":98,"context_line":"pass this information through to Cinder since it is not a top-level parameter"},{"line_number":99,"context_line":"on those APIs."},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"The compute RPC API version will be bumped to indicate which compute services"},{"line_number":102,"context_line":"support user-defined attach modes. This will allow us to check (and fail) from"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_2cf8837a","line":99,"range":{"start_line":96,"start_character":0,"end_line":99,"end_character":14},"in_reply_to":"5f7c97a3_6ca3db01","updated":"2018-06-06 13:03:53.000000000","message":"https://bugs.launchpad.net/cinder/+bug/1775397","commit_id":"04013216ea7c30ebcd4f0e93269c2b75ef8ee286"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"bf43af84c60aed325604f269f171d5a0026d583f","unresolved":false,"context_lines":[{"line_number":104,"context_line":"running on an old compute that does not yet support that functionality. That"},{"line_number":105,"context_line":"would result in a 409 error response to the user."},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"**Swap volume**"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"The ``PUT /servers/{server_id}/os-volume_attachments/{attachment_id}`` swap"},{"line_number":110,"context_line":"volume API request will not change. The block device mapping for the volume"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_76cd0585","line":107,"range":{"start_line":107,"start_character":0,"end_line":107,"end_character":15},"updated":"2018-06-05 15:58:19.000000000","message":"I\u0027m concerned about calling this against two devices marked as readyonly from a Libvirt point of view. We might want to make sure that\u0027s even possible before allowing this tbh.","commit_id":"04013216ea7c30ebcd4f0e93269c2b75ef8ee286"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0c52bcc0b52e84165844707a5f71cc0690d6ae4d","unresolved":false,"context_lines":[{"line_number":104,"context_line":"running on an old compute that does not yet support that functionality. That"},{"line_number":105,"context_line":"would result in a 409 error response to the user."},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"**Swap volume**"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"The ``PUT /servers/{server_id}/os-volume_attachments/{attachment_id}`` swap"},{"line_number":110,"context_line":"volume API request will not change. The block device mapping for the volume"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_33823154","line":107,"range":{"start_line":107,"start_character":0,"end_line":107,"end_character":15},"in_reply_to":"5f7c97a3_27875412","updated":"2018-06-06 01:39:38.000000000","message":"I created two read-only volumes, attached one and then swapped to the other and there were no failures in the n-cpu logs. Nova shows the swapped-to volume as the one that is attached, however, the guest xml still shows the original volume in the disk config xml:\n\nhttp://paste.openstack.org/show/722765/\n\nI\u0027m not sure if that\u0027s normal or I need to reboot the guest to get the updated domain xml in there? Anyway, it doesn\u0027t look like libvirt had a problem doing a read-only to read-only swap volume.","commit_id":"04013216ea7c30ebcd4f0e93269c2b75ef8ee286"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"bfe2eb09a6c5a99cc50c73fcbdedb9192606f5ba","unresolved":false,"context_lines":[{"line_number":104,"context_line":"running on an old compute that does not yet support that functionality. That"},{"line_number":105,"context_line":"would result in a 409 error response to the user."},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"**Swap volume**"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"The ``PUT /servers/{server_id}/os-volume_attachments/{attachment_id}`` swap"},{"line_number":110,"context_line":"volume API request will not change. The block device mapping for the volume"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_4c53483a","line":107,"range":{"start_line":107,"start_character":0,"end_line":107,"end_character":15},"in_reply_to":"5f7c97a3_33823154","updated":"2018-06-08 10:44:37.000000000","message":"Thanks for checking this and yeah this wasn\u0027t anything new, I was just concerned that it isn\u0027t tested at the moment and is something users could potentially use more often once this lands.\n\nFWIW I think it\u0027s expected to not see the updated volume on transient domains, `virsh domblklist $instance_uuid` should show it however.","commit_id":"04013216ea7c30ebcd4f0e93269c2b75ef8ee286"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5dee401dec5e48e4faf6a53403a8faaf37e15a4a","unresolved":false,"context_lines":[{"line_number":104,"context_line":"running on an old compute that does not yet support that functionality. That"},{"line_number":105,"context_line":"would result in a 409 error response to the user."},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"**Swap volume**"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"The ``PUT /servers/{server_id}/os-volume_attachments/{attachment_id}`` swap"},{"line_number":110,"context_line":"volume API request will not change. The block device mapping for the volume"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_27875412","line":107,"range":{"start_line":107,"start_character":0,"end_line":107,"end_character":15},"in_reply_to":"5f7c97a3_76cd0585","updated":"2018-06-05 18:25:12.000000000","message":"So in other words, swap volume with read-only attachments might not work, but that wouldn\u0027t be anything new, right? You can create read-only volumes today (if you\u0027re an admin anyway?) and then try to retype or live migrate them. Anyway, playing with this would take some time but it doesn\u0027t sound like this spec would be doing anything new - if it doesn\u0027t work today, this wouldn\u0027t make it work either. We just don\u0027t fail in some graceful way today, and we could get the opportunity to fail gracefully if we know the attach modes up front (although we can also figure that out from the connection_info dicts it sounds like).","commit_id":"04013216ea7c30ebcd4f0e93269c2b75ef8ee286"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"98cad251e3f8b9fdc1bac0bf57889db52e5229c8","unresolved":false,"context_lines":[{"line_number":110,"context_line":"volume API request will not change. The block device mapping for the volume"},{"line_number":111,"context_line":"being swapped *to* will have the same ``attach_mode`` as the volume being"},{"line_number":112,"context_line":"swapped *from*. For example, if volume A is attached to server X in read-only"},{"line_number":113,"context_line":"mode, and the user retypes the volume to B, then volume B will be attached to"},{"line_number":114,"context_line":"server X in read-only mode also."},{"line_number":115,"context_line":""},{"line_number":116,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_cde7adac","line":113,"range":{"start_line":113,"start_character":19,"end_line":113,"end_character":26},"updated":"2018-06-05 10:37:07.000000000","message":"side note: I wasn\u0027t familiar with this term\n\nhttps://access.redhat.com/solutions/2989371","commit_id":"04013216ea7c30ebcd4f0e93269c2b75ef8ee286"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"bf43af84c60aed325604f269f171d5a0026d583f","unresolved":false,"context_lines":[{"line_number":110,"context_line":"volume API request will not change. The block device mapping for the volume"},{"line_number":111,"context_line":"being swapped *to* will have the same ``attach_mode`` as the volume being"},{"line_number":112,"context_line":"swapped *from*. For example, if volume A is attached to server X in read-only"},{"line_number":113,"context_line":"mode, and the user retypes the volume to B, then volume B will be attached to"},{"line_number":114,"context_line":"server X in read-only mode also."},{"line_number":115,"context_line":""},{"line_number":116,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_d39c3010","line":113,"range":{"start_line":113,"start_character":19,"end_line":113,"end_character":26},"in_reply_to":"5f7c97a3_cde7adac","updated":"2018-06-05 15:58:19.000000000","message":"/me mumbles something about a pay wall.\n\nhttps://docs.openstack.org/cinder/latest/contributor/migration.html","commit_id":"04013216ea7c30ebcd4f0e93269c2b75ef8ee286"}]}
