Project

General

Profile

Bug #32792

Compute profile references wrong datacenter path after changing datacenter name

Added by Ondřej Ezr almost 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Compute resources - VMware
Target version:
-
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1946120

When changing the name of the datacenter compute profiles still reference the old path, seen in the api here:

Result of GET https://foreman.example.com/api/v2/compute_resources
description :
url : vCenter.example.com
id : 4
name : vCenter_Name
provider : Vmware
provider_friendly_name : VMware
user : vcenter_login
datacenter :
server : vcenter.server.example.com
set_console_password : True
caching_enabled : True

But the compute profiles associated with the updated compute resource are still using the old datacenter path of /Datacenters/<old name>/vm (which no longer exists):
From GET https://foreman.example.com/api/v2/compute_profiles/6
id : 12
name : 2 CPUs and 2048 MB memory
compute_resource_id : 4
compute_resource_name : vCenter
provider_friendly_name : VMware
compute_profile_id : 6
compute_profile_name : Base OS
vm_attrs : @{cpus=2; corespersocket=1; memory_mb=2048; firmware=bios; cluster=i-linux-cluster01; resource_pool=Resources; path=/Datacenters/<old name>/vm; guest_id=rhel7_64Guest; scsi_controller_type=ParaVirtualSCSIController; hardware_version=Default;
memoryHotAddEnabled=0; cpuHotAddEnabled=0; add_cdrom=0; annotation=; interfaces_attributes=; volumes_attributes=}

Correcting the resource only requires editing the profile and submitting the profile again and the path is fixed, no direct changes are necessary, it is anoying anyway.


Related issues

Related to Foreman - Bug #22723: Changing name of datacenter in vCenter will break Compute ResourceRejected

Associated revisions

Revision 47952add (diff)
Added by yifat makias over 1 year ago

Fixes #32792 - Add update to ca when vmware cr is updated

History

#1 Updated by Ondřej Ezr almost 2 years ago

  • Triaged changed from No to Yes
  • Category changed from Compute resources - VMware to Compute resources
  • Subject changed from Compute profile references wrong datacenter path after changing datacenter name to Compute profile references wrong datacenter path after changing datacenter name

#2 Updated by Ondřej Ezr almost 2 years ago

  • Category changed from Compute resources to Compute resources - VMware

#3 Updated by Ondřej Ezr almost 2 years ago

  • Related to Bug #22723: Changing name of datacenter in vCenter will break Compute Resource added

#4 Updated by yifat makias almost 2 years ago

  • Assignee set to yifat makias

#5 Updated by The Foreman Bot over 1 year ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/8668 added

#6 Updated by The Foreman Bot over 1 year ago

  • Fixed in Releases 3.1.0 added

#7 Updated by yifat makias over 1 year ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF