Bug 1314623 - Failed to delete metric associated with resource
Failed to delete metric associated with resource
Status: CLOSED CURRENTRELEASE
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-gnocchiclient (Show other bugs)
8.0 (Liberty)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 9.0 (Mitaka)
Assigned To: Julien Danjou
Yurii Prokulevych
: TestOnly, Triaged, ZStream
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-04 00:53 EST by Yurii Prokulevych
Modified: 2017-01-11 14:26 EST (History)
4 users (show)

See Also:
Fixed In Version: python-gnocchiclient-2.2.0-1.el7ost
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-01-11 14:26:40 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 1524001 None None None 2016-03-04 00:54 EST
Launchpad 1553036 None None None 2016-03-04 00:53 EST

  None (edit)
Description Yurii Prokulevych 2016-03-04 00:53:11 EST
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
Comment 1 Julien Danjou 2016-05-23 08:21:57 EDT
Bugs fixed upstream, need to update packaging.
Comment 2 Julien Danjou 2016-11-07 03:33:45 EST
We updated gnocchiclient so this should be now fixed.
Comment 3 Jon Schlueter 2017-01-04 08:40:27 EST
According to our records, this should be resolved by python-gnocchiclient-2.2.0-1.el7ost.  This build is available now.
Comment 4 Yurii Prokulevych 2017-01-10 02:43:07 EST
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                                                                  |
+-----------------------+-----------------------------------------------------------------------+

Note You need to log in before you can comment on or make changes to this bug.