Project

General

Profile

Actions

Bug #32792

closed

Compute profile references wrong datacenter path after changing datacenter name

Added by Ondřej Ezr over 3 years ago. Updated about 3 years ago.

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

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 1 (0 open1 closed)

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

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
Actions #2

Updated by Ondřej Ezr over 3 years ago

  • Category changed from Compute resources to Compute resources - VMware
Actions #3

Updated by Ondřej Ezr over 3 years ago

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

Updated by yifat makias over 3 years ago

  • Assignee set to yifat makias
Actions #5

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
Actions #6

Updated by The Foreman Bot about 3 years ago

  • Fixed in Releases 3.1.0 added
Actions #7

Updated by yifat makias about 3 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF