Bug 1546176 - Missing metadata in libvirt xml causes ceilometer-compute to crash
Summary: Missing metadata in libvirt xml causes ceilometer-compute to crash
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-ceilometer
Version: 12.0 (Pike)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: z3
: 12.0 (Pike)
Assignee: Mehdi ABAAKOUK
QA Contact: Sasha Smolyak
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-16 14:14 UTC by Lars Kellogg-Stedman
Modified: 2018-08-20 12:55 UTC (History)
5 users (show)

Fixed In Version: openstack-ceilometer-9.0.5-1.el7ost
Doc Type: No Doc Update
Doc Text:
-
Clone Of:
Environment:
Last Closed: 2018-08-20 12:54:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1749960 0 None None None 2018-02-16 14:15:35 UTC
OpenStack gerrit 545376 0 None None None 2018-03-02 07:43:53 UTC
Red Hat Product Errata RHBA-2018:2522 0 None None None 2018-08-20 12:55:01 UTC

Description Lars Kellogg-Stedman 2018-02-16 14:14:33 UTC
Description of problem:

I am working with an environment in which some nova instances are missing the "<nova:owner>" attribute in the embedded metadata in the domain xml. For example:

  <metadata>
    <nova:instance xmlns:nova="http://openstack.org/xmlns/libvirt/nova/1.0">
      <nova:package version="14.0.3-9.el7ost"/>
      <nova:name>wm-solr</nova:name>
      <nova:creationTime>2017-05-24 15:29:24</nova:creationTime>
      <nova:flavor name="m1.large">
        <nova:memory>8192</nova:memory>
        <nova:disk>80</nova:disk>
        <nova:swap>0</nova:swap>
        <nova:ephemeral>0</nova:ephemeral>
        <nova:vcpus>4</nova:vcpus>
      </nova:flavor>
      <nova:owner/>
      <nova:root type="image" uuid="a332ad63-8b38-4700-b818-b39fa69233a9"/>
    </nova:instance>
  </metadata>

This results in discover_libvirt_polling in ceilometer/compute/discovery throwing an AttributeError traceback when it tries to access:

  user_id = metadata_xml.find("./owner/user").attrib["uuid"]

This means that it will fail to poll any subsequent libvirt guests, which means the loss of many metrics.

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

openstack-ceilometer-compute-9.0.3-1.el7ost.noarch

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Lars Kellogg-Stedman 2018-02-16 14:15:35 UTC
I opened https://bugs.launchpad.net/ceilometer/+bug/1749960 upstream and submitted a fix, https://review.openstack.org/#/c/545303/.

Comment 2 Lars Kellogg-Stedman 2018-02-16 14:16:02 UTC
There is a related bug filed against Nova, https://bugzilla.redhat.com/show_bug.cgi?id=1546168.

Comment 9 Sasha Smolyak 2018-08-19 07:57:06 UTC
The missing metadata is handled, the patch is in the version. Fixed

Comment 11 errata-xmlrpc 2018-08-20 12:54:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:2522


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