Description of problem: When setting roles through an API call, the company name and zone are set back to default values. Version-Release number of selected component (if applicable): Red Hat CloudForms 4.6 How reproducible: 100% API Query: Update/change the role using API. Actual results: After the API call, the company name and zone are set back to default values. Expected Results: The company name and zone should not change.
Please assess the impact of this issue and update the severity accordingly. Please refer to https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity for a reminder on each severity's definition. If it's something like a tracker bug where it doesn't matter, please set the severity to Low.
*** Bug 1597382 has been marked as a duplicate of this bug. ***
Dustin, Do you have logs for this issue? I cannot duplicate it locally, but I think there is a race where multiple API workers are in play. The way it works is that when either the API or UI worker gets a Settings change, it immediately updates it's in-memory cache, and then broadcast's a cache-invalidation to all other workers. It's possible that the second call comes into the second worker before it has received the cache-invalidation broadcast. So, under the covers it thinks the value was changed back. I want to verify this before fixing it, so if you have logs, it will be very clear if I see alternating threads getting the changes.
Created attachment 1457824 [details] Current logs, both with debug on and off, when bug occurs Ran through the below routine twice. First time with debug off, second with debug on: curl -X PATCH -u 'admin:smartvm' -d "{\"server\":{\"name\":\"cfme-test-api\"}}" 'https://192.168.50.184/api/servers/1000000000001/settings' -k | python -m json.tool curl -X PATCH -u 'admin:smartvm' -d "{\"server\":{\"company\":\"api company\"}}" 'https://192.168.50.184/api/servers/1000000000001/settings' -k | python -m json.tool
Jason, supplied needed info above. See attached logs for details.
It should also be noted, that this system has had the settings changes applied for several days. However, when I applied the new settings via the API, it reverted the server name completely back to EVM. Other settings, such as SMTP and NTP settings, were also reverted as well.
Changing to NOTABUG as bug was not identified and fixed before BZ was closed. resetting qe_test_coverage as well, as QE can automate coverage of such behavior.