diff --git a/cinder/tests/unit/volume/drivers/test_rbd.py b/cinder/tests/unit/volume/drivers/test_rbd.py index 037bf0a4a40..1daf8ce3ffe 100644 --- a/cinder/tests/unit/volume/drivers/test_rbd.py +++ b/cinder/tests/unit/volume/drivers/test_rbd.py @@ -1169,7 +1169,8 @@ class RBDTestCase(test.TestCase): 'auth_username': self.cfg.rbd_user, 'secret_type': 'ceph', 'secret_uuid': None, - 'volume_id': self.volume_a.id + 'volume_id': self.volume_a.id, + 'discard': True, } } actual = self.driver.initialize_connection(self.volume_a, None) diff --git a/cinder/volume/drivers/rbd.py b/cinder/volume/drivers/rbd.py index 92f6b192bfc..eb777e81f44 100644 --- a/cinder/volume/drivers/rbd.py +++ b/cinder/volume/drivers/rbd.py @@ -1035,6 +1035,7 @@ class RBDDriver(driver.CloneableImageVD, 'secret_type': 'ceph', 'secret_uuid': self.configuration.rbd_secret_uuid, 'volume_id': volume.id, + "discard": True, } } LOG.debug('connection data: %s', data)