Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1496388 - Ceilometer compute agent unable to poll metrics
Summary: Ceilometer compute agent unable to poll metrics
Keywords:
Status: CLOSED DUPLICATE of bug 1483456
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-ceilometer
Version: 10.0 (Newton)
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Eoghan Glynn
QA Contact: Sasha Smolyak
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-27 09:12 UTC by Chen
Modified: 2018-02-06 09:27 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-09-27 15:12:49 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Chen 2017-09-27 09:12:16 UTC
Description of problem:

Ceilometer compute agent unable to poll metrics.

The call made to nova-api returned 0 results and thus ceilometer thought there is no instance and all the metrics are skipped.

2017-09-27 08:52:38.166 277934 DEBUG novaclient.v2.client [-] REQ: curl -g -i -X GET http://172.16.2.12:8774/v2.1/servers/detail?all_tenants=True&changes-since=2017-09-27T08%3A51%3A38.165265%2B00%3A00&host=overcloud-compute-0 -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-OpenStack-Nova-API-Version: 2.1" -H "X-Auth-Token: {SHA1}427cb1352a2d310d4186fbb2d03654c5101b41e8" _http_log_request /usr/lib/python2.7/site-packages/keystoneauth1/session.py:342
2017-09-27 08:52:38.276 277934 DEBUG novaclient.v2.client [-] RESP: [200] Content-Length: 15 Content-Type: application/json Openstack-Api-Version: compute 2.1 X-Openstack-Nova-Api-Version: 2.1 Vary: OpenStack-API-Version, X-OpenStack-Nova-API-Version X-Compute-Request-Id: req-861feb31-6c57-4d33-835b-cb29fa6831c5 Date: Wed, 27 Sep 2017 08:52:38 GMT
RESP BODY: {"servers": []}

2017-09-27 08:52:38.278 277934 INFO ceilometer.agent.manager [-] Skip pollster network.outgoing.packets, no resources found this cycle
2017-09-27 08:52:38.278 277934 INFO ceilometer.agent.manager [-] Skip pollster disk.read.requests, no resources found this cycle
2017-09-27 08:52:38.278 277934 INFO ceilometer.agent.manager [-] Skip pollster network.outgoing.bytes, no resources found this cycle
2017-09-27 08:52:38.279 277934 INFO ceilometer.agent.manager [-] Skip pollster cpu, no resources found this cycle

<Snip>

The instance was created on 2017-09-27T08:28:07Z  from nova show and it is running.

The following curl could get the instance list if I remove changes-since filter and append the localdomain after the compute host name.

curl -g -i -X GET 'http://172.16.2.12:8774/v2.1/servers/detail?all_tenants=True&host=overcloud-compute-0.localdomain' -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-OpenStack-Nova-API-Version: 2.1" -H "X-Auth-Token: 5c4dd2c6645e4e3286332e8d24822652" 

Version-Release number of selected component (if applicable):

OSP10

How reproducible:

100%
openstack-ceilometer-compute-7.1.0-2.el7ost.noarch

Steps to Reproduce:
1. Setup a director environment
2. Start an instance
3. Monitor the ceilometer/compute.log

Actual results:

All the metrics are skipped

Expected results:

Metrics should be polled by the compute agent

Additional info:

Comment 1 Chen 2017-09-27 14:59:26 UTC
Hi,

I just found that if I append the localdomain to compute node's hostname then the issue could be solved. Is this expected behaviour or right solution ?

The call to nova became normal after I set the hostname.

2017-09-27 14:57:14.944 308269 DEBUG novaclient.v2.client [-] REQ: curl -g -i -X GET http://172.16.2.12:8774/v2.1/servers/detail?all_tenants=True&host=overcloud-compute-0.localdomain -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-OpenStack-Nova-API-Version: 2.1" -H "X-Auth-Token: {SHA1}3bbd2c9f43decb4cdbff031176b49c216974fa95" _http_log_request /usr/lib/python2.7/site-packages/keystoneauth1/session.py:342


Best Regards,
Chen

Comment 2 Chen 2017-09-27 15:12:49 UTC

*** This bug has been marked as a duplicate of bug 1483456 ***


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