Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1946120 - Compute profile references wrong datacenter path after changing datacenter name
Summary: Compute profile references wrong datacenter path after changing datacenter name
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Compute Resources - VMWare
Version: 6.8.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Satellite QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-04 19:51 UTC by Paul Dudley
Modified: 2024-04-22 07:47 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-04-22 07:43:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 32792 0 Normal New Compute profile references wrong datacenter path after changing datacenter name 2021-08-09 16:36:07 UTC
Red Hat Issue Tracker SAT-24699 0 None None None 2024-04-22 07:47:51 UTC

Description Paul Dudley 2021-04-04 19:51:14 UTC
When changing the name of the datacenter compute profiles still reference the old path, seen in the api here:

Result of  GET https://satellite.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://satellite.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.


Related to bug 1440711

Comment 2 Ondřej Ezr 2021-06-12 14:30:53 UTC
Created redmine issue https://projects.theforeman.org/issues/32792 from this bug

Comment 3 Bryan Kearney 2021-06-27 12:02:11 UTC
Upstream bug assigned to ymakias

Comment 4 Bryan Kearney 2021-08-06 12:04:59 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/32792 has been resolved.

Comment 7 Lukáš Hellebrandt 2021-10-08 11:23:34 UTC
FailedQA with Sat 6.10.0 snap 21.0, no change in behavior noticed as compared to OP. I can, however, confirm that the code changes are present in /usr/share/foreman/app/controllers/api/v2/compute_resources_controller.rb and /usr/share/foreman/app/models/compute_resource.rb.

Comment 10 Leos Stejskal 2024-04-22 07:43:10 UTC
Closing the BZ as per the https://bugzilla.redhat.com/show_bug.cgi?id=1946120#c8


Note You need to log in before you can comment on or make changes to this bug.