Hi Manoj,

Snapshot attachment is a feature used to create backups from a snapshot efficiently if the driver supports it.
This functionality is not exposed to users and is an optimization rather than a feature that a backend supports.
See patch[1] which corrects its description in the support matrix.

[1] https://review.opendev.org/c/openstack/cinder/+/800015

On Mon, Aug 9, 2021 at 2:55 PM Katari Kumar <katkumar@in.ibm.com> wrote:
Hi everyone, 

Is snapshot attachment supported by openstack ? does it really look for the sanpshot table when we perform attachemnt with snapshot id? 
i see this error below
 stack@altranvm4:~$ cinder list
 +--------------------------------------+-----------+--------------------------+------+-----------------+----------+-------------+
| ID                                   | Status    | Name                     | Size | Volume Type     | Bootable | Attached to |
 +--------------------------------------+-----------+--------------------------+------+-----------------+----------+-------------+
| 418f5dd9-bed9-4a04-abf4-26cae153beb7 | available | non-rep-vol1             | 1    | vol_type_auto_0 | false    |             |
| e646f5ca-071d-4e3d-b8a9-844301e703a5 | available | clone_non_rep_vol_auto_0 | 1    | vol_type_auto_1 | false    |             |
 +--------------------------------------+-----------+--------------------------+------+-----------------+----------+-------------+
stack@altranvm4:~$ cinder snapshot-list
+--------------------------------------+--------------------------------------+-----------+-----------+------+----------------------------------+
| ID                                   | Volume ID                            | Status    | Name      | Size | User ID                          |
+--------------------------------------+--------------------------------------+-----------+-----------+------+----------------------------------+
| e229406e-3b93-4c4c-aabb-43e017bd0c1a | 418f5dd9-bed9-4a04-abf4-26cae153beb7 | available | snap-vol1 | 1    | 2f9f21f8794d430fb7d425cf7243c22a |
+--------------------------------------+--------------------------------------+-----------+-----------+------+----------------------------------+
stack@altranvm4:~$ openstack server list
+--------------------------------------+-------------+--------+------------------------+--------------------------+-----------+
| ID                                   | Name        | Status | Networks               | Image                    | Flavor    |
+--------------------------------------+-------------+--------+------------------------+--------------------------+-----------+
| 46958490-f41f-4a98-9a7a-ae1f93b8b73e | host_auto_0 | ACTIVE | shared=192.168.233.6   | cirros-0.5.2-x86_64-disk | cirros256 |
| 3026096b-efb4-4dd5-a73b-804d87c1ca1e | testhost1   | ACTIVE | shared=192.168.233.138 | cirros-0.5.2-x86_64-disk | cirros256 |
+--------------------------------------+-------------+--------+------------------------+--------------------------+-----------+
 stack@altranvm4:~$ openstack server add volume 3026096b-efb4-4dd5-a73b-804d87c1ca1e e229406e-3b93-4c4c-aabb-43e017bd0c1a
 No volume with a name or ID of 'e229406e-3b93-4c4c-aabb-43e017bd0c1a' exists.

 it is looking for the id in the volume table , where as the id given is a snapshot
 Cinder support matrix (https://docs.openstack.org/cinder/latest/reference/support-matrix.html) says many drivers are supporting snapshot attachment. i wonder how ?
 Even the '#cinder attachment-create' gives the same error if snapshot is used for attachment.
 
BR,
Manoj Katari