From e3c7a21a2a8269c45d8939b97c0ce6181b73494a Mon Sep 17 00:00:00 2001 From: Luke Repko Date: Wed, 18 Sep 2024 17:19:55 -0500 Subject: [PATCH] fix(ceilometer): tweak event_update processing Do not use the instance_type_id field as that seems to unreliably represent the flavor_id. From what I have observed, some messages come through as a numerical value (the idx of the flavor in the flavors table), and some messages come through with the uuid of the flavor. Also, remove some attributes that should not be changing after a VM is built. This should make ops slightly more performant, and somewhat protect a few dates we don't want changed during an update event, deferring their modification to related create/update events. --- .../ceilometer/ceilometer-helm-overrides.yaml | 54 ++++++++----------- 1 file changed, 21 insertions(+), 33 deletions(-) diff --git a/base-helm-configs/ceilometer/ceilometer-helm-overrides.yaml b/base-helm-configs/ceilometer/ceilometer-helm-overrides.yaml index 1f78cdcc..1a08b510 100644 --- a/base-helm-configs/ceilometer/ceilometer-helm-overrides.yaml +++ b/base-helm-configs/ceilometer/ceilometer-helm-overrides.yaml @@ -894,7 +894,7 @@ conf: display_name: display_name host: host availability_zone: availability_zone - flavor_id: instance_type_id + flavor_id: flavor_id flavor_name: instance_type user_id: user_id project_id: project_id @@ -903,42 +903,32 @@ conf: instance_disk: '{"=": {"instance_id": "%s"}}' - resource_type: instance - metrics: - memory: - memory.usage: - memory.resident: - memory.swap.in: - memory.swap.out: - memory.bandwidth.total: - memory.bandwidth.local: - vcpus: - cpu: - archive_policy_name: ceilometer-low-rate - cpu_l3_cache: - disk.root.size: - disk.ephemeral.size: - disk.latency: - disk.iops: - disk.capacity: - disk.allocation: - disk.usage: - compute.instance.booting.time: - perf.cpu.cycles: - perf.instructions: - perf.cache.references: - perf.cache.misses: + metrics: null attributes: - host: resource_metadata.(instance_host|host) image_ref: resource_metadata.image_ref - launched_at: resource_metadata.launched_at - created_at: resource_metadata.created_at - deleted_at: resource_metadata.deleted_at display_name: resource_metadata.display_name flavor_id: resource_metadata.(instance_flavor_id|(flavor.id)|flavor_id) flavor_name: resource_metadata.(instance_type|(flavor.name)|flavor_name) server_group: resource_metadata.user_metadata.server_group event_update: - compute.instance.update + event_attributes: + id: instance_id + display_name: display_name + flavor_id: flavor_id + flavor_name: instance_type + image_ref: image_ref + + - resource_type: instance + metrics: null + attributes: + host: resource_metadata.(instance_host|host) + image_ref: resource_metadata.image_ref + display_name: resource_metadata.display_name + flavor_id: resource_metadata.(instance_flavor_id|(flavor.id)|flavor_id) + flavor_name: resource_metadata.(instance_type|(flavor.name)|flavor_name) + server_group: resource_metadata.user_metadata.server_group + event_update: - compute.instance.exists - compute.instance.resize_confirm.end - compute.instance.resize_revert.end @@ -946,11 +936,9 @@ conf: id: instance_id display_name: display_name host: host - availability_zone: availability_zone - flavor_id: instance_type_id + flavor_id: flavor_id flavor_name: instance_type - user_id: user_id - project_id: project_id + image_ref: image_ref - resource_type: instance_network_interface metrics: