Bug 2135355
| Summary: | No way to enable a disabled Recurring Logic | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Pavel Moravec <pmoravec> |
| Component: | Tasks Plugin | Assignee: | satellite6-bugs <satellite6-bugs> |
| Status: | CLOSED WONTFIX | QA Contact: | Peter Ondrejka <pondrejk> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.11.0 | CC: | aruzicka, peter.vreman |
| Target Milestone: | Unspecified | Keywords: | 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-12-01 18:26:35 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 mostly fixed in 6.12 where WebUI Enable button does work. Still no way (known to me) to let it enabled via API, where the outcome is the same. > per apidoc, "PUT /foreman_tasks/api/recurring_logics/:id" should work - but neither below command does work: The apidoc seems to be wrong, the accepted format should be { "id: $ID, "recurring_logic": { "enabled": $enabled } } > Since WebUI disable triggered /foreman_tasks/recurring_logics/5/disable endpoint and ForemanTasks::RecurringLogicsController#disable method, I also tried: > curl -H "content-type: application/json" -u admin:$PASS -X PUT -d "{\"id\": 5, \"enabled\": \"true\"}" https://$(hostname -f)/foreman_tasks/api/recurring_logics/5/enable Webui hits the non-api controller, the following could work, but as it is a non-api controller, it should not be considered stable interface curl -u admin:$pass -X PUT -d '{"id": $id}' https://$(hostname -f)/foreman_tasks/recurring_logics/5/enable (In reply to Adam Ruzicka from comment #2) > > per apidoc, "PUT /foreman_tasks/api/recurring_logics/:id" should work - but neither below command does work: > > The apidoc seems to be wrong, the accepted format should be { "id: $ID, > "recurring_logic": { "enabled": $enabled } } That does not work either (on 6.12 beta/testathlon): # cat enable.json { "id": "5", "recurring_logic": { "enabled": "true" } } [root@pmoravec-sat612-rhel8-beta ~]# curl -H "content-type: application/json" -u admin:$pass -X PUT -d @enable.json https://$(hostname -f)/foreman_tasks/recurring_logics/5 <!DOCTYPE html> <html> .. <body> <!-- This file lives in public/404.html --> <div class="dialog"> <div> <h1>The page you were looking for doesn't exist.</h1> .. > > Since WebUI disable triggered /foreman_tasks/recurring_logics/5/disable endpoint and ForemanTasks::RecurringLogicsController#disable method, I also tried: > > curl -H "content-type: application/json" -u admin:$PASS -X PUT -d "{\"id\": 5, \"enabled\": \"true\"}" https://$(hostname -f)/foreman_tasks/api/recurring_logics/5/enable > > Webui hits the non-api controller, the following could work, but as it is a > non-api controller, it should not be considered stable interface > > curl -u admin:$pass -X PUT -d '{"id": $id}' https://$(hostname > -f)/foreman_tasks/recurring_logics/5/enable This seems to fail on ActionController::InvalidAuthenticityToken all the time (but I guess prepending the command by getting auth token would make it work). Anyway, it seems "just" apidoc needs to be updated (to something that really does work). At least WebUI does work in 6.12 \o/ . > That does not work either (on 6.12 beta/testathlon): > # cat enable.json > ... > [root@pmoravec-sat612-rhel8-beta ~]# curl -H "content-type: application/json" -u admin:$pass -X PUT -d @enable.json https://$(hostname -f)/foreman_tasks/recurring_logics/5 But that's the ui controller again For reference, this seems to work for me, the apidoc should be updated to match this
curl -u $username:$password \
-X PUT \
-H 'Content-Type: application/json' \
-d '{"recurring_logic": { "enabled": true } }'
https://$sat_fqdn/foreman_tasks/api/recurring_logics/$recurring_logic_id
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. 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. |
Description of problem: When I disable a recurring logic (say, "Inventory scheduled sync", id=5), there is no way to successfully re-enable it. WebUI offers Enable button, but it is a no-op (production.log does not log anything). hammer does not have the capabilities to even enable or disable a recurring logic. API does not work for me, since: - per apidoc, "PUT /foreman_tasks/api/recurring_logics/:id" should work - but neither below command does work: curl -H "content-type: application/json" -u admin:$PASS -X PUT -d "{\"id\": 5, \"enabled\": 1}" https://$(hostname -f)/foreman_tasks/api/recurring_logics/5 curl -H "content-type: application/json" -u admin:$PASS -X PUT -d "{\"id\": 5, \"enabled\": \"true\"}" https://$(hostname -f)/foreman_tasks/api/recurring_logics/5 Both logs ForemanTasks::Api::RecurringLogicsController#update but with no real change. Since WebUI disable triggered /foreman_tasks/recurring_logics/5/disable endpoint and ForemanTasks::RecurringLogicsController#disable method, I also tried: curl -H "content-type: application/json" -u admin:$PASS -X PUT -d "{\"id\": 5, \"enabled\": \"true\"}" https://$(hostname -f)/foreman_tasks/api/recurring_logics/5/enable which failed with "No route matches" error. So I see no way in enabling a disabled recurring logic. Version-Release number of selected component (if applicable): Sat 6.11 How reproducible: 100% Steps to Reproduce: 1. Disable a recurring logic 2. Try to enable it by any mean. Actual results: 2. No way found. Expected results: 2. Ideally both API and WebUI does work. Additional info: