Description of problem: Failed to delete a metric from resource during resource update. gnocchi --debug resource update -d 'mymetric' 76e06ba3-3c4a-4c9c-ba0e-af6551b6e173 ... Traceback (most recent call last): File "/usr/bin/gnocchi", line 10, in <module> sys.exit(main()) File "/usr/lib/python2.7/site-packages/gnocchiclient/shell.py", line 209, in main return GnocchiShell().run(args) File "/usr/lib/python2.7/site-packages/cliff/app.py", line 255, in run result = self.run_subcommand(remainder) File "/usr/lib/python2.7/site-packages/cliff/app.py", line 374, in run_subcommand result = cmd.run(parsed_args) File "/usr/lib/python2.7/site-packages/cliff/display.py", line 92, in run column_names, data = self.take_action(parsed_args) File "/usr/lib/python2.7/site-packages/gnocchiclient/v1/resource_cli.py", line 196, in take_action resource = self._resource_from_args(parsed_args, update=True) File "/usr/lib/python2.7/site-packages/gnocchiclient/v1/resource_cli.py", line 175, in _resource_from_args for metric in parsed_args.create_metric: TypeError: 'NoneType' object is not iterable Version-Release number of selected component (if applicable): python-gnocchiclient-2.0.0-1.el7ost.noarch
Bugs fixed upstream, need to update packaging.
We updated gnocchiclient so this should be now fixed.
According to our records, this should be resolved by python-gnocchiclient-2.2.0-1.el7ost. This build is available now.
Verified with python-gnocchiclient-2.2.0-1.el7ost.noarch gnocchi resource show resource-rhbz-1314623 +-----------------------+-----------------------------------------------------------------------+ | Field | Value | +-----------------------+-----------------------------------------------------------------------+ | created_by_project_id | 5f874b21e3c34a81a6bb512774b90a9a | | created_by_user_id | 184756a58fed4f2b8ed2394dd5c68413 | | ended_at | None | | id | 855c5001-24e9-52d2-bcf3-cab63a892168 | | metrics | radosgw.api.request: 97677e59-ef47-4ae4-a719-7bb2e7264a29 | | | radosgw.containers.objects.size: 192b30c8-8ca9-4c47-9d64-7cacb81c5d74 | | | radosgw.containers.objects: 98296dcd-e0a8-45ac-8727-28747842827e | | | radosgw.objects.containers: 0c8e998c-0513-4a01-8bfe-9b3b10e763b3 | | | radosgw.objects.size: 077d6285-0794-4b5c-823c-d4087e7129f1 | | | radosgw.objects: 68416b43-f42e-4381-9630-57a29ee35e07 | | original_resource_id | resource-rhbz-1314623 | | project_id | None | | revision_end | None | | revision_start | 2017-01-10T07:28:51.359995+00:00 | | started_at | 2017-01-10T07:28:51.359981+00:00 | | type | ceph_account | | user_id | None | +-----------------------+-----------------------------------------------------------------------+ gnocchi resource update --type ceph_account --delete-metric radosgw.objects resource-rhbz-1314623 +-----------------------+-----------------------------------------------------------------------+ | Field | Value | +-----------------------+-----------------------------------------------------------------------+ | created_by_project_id | 5f874b21e3c34a81a6bb512774b90a9a | | created_by_user_id | 184756a58fed4f2b8ed2394dd5c68413 | | ended_at | None | | id | 855c5001-24e9-52d2-bcf3-cab63a892168 | | metrics | radosgw.api.request: 97677e59-ef47-4ae4-a719-7bb2e7264a29 | | | radosgw.containers.objects.size: 192b30c8-8ca9-4c47-9d64-7cacb81c5d74 | | | radosgw.containers.objects: 98296dcd-e0a8-45ac-8727-28747842827e | | | radosgw.objects.containers: 0c8e998c-0513-4a01-8bfe-9b3b10e763b3 | | | radosgw.objects.size: b2343bd1-5609-47cd-bd1e-e35329bf28fe | | original_resource_id | resource-rhbz-1314623 | | project_id | None | | revision_end | None | | revision_start | 2017-01-10T07:28:51.359995+00:00 | | started_at | 2017-01-10T07:28:51.359981+00:00 | | type | ceph_account | | user_id | None | +-----------------------+-----------------------------------------------------------------------+