Nova not updating VM's XML in KVM

Bug #1853048 reported by Rafael Weingartner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
New
Undecided
Unassigned
OpenStack Compute (nova)
Invalid
Undecided
Unassigned

Bug Description

Ceilometer was causing resources to have a huge amount of revisions on Gnocchi
(1000+), because the compute pollsters were constantly pushing outdated
attributes. This can happen when users (as an example), update the name of VMs.
The name is not updated in the VM's XML that is stored in the KVM host.
This causes the Ceilometer compute pollster to constantly push outdated attributes
that trigger resource revisions on Gnocchi (if we have other pollsters pushing the right
attribute value that is gathered from OpenStack API).

We are using OpenStack Rocky, and Nova version is 18.0.1.

Revision history for this message
Dan Smith (danms) wrote :

Nova does not even call down to the compute node when attributes like display_name are changed. The next time the xml is updated would be when it is regenerated, like during a lifecycle event (hard reboot) or migration. Ceilometer scraping that information out of the libvirt XML underneath nova is, as expected, not reliable.

Changing this would require new a RPC call, and would add load to rabbit, the compute, and introduce additional traffic between nova and libvirt. If there was some strong use-case for this, maybe that would be worthwhile, but I don't think ceilometer wanting to scrape those metadata items from the libvirt XML is strong enough.

Changed in nova:
status: New → Invalid
Revision history for this message
melanie witt (melwitt) wrote :

To add more info here, the metadata (including display_name aka the "VM name") that Nova stores in the libvirt XML is for the purpose of aiding in troubleshooting scenarios [1][2] and is *not* the source of truth for any of the information. The <metadata><nova> is kind of "cosmetic" in this regard.

As Dan explained, the libvirt XML is updated only during lifecycle events (updated only when truly necessary). That is why the arbitrary metadata xml section updates are not reflected until the next lifecycle event.

The Nova API is the proper source of truth for all items found in the <metadata><nova> section of the libvirt XML and it would be ideal if Ceilometer used only the Nova API to report those items.

[1] http://specs.openstack.org/openstack/nova-specs/specs/juno/implemented/libvirt-driver-domain-metadata.html
[2] https://www.berrange.com/posts/2015/02/20/nova-metadata-recorded-in-libvirt-guest-instance-xml

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.