)]}'
{"id":"openstack%2Fceilometer~878124","triplet_id":"openstack%2Fceilometer~stable%2Fzed~I3b4ac918015b2fd3fbe24047c3eb13419f580b27","project":"openstack/ceilometer","branch":"stable/zed","topic":"fix_gnocchi_project_id_discovery_concurrency_issue-upstream","attention_set":{},"removed_from_attention_set":{"6737":{"account":{"_account_id":6737,"name":"Edward Hope-Morley","email":"edward.hope-morley@canonical.com","username":"hopem"},"last_update":"2023-03-24 15:31:12.000000000","reason":"Change was submitted"}},"hashtags":[],"change_id":"I3b4ac918015b2fd3fbe24047c3eb13419f580b27","subject":"NoUniqueMatch: ClientException on Gnocchi publisher","status":"MERGED","created":"2023-03-21 16:18:04.000000000","updated":"2023-03-24 15:32:16.000000000","submitted":"2023-03-24 15:31:12.000000000","submitter":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"total_comment_count":0,"unresolved_comment_count":0,"has_review_started":true,"submission_id":"878124-fix_gnocchi_project_id_discovery_concurrency_issue-upstream","meta_rev_id":"90862f436ddaa4c2f1cc87801d730eda96c4f292","_number":878124,"virtual_id_number":878124,"owner":{"_account_id":6737,"name":"Edward Hope-Morley","email":"edward.hope-morley@canonical.com","username":"hopem"},"actions":{},"labels":{"Verified":{"approved":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"all":[{"value":0,"_account_id":28356,"name":"Rafael Weingartner","email":"rafael@apache.org","username":"rafaelweingartner"},{"value":0,"_account_id":4264,"name":"Matthias Runge","email":"mrunge@redhat.com","username":"mrunge"},{"tag":"autogenerated:zuul:gate","value":2,"date":"2023-03-24 15:31:12.000000000","permitted_voting_range":{"min":2,"max":2},"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"values":{"-2":"Fails","-1":"Doesn\u0027t seem to work"," 0":"No score","+1":"Works for me","+2":"Verified"},"description":"","default_value":0,"optional":true},"Code-Review":{"approved":{"_account_id":4264,"name":"Matthias Runge","email":"mrunge@redhat.com","username":"mrunge"},"recommended":{"_account_id":28356,"name":"Rafael Weingartner","email":"rafael@apache.org","username":"rafaelweingartner"},"all":[{"value":1,"date":"2023-03-21 17:03:07.000000000","permitted_voting_range":{"min":1,"max":1},"_account_id":28356,"name":"Rafael Weingartner","email":"rafael@apache.org","username":"rafaelweingartner"},{"value":2,"date":"2023-03-21 17:21:23.000000000","permitted_voting_range":{"min":2,"max":2},"_account_id":4264,"name":"Matthias Runge","email":"mrunge@redhat.com","username":"mrunge"},{"value":0,"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"values":{"-2":"Do not merge","-1":"This patch needs further work before it can be merged"," 0":"No score","+1":"Looks good to me, but someone else must approve","+2":"Looks good to me (core reviewer)"},"description":"","value":1,"default_value":0,"optional":true},"Workflow":{"approved":{"_account_id":4264,"name":"Matthias Runge","email":"mrunge@redhat.com","username":"mrunge"},"all":[{"value":0,"_account_id":28356,"name":"Rafael Weingartner","email":"rafael@apache.org","username":"rafaelweingartner"},{"value":1,"date":"2023-03-24 14:19:58.000000000","permitted_voting_range":{"min":1,"max":1},"_account_id":4264,"name":"Matthias Runge","email":"mrunge@redhat.com","username":"mrunge"},{"value":0,"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"values":{"-1":"Work in progress"," 0":"Ready for reviews","+1":"Approved"},"description":"","default_value":0,"optional":true}},"removable_reviewers":[],"reviewers":{"REVIEWER":[{"_account_id":4264,"name":"Matthias Runge","email":"mrunge@redhat.com","username":"mrunge"},{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},{"_account_id":28356,"name":"Rafael Weingartner","email":"rafael@apache.org","username":"rafaelweingartner"}]},"pending_reviewers":{},"reviewer_updates":[{"updated":"2023-03-21 16:18:04.000000000","updated_by":{"_account_id":6737,"name":"Edward Hope-Morley","email":"edward.hope-morley@canonical.com","username":"hopem"},"reviewer":{"_account_id":28356,"name":"Rafael Weingartner","email":"rafael@apache.org","username":"rafaelweingartner"},"state":"CC"},{"updated":"2023-03-21 17:03:07.000000000","updated_by":{"_account_id":28356,"name":"Rafael Weingartner","email":"rafael@apache.org","username":"rafaelweingartner"},"reviewer":{"_account_id":28356,"name":"Rafael Weingartner","email":"rafael@apache.org","username":"rafaelweingartner"},"state":"REVIEWER"},{"updated":"2023-03-21 17:21:23.000000000","updated_by":{"_account_id":4264,"name":"Matthias Runge","email":"mrunge@redhat.com","username":"mrunge"},"reviewer":{"_account_id":4264,"name":"Matthias Runge","email":"mrunge@redhat.com","username":"mrunge"},"state":"REVIEWER"},{"updated":"2023-03-21 17:36:28.000000000","updated_by":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"reviewer":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"state":"REVIEWER"}],"messages":[{"id":"ff7f79beb88d1589b11573be75cc08c43dec713a","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":6737,"name":"Edward Hope-Morley","email":"edward.hope-morley@canonical.com","username":"hopem"},"date":"2023-03-21 16:18:04.000000000","message":"Uploaded patch set 1.","accounts_in_message":[],"_revision_number":1},{"id":"58eda91f3cd9bce5e97f5152a5dd8a4bc70b4756","author":{"_account_id":28356,"name":"Rafael Weingartner","email":"rafael@apache.org","username":"rafaelweingartner"},"date":"2023-03-21 17:03:07.000000000","message":"Patch Set 1: Code-Review+1","accounts_in_message":[],"_revision_number":1},{"id":"4c5c5f4f617609925a2938e0be824629d0835172","author":{"_account_id":4264,"name":"Matthias Runge","email":"mrunge@redhat.com","username":"mrunge"},"date":"2023-03-21 17:21:23.000000000","message":"Patch Set 1: Code-Review+2","accounts_in_message":[],"_revision_number":1},{"id":"24723bdfab5c9edf5733b8649f6d6fcc3015aa1b","tag":"autogenerated:zuul:check","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2023-03-21 17:36:28.000000000","message":"Patch Set 1: Verified+1\n\nBuild succeeded (check pipeline).\nhttps://zuul.opendev.org/t/openstack/buildset/b3d41ac365ab485d86278914723126d1\n\n- openstack-tox-cover https://zuul.opendev.org/t/openstack/build/a440b6dc5b61463782526ccfd9055437 : SUCCESS in 5m 36s\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/c194402232c6409eae997a298267a140 : SUCCESS in 3m 16s\n- openstack-tox-py38 https://zuul.opendev.org/t/openstack/build/43b059832dab4e36abedf7e12be78b43 : SUCCESS in 5m 24s\n- openstack-tox-py39 https://zuul.opendev.org/t/openstack/build/c6ca30a18acd4aeb80da8e9837310872 : SUCCESS in 6m 09s\n- openstack-tox-py310 https://zuul.opendev.org/t/openstack/build/5acfedad2e744202bcbb841377b7c37b : SUCCESS in 6m 19s (non-voting)\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/eb3e12702ca94f58a50007887fb17e9e : SUCCESS in 7m 02s\n- grenade-ceilometer https://zuul.opendev.org/t/openstack/build/c4c7e8c1aacf476d9aa0d9d11a3622be : FAILURE in 1h 10m 14s (non-voting)\n- telemetry-dsvm-integration-centos-9s https://zuul.opendev.org/t/openstack/build/90622ed30d1d4494885578a064269c82 : SUCCESS in 52m 34s\n- telemetry-dsvm-integration-centos-9s-fips https://zuul.opendev.org/t/openstack/build/f3144a154cfb411b98f8f8848d99f9cf : SUCCESS in 56m 12s\n- telemetry-dsvm-integration https://zuul.opendev.org/t/openstack/build/0a1c7da6d2f242b5847ab358878cabbd : SUCCESS in 50m 55s\n- telemetry-dsvm-integration-ipv6-only https://zuul.opendev.org/t/openstack/build/c6a65b8d63c2457fae0d5b7fbb2ef2a0 : SUCCESS in 43m 10s","accounts_in_message":[],"_revision_number":1},{"id":"4d6ded9c6e950a7bccdb4ec7a1d02386059d8027","author":{"_account_id":4264,"name":"Matthias Runge","email":"mrunge@redhat.com","username":"mrunge"},"date":"2023-03-24 14:19:58.000000000","message":"Patch Set 1: Workflow+1","accounts_in_message":[],"_revision_number":1},{"id":"071e0f4463f8c9566b3059fc09dd02af793f0639","tag":"autogenerated:zuul:gate","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2023-03-24 14:20:41.000000000","message":"Patch Set 1: -Verified\n\nStarting gate jobs.","accounts_in_message":[],"_revision_number":1},{"id":"26c6988bbcbc2d6408ab3ba607f9b5a30974ee3b","tag":"autogenerated:zuul:gate","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2023-03-24 15:31:12.000000000","message":"Patch Set 1: Verified+2\n\nBuild succeeded (gate pipeline).\nhttps://zuul.opendev.org/t/openstack/buildset/72d42ff8d0a6461d8cea941bf85954c5\n\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/b7e47ef6840f4d9884ca829bf05620c4 : SUCCESS in 3m 48s\n- openstack-tox-py38 https://zuul.opendev.org/t/openstack/build/f17e17d230134db4bc187acbffb02061 : SUCCESS in 6m 09s\n- openstack-tox-py39 https://zuul.opendev.org/t/openstack/build/b62b522cbc6e4b2f8a87c1d2fe3393bc : SUCCESS in 5m 47s\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/490c9223dbbd40a9a995b87d0a6aa00f : SUCCESS in 6m 38s\n- grenade-ceilometer https://zuul.opendev.org/t/openstack/build/80d645f5f08e476fa5e1c2c22bd1279b : FAILURE in 1h 05m 26s (non-voting)\n- telemetry-dsvm-integration-centos-9s https://zuul.opendev.org/t/openstack/build/0a7c5278c4da434884d39c83ea2a12e7 : SUCCESS in 59m 37s\n- telemetry-dsvm-integration-centos-9s-fips https://zuul.opendev.org/t/openstack/build/5964c86f959f4421850afe618af771a1 : SUCCESS in 45m 15s\n- telemetry-dsvm-integration https://zuul.opendev.org/t/openstack/build/f9a707c9aafa447584cea22e4557fb9a : SUCCESS in 43m 37s\n- telemetry-dsvm-integration-ipv6-only https://zuul.opendev.org/t/openstack/build/1df8e7533c33448f8f0b4b24128ed54f : SUCCESS in 50m 35s","accounts_in_message":[],"_revision_number":1},{"id":"44349dd5aeb07775f76f06ef0b27c64fb72caa3c","tag":"autogenerated:gerrit:merged","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2023-03-24 15:31:12.000000000","message":"Change has been successfully merged","accounts_in_message":[],"_revision_number":1},{"id":"90862f436ddaa4c2f1cc87801d730eda96c4f292","tag":"autogenerated:zuul:promote","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2023-03-24 15:32:16.000000000","message":"Patch Set 1:\n\nBuild succeeded (promote pipeline).\nhttps://zuul.opendev.org/t/openstack/buildset/34a270ee708943ff80367b2d1662d52c\n\n- promote-openstack-tox-docs https://zuul.opendev.org/t/openstack/build/d66228624f4845ae98a8db63db3f9ca7 : SUCCESS in 43s","accounts_in_message":[],"_revision_number":1}],"current_revision_number":1,"current_revision":"a059600cd7cbc74c461b5cf3e18abdd770da797e","revisions":{"a059600cd7cbc74c461b5cf3e18abdd770da797e":{"kind":"REWORK","_number":1,"created":"2023-03-21 16:18:04.000000000","uploader":{"_account_id":6737,"name":"Edward Hope-Morley","email":"edward.hope-morley@canonical.com","username":"hopem"},"ref":"refs/changes/24/878124/1","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/ceilometer","ref":"refs/changes/24/878124/1","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/ceilometer refs/changes/24/878124/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/ceilometer refs/changes/24/878124/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/ceilometer refs/changes/24/878124/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/ceilometer refs/changes/24/878124/1"}}},"commit":{"parents":[{"commit":"38b7659ccad580cbf905a3646d78cf2ced483fc7","subject":"Add TCP publisher","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/ceilometer/commit/38b7659ccad580cbf905a3646d78cf2ced483fc7"}]}],"author":{"name":"Rafael Weingärtner","email":"rafael@apache.org","date":"2022-12-08 11:16:14.000000000","tz":-180},"committer":{"name":"Edward Hope-Morley","email":"edward.hope-morley@canonical.com","date":"2023-03-21 16:17:10.000000000","tz":0},"subject":"NoUniqueMatch: ClientException on Gnocchi publisher","message":"NoUniqueMatch: ClientException on Gnocchi publisher\n\nCeilometer can ignore/discard measurements that come from possible\nVMs that can be used to host Gnocchi. The assumption is that one\ncan use OpenStack itself to host the VMs that are used to run Gnocchi.\nThe configuration is called `filter_project`. This configuration can\nbe used in `event_pipeline.yaml` and `pipeline.yaml` configuration files.\nHowever, when this config is not used, it has a default project name\nfor Gnocchi as `service`, as we can see in the following code snippet:\n\n```\ndef __init__(self, conf, parsed_url):\n  super(GnocchiPublisher, self).__init__(conf, parsed_url)\n  # TODO(jd) allow to override Gnocchi endpoint via the host in the URL\n  options \u003d urlparse.parse_qs(parsed_url.query)\n  self.filter_project \u003d options.get(\u0027filter_project\u0027, [\u0027service\u0027])[-1]\n```\n\nWhich means that if somebody creates a project called `service`, this project would not push measurements to Gnocchi.\nThis configuration is then used by the following code:\n```\ndef gnocchi_project_id(self):\n       if self._gnocchi_project_id is not None:\n           return self._gnocchi_project_id\n       with self._gnocchi_project_id_lock:\n           if self._gnocchi_project_id is None:\n               try:\n                   project \u003d self._ks_client.projects.find(\n                       name\u003dself.filter_project,\n                       domain\u003dself.filter_domain)\n               except ka_exceptions.NotFound:\n                   LOG.warning(\u0027filtered project not found in keystone,\u0027\n                               \u0027 ignoring the filter_project \u0027\n                               \u0027option\u0027)\n                   self.filter_project \u003d None\n                   return None\n               except Exception:\n                   LOG.exception(\u0027fail to retrieve filtered project \u0027)\n                   raise\n               self._gnocchi_project_id \u003d project.id\n               LOG.debug(\"filtered project found: %s\",\n                         self._gnocchi_project_id)\n           return self._gnocchi_project_id\n```\n\nBasically, this method will look for the project ID of the project\nname that is configured in `filter_project` option. If it does not\nfind any project, it returns None, and it changes the value of\n`filter_project` to None as well. Before this `gnocchi_project_id`\nmethod/property is called, there is a verification if\n`filter_project` is None. Therefore, it is assumed that when we\nset the value of `filter_project` to None, this method\n(`gnocchi_project_id`) would not be called anymore.\nHowever, that is not taking into account concurrency parallel\nexecutions.\n\nIn the code, we can see `with self._gnocchi_project_id_lock:`\nstatement, which seems to execute locking in the execution flow.\nHowever, that will not always be the case because multiple\nconcurrent calls can be queued in that part of the code, and\nwhen the first one finishes setting the `filter_project` to None,\nthe others will execute with this variable as None, which will cause\nKeystone command `self._ks_client.projects.find` to find/list all\nprojects. That command was designed to list/find only one project;\ntherefore, when it finds more than one project, it throws an error.\nThat is the cause for the exception we were seeing from time to time\nin the log files.\n\nChange-Id: I3b4ac918015b2fd3fbe24047c3eb13419f580b27\n(cherry picked from commit 463594b229017b30a1c457aaf6d4cdfef2bb421c)\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/ceilometer/commit/a059600cd7cbc74c461b5cf3e18abdd770da797e"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/ceilometer/commit/a059600cd7cbc74c461b5cf3e18abdd770da797e"}]},"branch":"refs/heads/stable/zed"}},"requirements":[],"submit_records":[{"rule_name":"gerrit~DefaultSubmitRule","status":"CLOSED","labels":[{"label":"Verified","status":"MAY","applied_by":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}},{"label":"Code-Review","status":"MAY","applied_by":{"_account_id":4264,"name":"Matthias Runge","email":"mrunge@redhat.com","username":"mrunge"}},{"label":"Workflow","status":"MAY","applied_by":{"_account_id":4264,"name":"Matthias Runge","email":"mrunge@redhat.com","username":"mrunge"}}]}],"submit_requirements":[{"name":"Verified","description":"Verified in gate by CI","status":"SATISFIED","is_legacy":false,"submittability_expression_result":{"expression":"label:Verified\u003dMAX AND -label:Verified\u003dMIN","fulfilled":true,"status":"PASS","passing_atoms":["label:Verified\u003dMAX"],"failing_atoms":["label:Verified\u003dMIN"],"atom_explanations":{}}},{"name":"Code-Review","description":"Code reviewed by core reviewer","status":"SATISFIED","is_legacy":false,"submittability_expression_result":{"expression":"label:Code-Review\u003dMAX AND -label:Code-Review\u003dMIN","fulfilled":true,"status":"PASS","passing_atoms":["label:Code-Review\u003dMAX"],"failing_atoms":["label:Code-Review\u003dMIN"],"atom_explanations":{}}},{"name":"Workflow","description":"Approved for gate by core reviewer","status":"SATISFIED","is_legacy":false,"submittability_expression_result":{"expression":"label:Workflow\u003dMAX AND -label:Workflow\u003dMIN","fulfilled":true,"status":"PASS","passing_atoms":["label:Workflow\u003dMAX"],"failing_atoms":["label:Workflow\u003dMIN"],"atom_explanations":{}}}]}
