Bug 2049759

Summary: Misleading error message when incorrect vm id used
Product: Red Hat Satellite Reporter: Lukáš Hellebrandt <lhellebr>
Component: Compute ResourcesAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED WONTFIX QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.11.0CC: mhulan
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-04-06 17:10:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lukáš Hellebrandt 2022-02-02 16:43:17 UTC
Description of problem:
When I purposefully use incorrect VM id in a associate-vms call, a misleading error appears stating that CR id is incorrect while in fact, VM id is incorrect.

Version-Release number of selected component (if applicable):
Sat 7.0 snap 7.0, new functionality.

How reproducible:
Deterministic

Steps to Reproduce:
1. Have a Satellite, CR, VMs on that CR, Hosts with the VMs' MACs set and not associated to a CR
2. # hammer compute-resource virtual-machines --id 1 | grep bz
500dc585-b074-b7ee-a1ec-332f40a698cb | lhellebr-bz3                                           
500d8cfc-6442-a658-147f-bd9717a90ac5 | lhellebr-bz2
# hammer compute-resource associate-vms --id 1 --vm-id 500d8cfc-6442-a658-147f-bd9717a90ac5
Virtual machines have been associated.
# hammer compute-resource associate-vms --id 1 --vm-id 500d8cfc-6442-a658-147f-beefface
Could not associate the virtual machines:
  Resource compute_resource not found by id '1'

Actual results:
Misleading error message

Expected results:
Error message stating that an incorrect *VM* id has been used, not CR id

Comment 1 Marek Hulan 2022-02-03 09:55:14 UTC
I suppose that's not a regression, could you please confirm?

Comment 2 Lukáš Hellebrandt 2022-02-03 10:01:29 UTC
This is new functionality so it's not a regression.

Comment 4 Brad Buckingham 2023-03-06 11:38:36 UTC
Upon review of our valid but aging backlog the Satellite Team has concluded that this Bugzilla does not meet the criteria for a resolution in the near term, and are planning to close in a month. This message may be a repeat of a previous update and the bug is again being considered to be closed. If you have any concerns about this, please contact your Red Hat Account team.  Thank you.

Comment 5 Brad Buckingham 2023-04-06 17:10:05 UTC
Thank you for your interest in Red Hat Satellite. We have evaluated this request, and while we recognize that it is a valid request, we do not expect this to be implemented in the product in the foreseeable future. This is due to other priorities for the product, and not a reflection on the request itself. We are therefore closing this out as WONTFIX. If you have any concerns about this feel free to contact your Red Hat Account Team. Thank you.