From 3d83c69dd58abaceb935e01b59fb408c37089d92 Mon Sep 17 00:00:00 2001 From: Adam Grare Date: Mon, 13 Jan 2025 15:06:21 -0500 Subject: [PATCH] Add debug logging for genealogy_parent --- .../providers/openstack/inventory/parser/cloud_manager.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models/manageiq/providers/openstack/inventory/parser/cloud_manager.rb b/app/models/manageiq/providers/openstack/inventory/parser/cloud_manager.rb index a734f103..d7e9522a 100644 --- a/app/models/manageiq/providers/openstack/inventory/parser/cloud_manager.rb +++ b/app/models/manageiq/providers/openstack/inventory/parser/cloud_manager.rb @@ -223,6 +223,7 @@ def miq_templates image.cloud_tenants = image_tenants(i) image.location = "unknown" image.cloud_tenant = persister.cloud_tenants.lazy_find(i.owner) if i.owner + _log.info("MiqTemplate ems_ref: [#{i.id}] genealogy_parent: [#{parent_server_uid}]") image.genealogy_parent = persister.vms.lazy_find(parent_server_uid) unless parent_server_uid.nil? guest_os = OperatingSystem.normalize_os_name(i.try(:os_distro) || 'unknown') @@ -355,6 +356,7 @@ def parse_vm(vm, hosts) server.placement_group = persister.placement_groups.lazy_find(placement_group.id) if placement_group server.key_pairs = [persister.auth_key_pairs.lazy_find(vm.key_name)].compact server.cloud_tenant = persister.cloud_tenants.lazy_find(vm.tenant_id.to_s) + _log.info("Vm ems_ref: [#{vm.id}] genealogy_parent: [#{vm.image["id"]}]") server.genealogy_parent = miq_template_lazy unless vm.image["id"].nil? # to populate the hardware, we need some fields from the flavor object