def reenable_replication(self, ctxt, volume_id):
    'Re-enable replication of secondary volume with primary volumes.'
    volume = self.db.volume_get(ctxt, volume_id)
    model_update = None
    try:
        utils.require_driver_initialized(self.driver)
    except exception.DriverNotInitialized:
        with excutils.save_and_reraise_exception():
            LOG.exception(_LE('Sync volume replica failed.'), resource=volume)
    try:
        model_update = self.driver.reenable_replication(ctxt, volume)
    except exception.CinderException:
        err_msg = _('Synchronizing secondary volume to primary failed.')
        raise exception.ReplicationError(reason=err_msg, volume_id=volume_id)
    try:
        if model_update:
            volume = self.db.volume_update(ctxt, volume_id, model_update)
    except exception.CinderException:
        err_msg = (_('Failed updating model with driver provided model %(model)s') % {'model': model_update})
        raise exception.ReplicationError(reason=err_msg, volume_id=volume_id)
Re-enable replication of secondary volume with primary volumes.
def reenable_replication(self, ctxt, volume_id):
    
    volume = self.db.volume_get(ctxt, volume_id)
    model_update = None
    try:
        utils.require_driver_initialized(self.driver)
    except exception.DriverNotInitialized:
        with excutils.save_and_reraise_exception():
            LOG.exception(_LE('Sync volume replica failed.'), resource=volume)
    try:
        model_update = self.driver.reenable_replication(ctxt, volume)
    except exception.CinderException:
        err_msg = _('Synchronizing secondary volume to primary failed.')
        raise exception.ReplicationError(reason=err_msg, volume_id=volume_id)
    try:
        if model_update:
            volume = self.db.volume_update(ctxt, volume_id, model_update)
    except exception.CinderException:
        err_msg = (_('Failed updating model with driver provided model %(model)s') % {'model': model_update})
        raise exception.ReplicationError(reason=err_msg, volume_id=volume_id)