ceph mirror mirroring -- Retype replicatione_enable to disable failed

Bug #1828386 reported by renminmin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
renminmin

Bug Description

root@controller:~# cinder type-list
+--------------------------------------+-----------------+-------------+-----------+
| ID | Name | Description | Is_Public |
+--------------------------------------+-----------------+-------------+-----------+
| 2d5dce38-78c2-4e21-99fa-500a9455563e | ceph-mirror | - | True |
| 93d80945-52ba-46f8-a3e2-f70455e96675 | ceph-non-mirror | - | True |
+--------------------------------------+-----------------+-------------+-----------+
root@controller:~# cinder extra-specs-list
+--------------------------------------+-----------------+----------------------------------------------------------------------------+
| ID | Name | extra_specs |
+--------------------------------------+-----------------+----------------------------------------------------------------------------+
| 2d5dce38-78c2-4e21-99fa-500a9455563e | ceph-mirror | {'replication_enabled': '<is> True', 'volume_backend_name': 'ceph_mirror'} |
| 93d80945-52ba-46f8-a3e2-f70455e96675 | ceph-non-mirror | {'volume_backend_name': 'ceph_mirror'} |
+--------------------------------------+-----------------+----------------------------------------------------------------------------+

### Create volume replication disabled
# cinder show b1f873a1-a9df-4316-860e-3eec551b2651
+--------------------------------+--------------------------------------+
| Property | Value |
+--------------------------------+--------------------------------------+
| attached_servers | [] |
| attachment_ids | [] |
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2019-05-09T10:00:18.000000 |
| description | None |
| encrypted | False |
| id | b1f873a1-a9df-4316-860e-3eec551b2651 |
| metadata | |
| migration_status | None |
| multiattach | False |
| name | None |
| os-vol-host-attr:host | compute@ceph_mirror#ceph_mirror |
| os-vol-mig-status-attr:migstat | None |
| os-vol-mig-status-attr:name_id | None |
| os-vol-tenant-attr:tenant_id | f6c70c7cec7e4cb38a916241853b848f |
| replication_status | disabled |
| size | 1 |
| snapshot_id | None |
| source_volid | None |
| status | available |
| updated_at | 2019-05-09T10:00:17.000000 |
| user_id | 8022c7be73964314a5478e39f799c8b9 |
| volume_type | ceph-non-mirror |
+--------------------------------+--------------------------------------+

### Checking rbd mirror status and image features
# rbd -c /etc/ceph/ceph_mirror.conf --user cinder_test mirror image status mirror/volume-b1f873a1-a9df-4316-860e-3eec551b2651
rbd: mirroring not enabled on the image

# rbd -c /etc/ceph/ceph_mirror.conf --user cinder_test info mirror/volume-b1f873a1-a9df-4316-860e-3eec551b2651
rbd image 'volume-b1f873a1-a9df-4316-860e-3eec551b2651':
        size 1 GiB in 256 objects
        order 22 (4 MiB objects)
        id: 1530f6b8b4567
        block_name_prefix: rbd_data.1530f6b8b4567
        format: 2
        features: layering, exclusive-lock, object-map, fast-diff, deep-flatten
        op_features:
        flags:
        create_timestamp: Thu May 9 10:00:19 2019

### Retype volume to replication enabled
root@controller:~# cinder retype bef18d01-44a1-4f2a-bb63-d6f3f8abe431 ceph-mirror
# cinder show b1f873a1-a9df-4316-860e-3eec551b2651
+--------------------------------+--------------------------------------+
| Property | Value |
+--------------------------------+--------------------------------------+
| attached_servers | [] |
| attachment_ids | [] |
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2019-05-09T10:00:18.000000 |
| description | None |
| encrypted | False |
| id | b1f873a1-a9df-4316-860e-3eec551b2651 |
| metadata | |
| migration_status | None |
| multiattach | False |
| name | None |
| os-vol-host-attr:host | compute@ceph_mirror#ceph_mirror |
| os-vol-mig-status-attr:migstat | None |
| os-vol-mig-status-attr:name_id | None |
| os-vol-tenant-attr:tenant_id | f6c70c7cec7e4cb38a916241853b848f |
| replication_status | disabled |
| size | 1 |
| snapshot_id | None |
| source_volid | None |
| status | available |
| updated_at | 2019-05-09T10:02:45.000000 |
| user_id | 8022c7be73964314a5478e39f799c8b9 |
| volume_type | ceph-mirror |
+--------------------------------+--------------------------------------+
root@compute:~# rbd -c /etc/ceph/ceph_mirror.conf --user cinder_test info mirror/volume-b1f873a1-a9df-4316-860e-3eec551b2651
rbd image 'volume-b1f873a1-a9df-4316-860e-3eec551b2651':
        size 1 GiB in 256 objects
        order 22 (4 MiB objects)
        id: 1530f6b8b4567
        block_name_prefix: rbd_data.1530f6b8b4567
        format: 2
        features: layering, exclusive-lock, object-map, fast-diff, deep-flatten
        op_features:
        flags:
        create_timestamp: Thu May 9 10:00:19 2019
root@compute:~# rbd -c /etc/ceph/ceph_mirror.conf --user cinder_test mirror image status mirror/volume-b1f873a1-a9df-4316-860e-3eec551b2651
rbd: mirroring not enabled on the image

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.opendev.org/657985

Changed in cinder:
assignee: nobody → renminmin (rmm0811)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.opendev.org/657985
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=0d22547fd246be4b09536c2da633af421e9c7df0
Submitter: Zuul
Branch: master

commit 0d22547fd246be4b09536c2da633af421e9c7df0
Author: Minmin Ren <email address hidden>
Date: Thu May 9 10:21:07 2019 +0000

    Correct new_type type in VolumeManager retype method

    The retype method in class VolumeManager should pass
    objects.VolumeType new_type to driver, same with the old
    volume type.

    Change-Id: Ie7165b02119f0e49902a6393fbfd33fd35ce270c
    Closes-Bug: #1828386

Changed in cinder:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.