Skip to content

Commit

Permalink
Add debug logging for genealogy_parent
Browse files Browse the repository at this point in the history
  • Loading branch information
agrare committed Jan 13, 2025
1 parent 45f993d commit 3d83c69
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3d83c69

Please sign in to comment.