Bug 1325749 - Unable to restore encrypted volume when default exists [Docs]
Summary: Unable to restore encrypted volume when default exists [Docs]
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: documentation
Version: 8.0 (Liberty)
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Laura Marsh
QA Contact: RHOS Documentation Team
URL:
Whiteboard:
: 1325751 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-11 05:44 UTC by bkopilov
Modified: 2020-09-11 18:57 UTC (History)
10 users (show)

Fixed In Version: openstack-cinder-14.0.1-0.20190514050415.e85c70c.el8ost
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-09-11 18:57:51 UTC
Target Upstream Version:


Attachments (Terms of Use)
cinder-backup-02072019 (52.10 KB, text/plain)
2019-07-02 19:09 UTC, bkopilov
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1567263 0 None None None 2016-04-11 13:20:47 UTC
OpenStack gerrit 303709 0 'None' ABANDONED Fix wrong volume type of restore action 2020-09-10 17:12:12 UTC

Description bkopilov 2016-04-11 05:44:56 UTC
Description of problem:
Hi,
  Setup :  debian with devstack installation .
  Description:  The setup is configured with local lvm backend for cinder.
  [lvmdriver-1]
  lvm_type = default
  iscsi_helper = tgtadm
  volume_group = stack-volumes-lvmdriver-1
  volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver
  volume_backend_name = lvmdriver-1

  When we create an encrypted volume-type , the volume backup action done successfully but restore fails.
  The reason is that restore action done on the wrong volume type ( default LVM and not encrypted type)


  stack@debian:~$ cinder type-list
  +--------------------------------------+--------------------------------------------+-------------+-----------+
  |                  ID                  |                    Name                    | Description | Is_Public |
  +--------------------------------------+--------------------------------------------+-------------+-----------+
  | 73dba26b-9e1a-4203-a622-4fd5527ac704 |                lvmdriver-1                 |      -      |    True   |
  | abf68fd7-6f29-49f1-810a-f5179dfe5c41 | tempest-scenario-type-cryptsetup-766034649 |      -      |    True   |
  +--------------------------------------+--------------------------------------------+-------------+-----------+

  stack@debian:~$ cinder type-show tempest-scenario-type-cryptsetup-766034649
  +---------------------------------+--------------------------------------------+
  |             Property            |                   Value                    |
  +---------------------------------+--------------------------------------------+
  |           description           |                    None                    |
  |           extra_specs           |                     {}                     |
  |                id               |    abf68fd7-6f29-49f1-810a-f5179dfe5c41    |
  |            is_public            |                    True                    |
  |               name              | tempest-scenario-type-cryptsetup-766034649 |
  | os-volume-type-access:is_public |                    True                    |
  |           qos_specs_id          |                    None                    |
  +---------------------------------+--------------------------------------------+


  stack@debian:~$ cinder show 212cf84a-81c0-41bf-967a-13f62d20870b
  +--------------------------------+----------------------------------------------+
  |            Property            |                    Value                     |
  +--------------------------------+----------------------------------------------+
  |          attachments           |                      []                      |
  |       availability_zone        |                     nova                     |
  |            bootable            |                    false                     |
  |      consistencygroup_id       |                     None                     |
  |           created_at           |          2016-04-07T07:22:10.000000          |
  |          description           |                     None                     |
  |           encrypted            |                     True                     |
  |               id               |     212cf84a-81c0-41bf-967a-13f62d20870b     |
  |            metadata            |                      {}                      |
  |        migration_status        |                     None                     |
  |          multiattach           |                    False                     |
  |              name              | tempest-TestEncryptedCinderVolumes-743000316 |
  |     os-vol-host-attr:host      |  debian.example.com@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  |       b15fbad351a54d12b03ce67608c2d545       |
  |       replication_status       |                   disabled                   |
  |              size              |                      1                       |
  |          snapshot_id           |                     None                     |
  |          source_volid          |                     None                     |
  |             status             |                  available                   |
  |           updated_at           |          2016-04-07T07:29:39.000000          |
  |            user_id             |       e247edd4759345ab900ece2f2285c7ca       |
  |          volume_type           |  tempest-scenario-type-cryptsetup-766034649  |
  +--------------------------------+----------------------------------------------+

  stack@debian:~$ cinder backup-show 22d47be8-f151-461a-be90-e33553ccf711
  +-----------------------+----------------------------------------+
  |        Property       |                 Value                  |
  +-----------------------+----------------------------------------+
  |   availability_zone   |                  nova                  |
  |       container       |             volumebackups              |
  |       created_at      |       2016-04-07T07:28:54.000000       |
  |     data_timestamp    |       2016-04-07T07:28:54.000000       |
  |      description      |                  None                  |
  |      fail_reason      |                  None                  |
  | has_dependent_backups |                 False                  |
  |           id          |  22d47be8-f151-461a-be90-e33553ccf711  |
  |     is_incremental    |                 False                  |
  |          name         | tempest-scenario-type-backup-513595382 |
  |      object_count     |                   22                   |
  |          size         |                   1                    |
  |      snapshot_id      |                  None                  |
  |         status        |               available                |
  |       updated_at      |       2016-04-07T07:29:39.000000       |
  |       volume_id       |  212cf84a-81c0-41bf-967a-13f62d20870b  |
  +-----------------------+----------------------------------------+


  stack@debian:~$ cinder list --all-tenants
  +--------------------------------------+----------------------------------+-----------------+-----------------------------------------------------+------+--------------------------------------------+----------+-------------+
  |                  ID                  |            Tenant ID             |      Status     |                         Name                        | Size |                Volume Type                 | Bootable | Attached to |
  +--------------------------------------+----------------------------------+-----------------+-----------------------------------------------------+------+--------------------------------------------+----------+-------------+
  | 212cf84a-81c0-41bf-967a-13f62d20870b | b15fbad351a54d12b03ce67608c2d545 |    available    |     tempest-TestEncryptedCinderVolumes-743000316    |  1   | tempest-scenario-type-cryptsetup-766034649 |  false   |             |
  | b3ae2e35-180d-4181-8662-e33a08ce2532 | 833254ee96fc43b79dd9d17441b78c40 | error_restoring | restore_backup_22d47be8-f151-461a-be90-e33553ccf711 |  1   |                lvmdriver-1                 |  false   |             |
  +--------------------------------------+----------------------------------+-----------------+-----------------------------------------------------+------+--------------------------------------------+----------+-------------+

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. After install  , default volume-type exists  , its the only type.
2. Created volume-type and attach it to encrypted type.
3. Create volume , create backup 
4. Restore action will fail.

Actual results:
Restore fails


Expected results:
Restore should be to the original type and not the default.


Additional info:

Comment 2 Sergey Gotliv 2016-04-11 13:18:08 UTC
*** Bug 1325751 has been marked as a duplicate of this bug. ***

Comment 3 Sean Cohen 2016-07-21 14:46:09 UTC
Patch suggested upstream (https://review.openstack.org/#/c/303709/)
Moving to POST

Comment 4 Elise Gafford 2016-08-22 15:42:22 UTC
Patch abandoned upstream; moving back to ASSIGNED.

Comment 7 Elise Gafford 2016-11-01 16:51:49 UTC
No recent progress on this issue. Moving to RHOS 11 for triage.

Comment 9 Paul Grist 2018-03-22 21:23:46 UTC
Can we re-test this one soon as part of the Cinder-barbican testing?

Comment 10 Alan Bishop 2018-03-22 22:38:25 UTC
I'm pretty sure this is still an issue. The upstream launchpad bug is still open, and the upstream proposed fix was inadequate and was abandoned.

Comment 21 bkopilov 2019-07-02 19:09:41 UTC
Created attachment 1586840 [details]
cinder-backup-02072019

Comment 23 bkopilov 2019-07-03 05:29:43 UTC
cinder backup-restore  [backup_id]

Comment 32 Sofia Enriquez 2019-12-26 16:55:00 UTC
I've reproduced the steps in Comment #25. As Eric's comment points out, the backup restore uses default volume type which is not encrypted. The default_volume_type inside cinder.conf is lvmdriver-1, because of that the restore failed. 

I'm double checking the current documentation about this. As far as I concerned, we may need to update the documentation.

Comment 39 Sofia Enriquez 2020-08-07 16:56:20 UTC
Hi Laura,
the draft looks good! 
I added a comment in GitLab but I can't resolve thread because an error occurred while saving the draft comment.
Thanks!
Sofi


Note You need to log in before you can comment on or make changes to this bug.