Bug 1692753
Summary: | [API] - Wrong error message when changing the location of a compute resource to location that doesn't exists | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Vatsal Parekh <vparekh> |
Component: | API | Assignee: | Shira Maximov <mshira> |
Status: | CLOSED ERRATA | QA Contact: | Jitendra Yejare <jyejare> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.6.0 | CC: | apatel, bkearney, cnv-qe-bugs, masayag, mawerner, mhulan, mmccune, mshira, pcreech, pkliczew, spetrosi, zhunting |
Target Milestone: | 6.7.0 | Keywords: | Triaged |
Target Release: | Unused | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Known Issue | |
Doc Text: |
The description of the location_id and organization_id parameters are unclear in the ApiDoc and the error message for these parameters is incorrect. You must use these parameters to set the context scope for an API query, but not to update a location or organization of a compute resource. If you use this command to update a compute resource, an API request returns the wrong error message "Compute resource doesn't exist".
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2020-04-14 13:24:10 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
Vatsal Parekh
2019-03-26 11:21:53 UTC
Forgot to mention about the bulk of Redirects happening when going from default to any org, check the terminal in the video I wasn't able to reproduce this BZ, however, in the video attached, you sent the parameters wrongly : - You shouldn't location_id parameter because Location_id and Organization_id only sets the location and organization scope ( users typically work in specific context, e.g. location Israel or Czech Republic and UI automatically filters resources based on the location, e.g. showing only vmware instance assigned to Israel if current location is Israel) - You should send the request like that: "location_ids": [1,2] However, - The apidoc is not that clear, so I will change it to:"Set the current location context for the request" - ATM, when you try to update a location id with a location that doesn't exists, you can a wrong error message, so I will add PR to fix the error we are getting. Created redmine issue https://projects.theforeman.org/issues/26754 from this bug Upstream bug assigned to mshira Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/26754 has been resolved. I created a manual cherry-pick, thanks Zach. Verified! @Satellite 6.5 snap 5 Steps: ------------- 1. Create a GCE CR 2. Attempt to update its location(that doesnt exists) from API PUT request Observation: --------------- 1. The location of CR is not being updated for the location doesnt exists as expected. 2. The correct error message is being showed. $ curl -H "Content-Type: application/json" -k -X PUT https://sat.com/api/v2/compute_resources/1 -d '{"compute_resource":{"location_ids":[44]}}' --insecure { "error": {"message":"Couldn't find Taxonomy with 'id'=[44]"} } 3. Navigation throughout the organization and satellite is smooth form UI post this error. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2020:1454 |