1 of 4,180 ERROR: systemctl start cloudkitty-processor.service

Bug #1662779 reported by Raja
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloudkitty
Confirmed
High
Christophe Sauthier

Bug Description

We are able to execute the command successfully "systemctl start cloudkitty-api.service"

After that while executing the processor service with the command "systemctl start cloudkitty-processor.service" facing issue. Please find the below log and help us to solve the issue.

2017-02-08 10:32:32.633 5492 CRITICAL cloudkitty [-] TypeError: <Resource {u'user_id': None, u'links': [{u'href': u'http://172.18.10.5:8777/v2/resources/b92af90b-9243-4c00-a5b3-5bd14c0c9a19', u'rel': u'self'}, {u'href': u'http://172.18.10.5:8777/v2/meters/image.size?q.field=resource_id&q.value=b92af90b-9243-4c00-a5b3-5bd14c0c9a19', u'rel': u'image.size'}, {u'href': u'http://172.18.10.5:8777/v2/meters/image?q.field=resource_id&q.value=b92af90b-9243-4c00-a5b3-5bd14c0c9a19', u'rel': u'image'}], u'resource_id': u'b92af90b-9243-4c00-a5b3-5bd14c0c9a19', u'source': u'openstack', u'last_sample_timestamp': u'2017-02-03T10:45:03.564000', u'first_sample_timestamp': u'2017-02-01T12:28:20.019000', u'project_id': u'012ca0c81faa403594c109641f70586d', u'metadata': {u'event_type': u'image.delete', u'container_format': u'bare', u'min_ram': u'0', u'updated_at': u'2017-02-03T10:45:02.000000', u'properties.owner_id': u'012ca0c81faa403594c109641f70586d', u'owner': u'012ca0c81faa403594c109641f70586d', u'deleted_at': u'None', u'id': u'b92af90b-9243-4c00-a5b3-5bd14c0c9a19', u'size': u'1501298688', u'properties.instance_uuid': u'c8f94f01-95f9-43d2-a495-0a80ab2d6533', u'disk_format': u'qcow2', u'properties.user_id': u'c24c104c55e245ffaca6eb929671f17a', u'status': u'deleted', u'properties.kernel_id': u'None', u'properties.ramdisk_id': u'None', u'host': u'image.localhost', u'properties.image_type': u'snapshot', u'min_disk': u'20', u'is_public': u'False', u'virtual_size': u'None', u'properties.base_image_ref': u'40cb2d17-fce0-4d79-aece-44f174e3bc11', u'properties.image_state': u'available', u'name': u'Image for StackPolicy11_0102171022', u'checksum': u'6dd71a7a7604119494132ad648731a72', u'created_at': u'2017-02-01T12:25:57.000000', u'protected': u'False', u'deleted': u'False', u'properties.image_location': u'snapshot'}}> is not JSON serializable
2017-02-08 10:32:32.633 5492 ERROR cloudkitty Traceback (most recent call last):
2017-02-08 10:32:32.633 5492 ERROR cloudkitty File "/usr/bin/cloudkitty-processor", line 10, in <module>
2017-02-08 10:32:32.633 5492 ERROR cloudkitty sys.exit(main())
2017-02-08 10:32:32.633 5492 ERROR cloudkitty File "/usr/lib/python2.7/site-packages/cloudkitty/cli/processor.py", line 28, in main
2017-02-08 10:32:32.633 5492 ERROR cloudkitty processor.process()
2017-02-08 10:32:32.633 5492 ERROR cloudkitty File "/usr/lib/python2.7/site-packages/cloudkitty/orchestrator.py", line 293, in process
2017-02-08 10:32:32.633 5492 ERROR cloudkitty worker.run()
2017-02-08 10:32:32.633 5492 ERROR cloudkitty File "/usr/lib/python2.7/site-packages/cloudkitty/orchestrator.py", line 212, in run
2017-02-08 10:32:32.633 5492 ERROR cloudkitty self._storage.append(data, self._tenant_id)
2017-02-08 10:32:32.633 5492 ERROR cloudkitty File "/usr/lib/python2.7/site-packages/cloudkitty/storage/__init__.py", line 227, in append
2017-02-08 10:32:32.633 5492 ERROR cloudkitty self._dispatch(data, tenant_id)
2017-02-08 10:32:32.633 5492 ERROR cloudkitty File "/usr/lib/python2.7/site-packages/cloudkitty/storage/sqlalchemy/__init__.py", line 69, in _dispatch
2017-02-08 10:32:32.633 5492 ERROR cloudkitty self._append_time_frame(service, frame, tenant_id)
2017-02-08 10:32:32.633 5492 ERROR cloudkitty File "/usr/lib/python2.7/site-packages/cloudkitty/storage/sqlalchemy/__init__.py", line 154, in _append_time_frame
2017-02-08 10:32:32.633 5492 ERROR cloudkitty desc = json.dumps(frame['desc'])
2017-02-08 10:32:32.633 5492 ERROR cloudkitty File "/usr/lib64/python2.7/json/__init__.py", line 243, in dumps
2017-02-08 10:32:32.633 5492 ERROR cloudkitty return _default_encoder.encode(obj)
2017-02-08 10:32:32.633 5492 ERROR cloudkitty File "/usr/lib64/python2.7/json/encoder.py", line 207, in encode
2017-02-08 10:32:32.633 5492 ERROR cloudkitty chunks = self.iterencode(o, _one_shot=True)
2017-02-08 10:32:32.633 5492 ERROR cloudkitty File "/usr/lib64/python2.7/json/encoder.py", line 270, in iterencode
2017-02-08 10:32:32.633 5492 ERROR cloudkitty return _iterencode(o, 0)
2017-02-08 10:32:32.633 5492 ERROR cloudkitty File "/usr/lib64/python2.7/json/encoder.py", line 184, in default
2017-02-08 10:32:32.633 5492 ERROR cloudkitty raise TypeError(repr(o) + " is not JSON serializable")
2017-02-08 10:32:32.633 5492 ERROR cloudkitty TypeError: <Resource {u'user_id': None, u'links': [{u'href': u'http://172.18.10.5:8777/v2/resources/b92af90b-9243-4c00-a5b3-5bd14c0c9a19', u'rel': u'self'}, {u'href': u'http://172.18.10.5:8777/v2/meters/image.size?q.field=resource_id&q.value=b92af90b-9243-4c00-a5b3-5bd14c0c9a19', u'rel': u'image.size'}, {u'href': u'http://172.18.10.5:8777/v2/meters/image?q.field=resource_id&q.value=b92af90b-9243-4c00-a5b3-5bd14c0c9a19', u'rel': u'image'}], u'resource_id': u'b92af90b-9243-4c00-a5b3-5bd14c0c9a19', u'source': u'openstack', u'last_sample_timestamp': u'2017-02-03T10:45:03.564000', u'first_sample_timestamp': u'2017-02-01T12:28:20.019000', u'project_id': u'012ca0c81faa403594c109641f70586d', u'metadata': {u'event_type': u'image.delete', u'container_format': u'bare', u'min_ram': u'0', u'updated_at': u'2017-02-03T10:45:02.000000', u'properties.owner_id': u'012ca0c81faa403594c109641f70586d', u'owner': u'012ca0c81faa403594c109641f70586d', u'deleted_at': u'None', u'id': u'b92af90b-9243-4c00-a5b3-5bd14c0c9a19', u'size': u'1501298688', u'properties.instance_uuid': u'c8f94f01-95f9-43d2-a495-0a80ab2d6533', u'disk_format': u'qcow2', u'properties.user_id': u'c24c104c55e245ffaca6eb929671f17a', u'status': u'deleted', u'properties.kernel_id': u'None', u'properties.ramdisk_id': u'None', u'host': u'image.localhost', u'properties.image_type': u'snapshot', u'min_disk': u'20', u'is_public': u'False', u'virtual_size': u'None', u'properties.base_image_ref': u'40cb2d17-fce0-4d79-aece-44f174e3bc11', u'properties.image_state': u'available', u'name': u'Image for StackPolicy11_0102171022', u'checksum': u'6dd71a7a7604119494132ad648731a72', u'created_at': u'2017-02-01T12:25:57.000000', u'protected': u'False', u'deleted': u'False', u'properties.image_location': u'snapshot'}}> is not JSON serializable
2017-02-08 10:32:32.633 5492 ERROR cloudkitty
2017-02-08 10:32:32.682 5492 WARNING tooz.drivers.file [-] Unreleased lock /var/lib/cloudkitty/locks/cloudkitty-012ca0c81faa403594c109641f70586d garbage collected

Revision history for this message
Christophe Sauthier (christophe.sauthier) wrote :

I have a patch, I will upload it tomorrow.

Changed in cloudkitty:
status: New → Confirmed
milestone: none → 0.5.0b1
assignee: nobody → Christophe Sauthier (christophe.sauthier)
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cloudkitty (stable/mitaka)

Reviewed: https://review.openstack.org/431397
Committed: https://git.openstack.org/cgit/openstack/cloudkitty/commit/?id=094056c3fc78cde3210c99ec7ea13fc2c10d67ff
Submitter: Jenkins
Branch: stable/mitaka

commit 094056c3fc78cde3210c99ec7ea13fc2c10d67ff
Author: Christophe Sauthier <email address hidden>
Date: Thu Feb 9 09:53:29 2017 +0100

    Fix some serialisation of JSON issues

    Fix some serialisation of JSON issues in the ceilometer collector.

    Change-Id: I5eb322bceea630a67071fad884a628106e529557
    Closes-Bug: #1662779

tags: added: in-stable-mitaka
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cloudkitty 0.5.2

This issue was fixed in the openstack/cloudkitty 0.5.2 release.

Revision history for this message
Prajwal (prajwaldas000) wrote : Deleting instance with status Error

Hi,

We are using Openstack Mitaka. Find the usecase as given below,

After placing openstack instance/image order, checked the response using
meter API (refer below Reference section).Status is build.

Question 1:
Not sure this status "build" will be the output for how long ?

Question 2:
Even after deleting the instance with status "ERROR" still I could see the
response with status as "build".
Not sure whether this is a bug from openstack..?

Reference:
MeterApi:
http://
<IPAddress>:8777/v2/meters/instance?q.field=timestamp&q.op=ge&q.value=2017-08-14T00:00:00&q.field=timestamp&q.op=lt&q.value=2017-08-15T23:59:59&q.field=project_id&q.op=eq&q.value=dd90792db9a448e8a23e8b464da49845

response:
[
  {
    "counter_name": "instance",
    "user_id": "641fbaf3ba094992addfff522eecace7",
    "resource_id": "90b3f27c-ce81-467c-b11f-e7526e9196f3",
    "timestamp": "2017-08-10T23:55:17.968000",
    "recorded_at": "2017-08-10T23:55:18.130000",
    "message_id": "5c8d7594-7e27-11e7-b203-7054d21b4d24",
    "source": "openstack",
    "counter_unit": "instance",
    "counter_volume": 1,
    "project_id": "dd90792db9a448e8a23e8b464da49845",
    "resource_metadata": {
      "instance_host": "newton",
      "ephemeral_gb": "0",
      "flavor.vcpus": "1",
      "flavor.ephemeral": "0",
      "instance_id": "90b3f27c-ce81-467c-b11f-e7526e9196f3",
      "display_name": "Swapninginst",
      "image.name": "window_2012_server_image",
      "state": "building",
      "flavor.ram": "2048",
      "status": "build",
      "ramdisk_id": "None",
      "flavor.name": "m1.small",
      "disk_gb": "20"
    },
    "counter_type": "gauge"
  }
]

Regards,
Prajwal
Billing Architect

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.