Merge "Exclude metrics from "service" project"

This commit is contained in:
Zuul 2022-12-08 09:58:40 +00:00 committed by Gerrit Code Review
commit 341ec07827
3 changed files with 5 additions and 5 deletions

View File

@ -285,9 +285,9 @@ class GnocchiPublisher(publisher.ConfigPublisherBase):
name=self.filter_project,
domain=self.filter_domain)
except ka_exceptions.NotFound:
LOG.warning('filtered project not found in keystone,'
LOG.warning('project %s not found in keystone,'
' ignoring the filter_project '
'option')
'option', self.filter_project)
self.filter_project = None
return None
except Exception:

View File

@ -339,9 +339,9 @@ class PublisherTest(base.BaseTestCase):
def test_activity_gnocchi_project_not_found(self, logger):
self.ks_client.projects.find.side_effect = ka_exceptions.NotFound
self._do_test_activity_filter(2)
logger.warning.assert_called_with('filtered project not found in '
logger.warning.assert_called_with('project %s not found in '
'keystone, ignoring the '
'filter_project option')
'filter_project option', 'service')
def test_activity_filter_match_swift_event(self):
self.samples[0].name = 'storage.objects.outgoing.bytes'

View File

@ -208,7 +208,7 @@ function _ceilometer_configure_storage_backend {
if [ "$CEILOMETER_BACKEND" = 'none' ] ; then
echo_summary "All Ceilometer backends seems disabled, set \$CEILOMETER_BACKEND to select one."
elif [ "$CEILOMETER_BACKEND" = 'gnocchi' ] ; then
sed -i "s/gnocchi:\/\//gnocchi:\/\/?archive_policy=${GNOCCHI_ARCHIVE_POLICY}\&filter_project=gnocchi_swift/" $CEILOMETER_CONF_DIR/event_pipeline.yaml $CEILOMETER_CONF_DIR/pipeline.yaml
sed -i "s/gnocchi:\/\//gnocchi:\/\/?archive_policy=${GNOCCHI_ARCHIVE_POLICY}\&filter_project=service/" $CEILOMETER_CONF_DIR/event_pipeline.yaml $CEILOMETER_CONF_DIR/pipeline.yaml
! [[ $DEVSTACK_PLUGINS =~ 'gnocchi' ]] && configure_gnocchi
else
die $LINENO "Unable to configure unknown CEILOMETER_BACKEND $CEILOMETER_BACKEND"