Bug 1900533
| Summary: | responses to /api/v2/settings/<id> no longer contain 'created_at' and 'updated_at' attrs | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Roman Plevka <rplevka> |
| Component: | Settings | Assignee: | Ondřej Ezr <oezr> |
| Status: | CLOSED ERRATA | QA Contact: | Devendra Singh <desingh> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.9.0 | CC: | apatel, mhulan, pcreech, zhunting |
| Target Milestone: | 6.9.0 | Keywords: | Regression, Triaged |
| Target Release: | Unused | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | foreman-2.3.1.1-1 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-04-21 13:18:56 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: | |||
this is a regression from 6.8 Upstream bug assigned to oezr Upstream bug assigned to oezr Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/31285 has been resolved. Verified on 6.9 Snap 9
Verification points:
1: Hit the GET request of discovery_location and now we able to see the "created_at" and "updated_at" attributes.
{
"description": "The default location to place discovered hosts in",
"category": "Setting::Discovered",
"settings_type": "string",
"default": "",
"created_at": "2021-01-19 17:37:39 UTC",
"updated_at": "2021-01-19 17:37:39 UTC",
"id": "discovery_location",
"name": "discovery_location",
"full_name": "Discovery location",
"value": "",
"category_name": "Discovered",
"readonly": false,
"config_file": "settings.yaml",
"encrypted": false,
"select_values": {
"Default Location": "Default Location"
}
}
2: Checked other APIs fix_db_cache and they are also working.
{
"description": "Fix DB cache on next Foreman restart",
"category": "Setting::General",
"settings_type": "boolean",
"default": false,
"created_at": "2021-01-19 17:37:03 UTC",
"updated_at": "2021-01-19 17:37:40 UTC",
"id": "fix_db_cache",
"name": "fix_db_cache",
"full_name": "Fix DB cache",
"value": false,
"category_name": "General",
"readonly": false,
"config_file": "settings.yaml",
"encrypted": false,
"select_values": null
}
3: Check the fixed package
# rpm -qa|grep "foreman-2.3.1"
foreman-2.3.1.2-1.el7sat.noarch
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 (Moderate: Satellite 6.9 Release), 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-2021:1313 |
foreman-2.3.0-0.7.rc1.el7sat.noarch The attrs are missing in responses to both GET and PUT requests (and possibly POST too) ``` 020-11-10T13:03:46 [I|app|12f445d8] Started PUT "/api/v2/settings/discovery_location" for 127.0.0.1 at 2020-11-10 13:03:46 +0100 2020-11-10T13:03:46 [I|app|12f445d8] Processing by Api::V2::SettingsController#update as JSON 2020-11-10T13:03:46 [I|app|12f445d8] Parameters: {"setting"=>{"value"=>"[FILTERED]"}, "apiv"=>"v2", "id"=>"discovery_location"} 2020-11-10T13:03:46 [D|app|12f445d8] Authenticated user admin against INTERNAL authentication source 2020-11-10T13:03:46 [D|app|12f445d8] Post-login processing for admin 2020-11-10T13:03:46 [I|app|12f445d8] Authorized user admin(Admin User) 2020-11-10T13:03:46 [D|app|12f445d8] Post-login processing for admin 2020-11-10T13:03:47 [D|tax|12f445d8] Current location set to none 2020-11-10T13:03:47 [D|tax|12f445d8] Current organization set to none 2020-11-10T13:03:47 [D|tax|12f445d8] Current location set to none 2020-11-10T13:03:47 [D|tax|12f445d8] Current organization set to none 2020-11-10T13:03:47 [I|app|12f445d8] Rendering api/v2/settings/update.json.rabl 2020-11-10T13:03:47 [I|app|12f445d8] Rendered api/v2/settings/update.json.rabl (Duration: 10.0ms | Allocations: 9623) 2020-11-10T13:03:47 [D|app|12f445d8] Body: {"description":"The default location to place discovered hosts in","category":"Setting::Discovered","settings_type":"string","default":"","id":"discovery_location","name":"discovery_location","full_name":"Discovery location","value":"rdrbVOgGL","category_name":"Discovered","readonly":false,"config_file":"settings.yaml","encrypted":false,"select_values":{"Default Location":"Default Location","hSifWeKfZA":"hSifWeKfZA","InvpeNKSWxY":"InvpeNKSWxY","KVKnKAVhOPuN":"KVKnKAVhOPuN","mfHnRd":"mfHnRd","plkDdIVt":"plkDdIVt","pVdbkevdTXD":"pVdbkevdTXD","rdrbVOgGL":"rdrbVOgGL","roCPQxZwGx":"roCPQxZwGx","SPwWAicNZ":"SPwWAicNZ","umgWgPLbmU":"umgWgPLbmU","zEZwsKid":"zEZwsKid"}} ``` Version-Release number of selected component (if applicable): satellite 6.9.0-1