ceilometer doesn't get instances data on machine due to invalid hostname

Bug #1166717 reported by Brooklyn
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Medium
Brooklyn
Grizzly
Fix Released
Medium
Eoghan Glynn

Bug Description

ceilometer-acompute wont get data on the machine that with an invalid hostname returned by socket.getfqdn().

if ceilometer-acompute is running on a virtual machine, socket.getfqdn() would return an invalid hostname which is not recognized by nova.

Brooklyn (yuanotes)
description: updated
Revision history for this message
Julien Danjou (jdanjou) wrote :

This is probably libvirt not supporting this, so it's not going to be a bug in Ceilometer AFAICT.

Revision history for this message
Brooklyn (yuanotes) wrote :

I found a solution for this.

The PollingTask in ceilometer/compute/manager.py need the "cfg.CONF.host" option to get all instances on current host.

If that's not configured in ceilometer.conf, it will use an incorrect hostname that won't any instances.

I am not sure whether it's caused by libvirt or not. I just add host=<HOSTNAME> in ceilometer.conf to solve this.

Changed in ceilometer:
status: New → Invalid
Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

We should probably have the host default set to something obviously incorrect (an empty string?) and then have the code that needs the setting warn if it is not set, rather than returning bogus data or skipping the polling silently.

Revision history for this message
John Tran (jtran) wrote :

FWIW, although this is an invalid bug, it has affected me on numerous occasions and it wasn't very easy to troubleshoot.

Revision history for this message
Brooklyn (yuanotes) wrote :

I think this is not INVALID since this still affected me today.

Changed in ceilometer:
status: Invalid → Confirmed
Brooklyn (yuanotes)
Changed in ceilometer:
assignee: nobody → Brooklyn (yuanotes)
summary: - ceilometer doesn't get instance cumulative data if nova use qemu?
+ ceilometer doesn't get instances data on due to invalid hostname
summary: - ceilometer doesn't get instances data on due to invalid hostname
+ ceilometer doesn't get instances data on machine due to invalid hostname
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ceilometer (master)

Fix proposed to branch: master
Review: https://review.openstack.org/36635

Changed in ceilometer:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

Reviewed: https://review.openstack.org/36635
Committed: http://github.com/openstack/ceilometer/commit/16f8e14b24006b23e1965329fa27ab7fcab3e6de
Submitter: Jenkins
Branch: master

commit 16f8e14b24006b23e1965329fa27ab7fcab3e6de
Author: Brooklyn Chen <email address hidden>
Date: Thu Jul 11 19:11:11 2013 +0800

    Use correct hostname to get instances.

    socket.getfqdn() would return a fully qualified domain name
    which maybe invalid for nova to get instances by hostname.
    If the host that runs devstack is virtual(like running
    devstack on AWS), socket.getfqdn() may return a domain name
    which is not the host name and nova cannot use that to get
    instances running on current host.

    Fix bug: #1166717

    Change-Id: Ic6cc8607bcdeee720c5d46d44fbaa589b4fb950e

Changed in ceilometer:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: none → havana-2
status: Fix Committed → Fix Released
Eoghan Glynn (eglynn)
tags: added: grizzly-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ceilometer (stable/grizzly)

Fix proposed to branch: stable/grizzly
Review: https://review.openstack.org/39474

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (stable/grizzly)

Reviewed: https://review.openstack.org/39474
Committed: http://github.com/openstack/ceilometer/commit/c9129d1fd69a546f67517836f358e21f160ce994
Submitter: Jenkins
Branch: stable/grizzly

commit c9129d1fd69a546f67517836f358e21f160ce994
Author: Brooklyn Chen <email address hidden>
Date: Thu Jul 11 19:11:11 2013 +0800

    Use correct hostname to get instances.

    socket.getfqdn() would return a fully qualified domain name
    which maybe invalid for nova to get instances by hostname.
    If the host that runs devstack is virtual(like running
    devstack on AWS), socket.getfqdn() may return a domain name
    which is not the host name and nova cannot use that to get
    instances running on current host.

    Fix bug: #1166717

    Change-Id: Ic6cc8607bcdeee720c5d46d44fbaa589b4fb950e
    (cherry picked from commit 16f8e14b24006b23e1965329fa27ab7fcab3e6de)

tags: added: in-stable-grizzly
Alan Pevec (apevec)
Changed in ceilometer:
importance: Undecided → Medium
tags: removed: grizzly-backport-potential in-stable-grizzly
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: havana-2 → 2013.2
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.