'Ensure that the host exists and can accept the volume.'

def manage_existing(self, context, volume, request_spec, filter_properties=None):

    self._wait_for_scheduler()
    def _manage_existing_set_error(self, context, ex, request_spec):
        volume_state = {'volume_state': {'status': 'error_managing'}}
        self._set_volume_state_and_notify('manage_existing', volume_state, context, ex, request_spec)
    try:
        backend = self.driver.backend_passes_filters(context, volume.service_topic_queue, request_spec, filter_properties)
        volume.host = backend.host
        volume.cluster_name = backend.cluster_name
        volume.save()
    except exception.NoValidBackend as ex:
        _manage_existing_set_error(self, context, ex, request_spec)
    except Exception as ex:
        with excutils.save_and_reraise_exception():
            _manage_existing_set_error(self, context, ex, request_spec)
    else:
        volume_rpcapi.VolumeAPI().manage_existing(context, volume, request_spec.get('ref'))
