Bug 1314623 - Failed to delete metric associated with resource
Summary: Failed to delete metric associated with resource
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-gnocchiclient
Version: 8.0 (Liberty)
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 9.0 (Mitaka)
Assignee: Julien Danjou
QA Contact: Yurii Prokulevych
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-04 05:53 UTC by Yurii Prokulevych
Modified: 2017-01-11 19:26 UTC (History)
4 users (show)

Fixed In Version: python-gnocchiclient-2.2.0-1.el7ost
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-11 19:26:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1524001 0 None None None 2016-03-04 05:54:30 UTC
Launchpad 1553036 0 None None None 2016-03-04 05:53:10 UTC

Description Yurii Prokulevych 2016-03-04 05:53:11 UTC
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 12:21:57 UTC
Bugs fixed upstream, need to update packaging.

Comment 2 Julien Danjou 2016-11-07 08:33:45 UTC
We updated gnocchiclient so this should be now fixed.

Comment 3 Jon Schlueter 2017-01-04 13:40:27 UTC
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 07:43:07 UTC
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.