A message for Linux.com registered users: We are in the process of making changes to the Linux forums. Starting Monday, 8/13/18 at 6:00 PM PT, you will be unable to access the forums. They will re-launch as soon as possible on Wednesday, 8/15/18 with new features and improved functionality. Thank you for your patience and stay tuned for the new improved forums.

January 5, 2018

Lab 4.1 Not working. Encrypted Volume is created but I can't attach to instance

Hi I've followed all step for this lab at least 4 times, but when I try to attach the encrypted volume it appears as attaching and then available. No error is shown either in BUI or CLI.

ubuntu@devstack-cc:~/devstack$ openstack volume type list
+--------------------------------------+-------------+-----------+
| ID                                   | Name        | Is Public |
+--------------------------------------+-------------+-----------+
| d5f58df2-a559-4cc0-af7b-540f23a77fd8 | LUKS        | True      |
| 03818bee-9880-44de-892e-92417ffea175 | lvmdriver-1 | True      |
+--------------------------------------+-------------+-----------+

ubuntu@devstack-cc:~/devstack$ cinder encryption-type-list
+--------------------------------------+---------------+-----------------+----------+
------------------+
| Volume Type ID                       | Provider      | Cipher          | Key Size |
 Control Location |
+--------------------------------------+---------------+-----------------+----------+
------------------+
| d5f58df2-a559-4cc0-af7b-540f23a77fd8 | LuksEncryptor | aes-xts-plain64 | 256      |
 front-end        |
+--------------------------------------+---------------+-----------------+----------+
------------------+

ubuntu@devstack-cc:~/devstack$ cinder show crypt-vol
+--------------------------------+--------------------------------------+
| Property                       | Value                                |
+--------------------------------+--------------------------------------+
| attached_servers               | []                                   |
| attachment_ids                 | []                                   |
| availability_zone              | nova                                 |
| bootable                       | false                                |
| consistencygroup_id            | None                                 |
| created_at                     | 2018-01-05T12:32:23.000000           |
| description                    | None                                 |
| encrypted                      | True                                 |
| id                             | d3d53c76-5c90-43b6-86e8-78bd64cf4931 |
| metadata                       |                                      |
| migration_status               | None                                 |
| multiattach                    | False                                |
| name                           | crypt-vol                            |
| os-vol-host-attr:host          | devstack-cc@lvmdriver-1#lvmdriver-1  |
| os-vol-mig-status-attr:migstat | None                                 |
| os-vol-mig-status-attr:name_id | None                                 |
| os-vol-tenant-attr:tenant_id   | 8f776fc3b99f40d1b31e03206f5b7d6a     |
| replication_status             | None                                 |
| size                           | 1                                    |
| snapshot_id                    | None                                 |
| source_volid                   | None                                 |
| status                         | available                            |
| updated_at                     | 2018-01-05T12:36:09.000000           |
| user_id                        | 4cb3d7e3538f4f8dbff60e3f1d074fbf     |
| volume_type                    | LUKS                                 |
+--------------------------------+--------------------------------------+

 

ubuntu@devstack-cc:~/devstack$ openstack volume list
+--------------------------------------+-----------+-----------+------+--------------
-------------------+
| ID                                   | Name      | Status    | Size | Attached to
                   |
+--------------------------------------+-----------+-----------+------+--------------
-------------------+
| d3d53c76-5c90-43b6-86e8-78bd64cf4931 | crypt-vol | available |    1 |
                   |
| ca554042-563d-4949-998f-425a98fd5fa6 |           | in-use    |    1 | Attached to g
olden on /dev/vda  |
+--------------------------------------+-----------+-----------+------+--------------
-------------------+

ubuntu@devstack-cc:~/devstack$ openstack server list
+--------------------------------------+--------+--------+---------------------------
------------------------------+-------+---------+
| f8eba3f9-c95c-45da-bbb3-a37ef3aafc89 | golden | ACTIVE | private=10.0.0.11, fdf9:81
a4:fd37:0:f816:3eff:fef6:a275 |       | m1.tiny |
+--------------------------------------+--------+--------+---------------------------
------------------------------+-------+---------+

ubuntu@devstack-cc:~/devstack$ openstack server add volume f8eba3f9-c95c-45da-bbb3-a3
7ef3aafc89 d3d53c76-5c90-43b6-86e8-78bd64cf4931 --device /dev/vdb
ubuntu@devstack-cc:~/devstack$ openstack volume list
+--------------------------------------+-----------+-----------+------+--------------
-------------------+
| ID                                   | Name      | Status    | Size | Attached to
                   |
+--------------------------------------+-----------+-----------+------+--------------
-------------------+
| d3d53c76-5c90-43b6-86e8-78bd64cf4931 | crypt-vol | available |    1 |
                   |
| ca554042-563d-4949-998f-425a98fd5fa6 |           | in-use    |    1 | Attached to g
olden on /dev/vda  |
+--------------------------------------+-----------+-----------+------+--------------
-------------------+
ubuntu@devstack-cc:~/devstack$ openstack volume list
+--------------------------------------+-----------+-----------+------+--------------
-------------------+
| ID                                   | Name      | Status    | Size | Attached to
                   |
+--------------------------------------+-----------+-----------+------+--------------
-------------------+
| d3d53c76-5c90-43b6-86e8-78bd64cf4931 | crypt-vol | available |    1 |
                   |
| ca554042-563d-4949-998f-425a98fd5fa6 |           | in-use    |    1 | Attached to g
olden on /dev/vda  |
+--------------------------------------+-----------+-----------+------+--------------
-------------------+
ubuntu@devstack-cc:~/devstack$

Click Here!