Bug 1496388

Summary: Ceilometer compute agent unable to poll metrics
Product: Red Hat OpenStack Reporter: Chen <cchen>
Component: openstack-ceilometerAssignee: Eoghan Glynn <eglynn>
Status: CLOSED DUPLICATE QA Contact: Sasha Smolyak <ssmolyak>
Severity: high Docs Contact:
Priority: unspecified    
Version: 10.0 (Newton)CC: jruzicka, srevivo
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-09-27 15:12:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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 ***