Bug #32792
closedCompute profile references wrong datacenter path after changing datacenter name
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.
Updated by Ondřej Ezr over 3 years ago
- Subject changed from Compute profile references wrong datacenter path after changing datacenter name to Compute profile references wrong datacenter path after changing datacenter name
- Category changed from Compute resources - VMware to Compute resources
- Triaged changed from No to Yes
Updated by Ondřej Ezr over 3 years ago
- Category changed from Compute resources to Compute resources - VMware
Updated by Ondřej Ezr over 3 years ago
- Related to Bug #22723: Changing name of datacenter in vCenter will break Compute Resource added
Updated by The Foreman Bot over 3 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/8668 added
Updated by yifat makias over 3 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman|47952add1e115bcae54371caab027e5dbd173d24.