Bug 1500294

Summary: Cinder backup does not encode correct features in Ceph Objects for Ceph Mirroring
Product: Red Hat OpenStack Reporter: Ganesh Kadam <gkadam>
Component: openstack-cinderAssignee: Jon Bernard <jobernar>
Status: CLOSED ERRATA QA Contact: Avi Avraham <aavraham>
Severity: medium Docs Contact:
Priority: medium    
Version: 10.0 (Newton)CC: eharney, jobernar, mlopes, slinaber, srevivo, tshefi
Target Milestone: z7Keywords: Triaged, ZStream
Target Release: 10.0 (Newton)   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: openstack-cinder-9.1.4-17.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1509326 (view as bug list) Environment:
Last Closed: 2018-02-27 16:39:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1509326    

Description Ganesh Kadam 2017-10-10 11:00:29 UTC
Description of problem:

While configuring Ceph Mirroring, One of our Architect have discovered a bug in the cinder-volume service a bug in the cinder backup driver for Ceph.

In the file, $PYTHON_LIB/cinder/backup/drivers/ceph.py 

The _get_rbd_support() in cinder/backup/drivers/ceph.py is called whenever a new backup object is created. In this function, it only sets TWO features, layering and striping, and it DOES NOT reference the settings in /etc/ceph/ceph.conf. We need more than this feature for Ceph mirroring to work.

    def _get_rbd_support(self):
        """Determine RBD features supported by our version of librbd."""
        old_format = True
        features = 0
        if self._supports_layering:
            old_format = False
            features |= self.rbd.RBD_FEATURE_LAYERING
        if self._supports_stripingv2:
            old_format = False
            features |= self.rbd.RBD_FEATURE_STRIPINGV2



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

RHSOP10

[heat-admin@laxmain-controller0 ~]$ rpm -qa | grep cinder
openstack-cinder-9.1.4-6.el7ost.noarch
python-cinderclient-1.9.0-6.el7ost.noarch
python-cinder-9.1.4-6.el7ost.noarch
puppet-cinder-9.5.0-2.el7ost.noarch



How reproducible:

To test that this is the problem, They forced the features to be 125 (for other services we set this in rbd_default_features in /etc/ceph/ceph.conf, but cinder-backup doesn't read this file for some reason). 

This looks like it MIGHT be fixed in upstream, but they have not tested the code as of yet:

~~~
http://git.openstack.org/cgit/openstack/cinder/tree/cinder/backup/drivers/ceph.py#n238
~~~

Cu would like to have a hotfix for this at the earliest convenience.

Comment 6 Tzach Shefi 2018-02-08 19:58:35 UTC
Hi Jon, 
Got an osp11 bz clone for this bug with needinfo set on Eric asking how to verify this same bz.

Maybe you have an idea what/how I should verify this bz?

Comment 8 Jon Bernard 2018-02-13 18:57:11 UTC
Tzach, you'll have to do this manually.  On OSP10, configure the backup pool to be mirrored to a secondary ceph cluster, and then create a volume backup.  If the image features are managed correctly, the backup image should show up in the secondary pool.  I'm happy to help with this if needed, just let me know.

Comment 10 errata-xmlrpc 2018-02-27 16:39:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0360