Description of problem: After adding the a compute resource from API, and changing its location via PUT request, just navigating the organisation from UI makes Foreman crash, and also reset the ssl certs Video link: https://drive.google.com/file/d/1rvd-aX9-D7piO3_szR0VdbASGGrHpZZ4/view?usp=sharing Check the video for more info Version-Release number of selected component (if applicable): master of kubevirt plugin How reproducible: Not always, but many times, was able to reproduce 5+ times Steps to Reproduce: 1.Add a Compute resource from API 2.Change its location via a PUT call 3.Navigate through organisation in UI Actual results: Crashes Foreman and resets SSL Certs in Client Browser Expected results: Should show the Compute resource correctly without crashing Additional info: check the video
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