)]}'
{"id":"openstack%2Fceilometer~878125","triplet_id":"openstack%2Fceilometer~stable%2Fyoga~I3b4ac918015b2fd3fbe24047c3eb13419f580b27","project":"openstack/ceilometer","branch":"stable/yoga","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-04-11 10:41:13.000000000","reason":"Change was submitted"}},"hashtags":[],"change_id":"I3b4ac918015b2fd3fbe24047c3eb13419f580b27","subject":"NoUniqueMatch: ClientException on Gnocchi publisher","status":"MERGED","created":"2023-03-21 16:18:41.000000000","updated":"2023-04-11 10:43:17.000000000","submitted":"2023-04-11 10:41:13.000000000","submitter":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"total_comment_count":3,"unresolved_comment_count":0,"has_review_started":true,"submission_id":"878125-fix_gnocchi_project_id_discovery_concurrency_issue-upstream","meta_rev_id":"db0e32a5b2eb07566d29606b8c7f35c2e026c82f","_number":878125,"virtual_id_number":878125,"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-04-11 10:41:13.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:00.000000000","permitted_voting_range":{"min":1,"max":1},"_account_id":28356,"name":"Rafael Weingartner","email":"rafael@apache.org","username":"rafaelweingartner"},{"value":2,"date":"2023-04-11 09:22:27.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-04-11 09:22:27.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:41.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:00.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:22:14.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:33:04.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":"53fb7bd5b5b10f1437efabfc8bf298bad660b5f9","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:41.000000000","message":"Uploaded patch set 1.","accounts_in_message":[],"_revision_number":1},{"id":"a450266042ebbd849496f898499ba732726f2b82","tag":"autogenerated:gerrit:setTopic","author":{"_account_id":6737,"name":"Edward Hope-Morley","email":"edward.hope-morley@canonical.com","username":"hopem"},"date":"2023-03-21 16:21:08.000000000","message":"Topic set to fix_gnocchi_project_id_discovery_concurrency_issue-upstream","accounts_in_message":[],"_revision_number":1},{"id":"9ffc691d2137842e03daa7cee5507fdb028fa46a","author":{"_account_id":28356,"name":"Rafael Weingartner","email":"rafael@apache.org","username":"rafaelweingartner"},"date":"2023-03-21 17:03:00.000000000","message":"Patch Set 1: Code-Review+1","accounts_in_message":[],"_revision_number":1},{"id":"28c9ec3fa342c9c6b9416f3da0f469464d377162","author":{"_account_id":4264,"name":"Matthias Runge","email":"mrunge@redhat.com","username":"mrunge"},"date":"2023-03-21 17:22:14.000000000","message":"Patch Set 1: Code-Review-1\n\n(1 comment)","accounts_in_message":[],"_revision_number":1},{"id":"2fc8af825a42528d5cacd0978c6c15d7d14a770e","tag":"autogenerated:zuul:check","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2023-03-21 17:33:04.000000000","message":"Patch Set 1: Verified+1\n\nBuild succeeded (check pipeline).\nhttps://zuul.opendev.org/t/openstack/buildset/3f352702f98d4cda93441df9a733437e\n\n- openstack-tox-cover https://zuul.opendev.org/t/openstack/build/1615fb590575405fac51700454a3e032 : SUCCESS in 5m 22s\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/326225193b2c48cf891e0fa1a899e1bd : SUCCESS in 3m 36s\n- openstack-tox-py36 https://zuul.opendev.org/t/openstack/build/f38f07ded08e4e1a987d3539738b4237 : SUCCESS in 6m 31s\n- openstack-tox-py39 https://zuul.opendev.org/t/openstack/build/c0b4975731e640559e092dc29a273201 : SUCCESS in 6m 27s\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/737fe8cd740b4e06a1713c5a43bc8925 : SUCCESS in 5m 49s\n- openstack-tox-lower-constraints https://zuul.opendev.org/t/openstack/build/87e8f565ba9148b7977d586da52841f9 : SUCCESS in 6m 51s\n- grenade-ceilometer https://zuul.opendev.org/t/openstack/build/7f7e21d2eb784561833137131f8636f5 : FAILURE in 1h 04m 09s (non-voting)\n- telemetry-dsvm-integration-centos-8s https://zuul.opendev.org/t/openstack/build/5dd60bf5911749ce821cbebdf718b18e : SUCCESS in 59m 43s\n- telemetry-dsvm-integration-centos-8s-fips https://zuul.opendev.org/t/openstack/build/4cdb711741fb4a3781a68c55c2fa8056 : SUCCESS in 55m 24s\n- telemetry-dsvm-integration-centos-9s https://zuul.opendev.org/t/openstack/build/f26ec05ba95f4ac5b289c64624ee5206 : SUCCESS in 48m 44s\n- telemetry-dsvm-integration-centos-9s-fips https://zuul.opendev.org/t/openstack/build/695d6b1d45da448eaec76d9543796399 : SUCCESS in 50m 41s\n- telemetry-dsvm-integration https://zuul.opendev.org/t/openstack/build/059b2dbadfe94773aedfb1545e7edf44 : SUCCESS in 40m 54s\n- telemetry-dsvm-integration-ipv6-only https://zuul.opendev.org/t/openstack/build/da6b88c268bb42c4913b3c56dd3e8b39 : SUCCESS in 50m 58s","accounts_in_message":[],"_revision_number":1},{"id":"1101f723dc3178dc26d7baae17ecc2185aac91e6","author":{"_account_id":6737,"name":"Edward Hope-Morley","email":"edward.hope-morley@canonical.com","username":"hopem"},"date":"2023-04-05 18:58:58.000000000","message":"Patch Set 1:\n\n(1 comment)","accounts_in_message":[],"_revision_number":1},{"id":"5e33f976296bfe7358cf32c3926298b3a5b4c45e","author":{"_account_id":4264,"name":"Matthias Runge","email":"mrunge@redhat.com","username":"mrunge"},"date":"2023-04-11 09:22:27.000000000","message":"Patch Set 1: Code-Review+2 Workflow+1\n\n(1 comment)","accounts_in_message":[],"_revision_number":1},{"id":"5addbaa2281d95f6d7ea078b57ac74ed21646cd9","tag":"autogenerated:zuul:gate","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2023-04-11 09:23:02.000000000","message":"Patch Set 1: -Verified\n\nStarting gate jobs.","accounts_in_message":[],"_revision_number":1},{"id":"d0b55164c3d0ab1ea52e300e835c679782ed5a1c","tag":"autogenerated:zuul:gate","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2023-04-11 10:41:13.000000000","message":"Patch Set 1: Verified+2\n\nBuild succeeded (gate pipeline).\nhttps://zuul.opendev.org/t/openstack/buildset/bf9d161bd6594ef59a0471db73688d26\n\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/db3b7b4840c342869687b1cba947c5ee : SUCCESS in 3m 21s\n- openstack-tox-py36 https://zuul.opendev.org/t/openstack/build/8d1fd3abed324cd18473dcb4944c4e8b : SUCCESS in 7m 26s\n- openstack-tox-py39 https://zuul.opendev.org/t/openstack/build/5e3dc56befbe49ef9fccaf476648c9a0 : SUCCESS in 6m 34s\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/89f4656a41a44ef9bf6edbe278f7c583 : SUCCESS in 6m 00s\n- openstack-tox-lower-constraints https://zuul.opendev.org/t/openstack/build/d19b30b7d0314267998babc97805d70b : SUCCESS in 6m 35s\n- grenade-ceilometer https://zuul.opendev.org/t/openstack/build/cccc2cea4f7c4126a86c4c1775deefa8 : FAILURE in 55m 25s (non-voting)\n- telemetry-dsvm-integration-centos-8s https://zuul.opendev.org/t/openstack/build/fe1a96afc1d840b2b79b436521f6ace4 : SUCCESS in 1h 02m 40s\n- telemetry-dsvm-integration-centos-8s-fips https://zuul.opendev.org/t/openstack/build/35efbc869d8b46e2b7976c5c320cb089 : SUCCESS in 1h 13m 28s\n- telemetry-dsvm-integration-centos-9s https://zuul.opendev.org/t/openstack/build/0002b5f7e2a7418fb0e456d608247107 : SUCCESS in 48m 19s\n- telemetry-dsvm-integration-centos-9s-fips https://zuul.opendev.org/t/openstack/build/dedc720e8b4c4827ba7ef1a99b2f05c2 : SUCCESS in 49m 17s\n- telemetry-dsvm-integration https://zuul.opendev.org/t/openstack/build/903c326c0b9a444393f2f7ec7ea16e3b : SUCCESS in 53m 01s\n- telemetry-dsvm-integration-ipv6-only https://zuul.opendev.org/t/openstack/build/b15510c7d21a46ddac48c60392e9f1a4 : SUCCESS in 55m 16s","accounts_in_message":[],"_revision_number":1},{"id":"6ab6e4ec0a0a04ccce87f992a5c8effa5e87f27c","tag":"autogenerated:gerrit:merged","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2023-04-11 10:41:13.000000000","message":"Change has been successfully merged","accounts_in_message":[],"_revision_number":1},{"id":"db0e32a5b2eb07566d29606b8c7f35c2e026c82f","tag":"autogenerated:zuul:promote","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2023-04-11 10:43:17.000000000","message":"Patch Set 1:\n\nBuild succeeded (promote pipeline).\nhttps://zuul.opendev.org/t/openstack/buildset/bcaf8c9e8e1f45d3b258d71508391e5f\n\n- promote-openstack-tox-docs https://zuul.opendev.org/t/openstack/build/dbb2b7b5e3e245e88789c4d979376743 : SUCCESS in 46s","accounts_in_message":[],"_revision_number":1}],"current_revision_number":1,"current_revision":"b583cbcaae71e629cb27eb2fa4f44d3889049e72","revisions":{"b583cbcaae71e629cb27eb2fa4f44d3889049e72":{"kind":"REWORK","_number":1,"created":"2023-03-21 16:18:41.000000000","uploader":{"_account_id":6737,"name":"Edward Hope-Morley","email":"edward.hope-morley@canonical.com","username":"hopem"},"ref":"refs/changes/25/878125/1","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/ceilometer","ref":"refs/changes/25/878125/1","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/ceilometer refs/changes/25/878125/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/ceilometer refs/changes/25/878125/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/ceilometer refs/changes/25/878125/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/ceilometer refs/changes/25/878125/1"}}},"commit":{"parents":[{"commit":"9f6481163c3d86c6b38578a2fef8c6bdd29ae463","subject":"Merge \"Add centos9s jobs\" into stable/yoga","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/ceilometer/commit/9f6481163c3d86c6b38578a2fef8c6bdd29ae463"}]}],"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:18:31.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(cherry picked from commit a059600cd7cbc74c461b5cf3e18abdd770da797e)\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/ceilometer/commit/b583cbcaae71e629cb27eb2fa4f44d3889049e72"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/ceilometer/commit/b583cbcaae71e629cb27eb2fa4f44d3889049e72"}]},"branch":"refs/heads/stable/yoga"}},"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":{}}}]}
