Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor API endpoints to restart manager/cluster to handle the API restarting #8483

Open
13 tasks
davidjiglesias opened this issue May 3, 2021 · 0 comments
Open
13 tasks

Comments

@davidjiglesias
Copy link
Member

Wazuh version Component
4.2.0 API/framework

Hello team,

When using manager restart endpoints (PUT /manager/restart and PUT /cluster/restart), we should properly handle the API response as it is not printing the request result if the execution takes a long time or produces an API error:

Here for example, the master takes around 1 minute and 20 seconds to restart, but the request result is not printed in the api.log:

2021/04/30 14:17:41 INFO: wazuh 172.31.82.157 "GET /tasks/status" with parameters {} and body {} done in 0.067s: 200
2021/04/30 14:19:03 INFO: Listening on 0.0.0.0:55000..

The restart request is performed at 14:17:42.

Regards,

David J. Iglesias

Checks

wazuh/wazuh

  • Unit tests without failures. Updated and/or expanded if there are new functions/methods/outputs:
    • Cluster (framework/wazuh/core/cluster/tests/ & framework/wazuh/core/cluster/dapi/tests/)
    • Core (framework/wazuh/core/tests/)
    • SDK (framework/wazuh/tests/)
    • RBAC (framework/wazuh/rbac/tests/)
    • API (api/api/tests/)
  • API tavern integration tests without failures. Updated and/or expanded if needed (api/test/integration/):
    • Affected tests
    • Affected RBAC (black and white) tests
  • Review integration test mapping using the script (api/test/integration/mapping/integration_test_api_endpoints.json)
  • Review of spec.yaml examples and schemas (api/api/spec/spec.yaml)
  • Review exceptions remediation when any endpoint path changes or is removed (framework/wazuh/core/exception.py)
  • Changelog (CHANGELOG.md)

wazuh/wazuh-documentation

  • Migration from 3.X for changed endpoints (source/user-manual/api/equivalence.rst)
  • Update RBAC reference with new/modified actions/resources/relationships (source/user-manual/api/rbac/reference.rst)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant