)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"af3e3ec41a276ec88b11e8f0dada7ae1614d4a7b","unresolved":false,"context_lines":[{"line_number":7,"context_line":"block_device: Copy original volume_type when missing for snapshot based volumes"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Attempts to launch an instance from an encrypted volume snapshot would"},{"line_number":10,"context_line":"previously fail if a volume_type was not specified in the"},{"line_number":11,"context_line":"block_device_mapping of the boot request."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"To avoid such failures DriverVolSnapshotBlockDevice will now attempt to"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3fa7e38b_6c3fbd85","line":10,"updated":"2019-11-25 17:04:28.000000000","message":"So clearly this is some cinder API wrinkle when creating a volume from a snapshot yeah? Because if encryption is not involved then it seems that we don\u0027t need to provide a volume type and it\u0027s been fine thus far. I only wonder if we might have a problem where this is a behavior change for non-encrypted volume snapshots where the original volume type is gone so we\u0027ll now fail the boot from volume due to the volume create failing by specifying a volume type that no longer exists. I think in the non-encrypted volume snapshot case, if a volume type isn\u0027t specified cinder will just apply the default volume type correct?","commit_id":"5679a0bf99c17ff336fa520c9cdfad5156c6c9d2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"75a0ce3a1b180ed420b300da94ac5f0168e613c4","unresolved":false,"context_lines":[{"line_number":7,"context_line":"block_device: Copy original volume_type when missing for snapshot based volumes"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Attempts to launch an instance from an encrypted volume snapshot would"},{"line_number":10,"context_line":"previously fail if a volume_type was not specified in the"},{"line_number":11,"context_line":"block_device_mapping of the boot request."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"To avoid such failures DriverVolSnapshotBlockDevice will now attempt to"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3fa7e38b_6c0d7de5","line":10,"in_reply_to":"3fa7e38b_6c3fbd85","updated":"2019-11-25 17:06:03.000000000","message":"It looks like the volume details include an \"encrypted\" boolean:\n\nhttps://docs.openstack.org/api-ref/block-storage/v3/?expanded\u003dshow-a-volume-s-details-detail#show-a-volume-s-details\n\nShould we only pass the volume_type to volume create if the original snapshot volume was encrypted? Or at least confirm that if the volume type we\u0027re about to pass doesn\u0027t exist, that we can ignore passing it if the original volume is not encrypted?","commit_id":"5679a0bf99c17ff336fa520c9cdfad5156c6c9d2"}],"nova/virt/block_device.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"75a0ce3a1b180ed420b300da94ac5f0168e613c4","unresolved":false,"context_lines":[{"line_number":744,"context_line":"                                               self.snapshot_id)"},{"line_number":745,"context_line":"            # NOTE(lyarwood): Try to use the original volume type if one isn\u0027t"},{"line_number":746,"context_line":"            # set against the bdm but is on the original volume."},{"line_number":747,"context_line":"            if not self.volume_type and snapshot.get(\u0027volume_id\u0027):"},{"line_number":748,"context_line":"                snap_volume_id \u003d snapshot.get(\u0027volume_id\u0027)"},{"line_number":749,"context_line":"                orig_volume \u003d volume_api.get(context, snap_volume_id)"},{"line_number":750,"context_line":"                self.volume_type \u003d orig_volume.get(\u0027volume_type_id\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_8c2d5947","line":747,"updated":"2019-11-25 17:06:03.000000000","message":"Per my question in the commit message, should we only pass the volume type if orig_volume[\u0027encrypted\u0027]?","commit_id":"5679a0bf99c17ff336fa520c9cdfad5156c6c9d2"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"4f0bcde2d976683955be65ac6adec42e2820a059","unresolved":false,"context_lines":[{"line_number":744,"context_line":"                                               self.snapshot_id)"},{"line_number":745,"context_line":"            # NOTE(lyarwood): Try to use the original volume type if one isn\u0027t"},{"line_number":746,"context_line":"            # set against the bdm but is on the original volume."},{"line_number":747,"context_line":"            if not self.volume_type and snapshot.get(\u0027volume_id\u0027):"},{"line_number":748,"context_line":"                snap_volume_id \u003d snapshot.get(\u0027volume_id\u0027)"},{"line_number":749,"context_line":"                orig_volume \u003d volume_api.get(context, snap_volume_id)"},{"line_number":750,"context_line":"                self.volume_type \u003d orig_volume.get(\u0027volume_type_id\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_6cfedd6a","line":747,"in_reply_to":"3fa7e38b_8c2d5947","updated":"2019-11-25 17:28:02.000000000","message":"As discussed I believe this is safe for non-encrypted volumes as we can\u0027t delete volume types that are still referenced and also can\u0027t delete volumes referenced by snapshots.","commit_id":"5679a0bf99c17ff336fa520c9cdfad5156c6c9d2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6cd3a273413a6f0590e2aa24be96910f1266ba3c","unresolved":false,"context_lines":[{"line_number":746,"context_line":"            # set against the bdm but is on the original volume."},{"line_number":747,"context_line":"            if not self.volume_type and snapshot.get(\u0027volume_id\u0027):"},{"line_number":748,"context_line":"                snap_volume_id \u003d snapshot.get(\u0027volume_id\u0027)"},{"line_number":749,"context_line":"                orig_volume \u003d volume_api.get(context, snap_volume_id)"},{"line_number":750,"context_line":"                self.volume_type \u003d orig_volume.get(\u0027volume_type_id\u0027)"},{"line_number":751,"context_line":""},{"line_number":752,"context_line":"            self.volume_id, self.attachment_id \u003d self._create_volume("}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_cceb51da","line":749,"range":{"start_line":749,"start_character":30,"end_line":749,"end_character":69},"updated":"2019-11-25 17:09:08.000000000","message":"Can this raise a 404 if the original volume is gone? Actually I\u0027m not even sure you can delete the original volume if it has snapshots, so likely not an issue. And for that matter, I\u0027m not sure you can delete a volume type while there are volumes using it.","commit_id":"5679a0bf99c17ff336fa520c9cdfad5156c6c9d2"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"4f0bcde2d976683955be65ac6adec42e2820a059","unresolved":false,"context_lines":[{"line_number":746,"context_line":"            # set against the bdm but is on the original volume."},{"line_number":747,"context_line":"            if not self.volume_type and snapshot.get(\u0027volume_id\u0027):"},{"line_number":748,"context_line":"                snap_volume_id \u003d snapshot.get(\u0027volume_id\u0027)"},{"line_number":749,"context_line":"                orig_volume \u003d volume_api.get(context, snap_volume_id)"},{"line_number":750,"context_line":"                self.volume_type \u003d orig_volume.get(\u0027volume_type_id\u0027)"},{"line_number":751,"context_line":""},{"line_number":752,"context_line":"            self.volume_id, self.attachment_id \u003d self._create_volume("}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_acc055e1","line":749,"range":{"start_line":749,"start_character":30,"end_line":749,"end_character":69},"in_reply_to":"3fa7e38b_cceb51da","updated":"2019-11-25 17:28:02.000000000","message":"Took a while to track this down but yes by default this fails:\n\nhttps://github.com/openstack/cinder/blob/62b69b51aab32500d3aa76677011f9db4bf4c14c/cinder/volume/api.py#L458-L472","commit_id":"5679a0bf99c17ff336fa520c9cdfad5156c6c9d2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fb4655d815a6f9d33caae1ea2784649adfeac3f2","unresolved":false,"context_lines":[{"line_number":747,"context_line":"            if not self.volume_type and snapshot.get(\u0027volume_id\u0027):"},{"line_number":748,"context_line":"                snap_volume_id \u003d snapshot.get(\u0027volume_id\u0027)"},{"line_number":749,"context_line":"                orig_volume \u003d volume_api.get(context, snap_volume_id)"},{"line_number":750,"context_line":"                self.volume_type \u003d orig_volume.get(\u0027volume_type_id\u0027)"},{"line_number":751,"context_line":""},{"line_number":752,"context_line":"            self.volume_id, self.attachment_id \u003d self._create_volume("},{"line_number":753,"context_line":"                context, instance, volume_api, self.volume_size,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_ac013506","line":750,"range":{"start_line":750,"start_character":52,"end_line":750,"end_character":66},"updated":"2019-11-25 16:54:32.000000000","message":"https://docs.openstack.org/api-ref/block-storage/v3/?expanded\u003dshow-a-volume-s-details-detail#show-a-volume-s-details says the parameter is \"volume_type\" not volume_type_id, so is the API reference wrong or does it also return volume_type_id and that\u0027s just not documented (I wouldn\u0027t be surprised if the cinder API reference is wrong, I\u0027ve fixed quite a few things like this in there).","commit_id":"5679a0bf99c17ff336fa520c9cdfad5156c6c9d2"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"59d887d5fbdaa4ef63a0b04fcc156668d3aa784e","unresolved":false,"context_lines":[{"line_number":747,"context_line":"            if not self.volume_type and snapshot.get(\u0027volume_id\u0027):"},{"line_number":748,"context_line":"                snap_volume_id \u003d snapshot.get(\u0027volume_id\u0027)"},{"line_number":749,"context_line":"                orig_volume \u003d volume_api.get(context, snap_volume_id)"},{"line_number":750,"context_line":"                self.volume_type \u003d orig_volume.get(\u0027volume_type_id\u0027)"},{"line_number":751,"context_line":""},{"line_number":752,"context_line":"            self.volume_id, self.attachment_id \u003d self._create_volume("},{"line_number":753,"context_line":"                context, instance, volume_api, self.volume_size,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_0c6969bc","line":750,"range":{"start_line":750,"start_character":52,"end_line":750,"end_character":66},"in_reply_to":"3fa7e38b_ac013506","updated":"2019-11-25 16:59:18.000000000","message":"It\u0027s actually our own summary translation code in Nova that causes this:\n\nhttps://github.com/openstack/nova/blob/6fea2682364cddf66c499936a8c66895ef94dd5b/nova/volume/cinder.py#L313","commit_id":"5679a0bf99c17ff336fa520c9cdfad5156c6c9d2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"034b57bad77370860e61e2f7c8f7857c8354aa85","unresolved":false,"context_lines":[{"line_number":747,"context_line":"            if not self.volume_type and snapshot.get(\u0027volume_id\u0027):"},{"line_number":748,"context_line":"                snap_volume_id \u003d snapshot.get(\u0027volume_id\u0027)"},{"line_number":749,"context_line":"                orig_volume \u003d volume_api.get(context, snap_volume_id)"},{"line_number":750,"context_line":"                self.volume_type \u003d orig_volume.get(\u0027volume_type_id\u0027)"},{"line_number":751,"context_line":""},{"line_number":752,"context_line":"            self.volume_id, self.attachment_id \u003d self._create_volume("},{"line_number":753,"context_line":"                context, instance, volume_api, self.volume_size,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_ac78558e","line":750,"range":{"start_line":750,"start_character":52,"end_line":750,"end_character":66},"in_reply_to":"3fa7e38b_ac013506","updated":"2019-11-25 16:59:23.000000000","message":"OK the API reference is correct:\n\nhttps://github.com/openstack/cinder/blob/62b69b51aab32500d3aa76677011f9db4bf4c14c/cinder/api/v2/views/volumes.py#L81\n\nIt\u0027s us that\u0027s weird:\n\nhttps://github.com/openstack/nova/blob/6fea2682364cddf66c499936a8c66895ef94dd5b/nova/volume/cinder.py#L313","commit_id":"5679a0bf99c17ff336fa520c9cdfad5156c6c9d2"}]}
