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

NAS-130700 / 25.04 / Add support for remote controller audit query and download #14483

Merged
merged 7 commits into from
Sep 12, 2024

Conversation

mgrimesix
Copy link
Contributor

@mgrimesix mgrimesix commented Sep 10, 2024

Problem

On HA systems each controller maintains an independent audit database. Actions on a controller are reported only in the audit DB associated with that controller.

Solution

Provide the capability to query and download the audit DB from the 'other' controller.
If no controller is specified the audit action is performed on the 'current' controller.
If the controller is specified the audit action will be performed on the requested controller.
The controller can be specified by any of the following names: 'BACKUP', 'Standby', 'MASTER', 'Active'.

Passing CI tests: http://jenkins.eng.ixsystems.net:8080/job/tests/job/api_tests/631/

Valid 'controller' values are 'MASTER','Active','BACKUP','Standby'.
The default is the 'current' controller.

Add retries with delay on remote DB call in CI test.
Enhance the CI test asserts.
Still in debug.
Create common helper function.
Complete download CI test.
@bugclerk bugclerk changed the title Add support for remote controller audit query and download NAS-130700 / 25.04 / Add support for remote controller audit query and download Sep 10, 2024
@bugclerk
Copy link
Contributor

@mgrimesix mgrimesix requested review from a team, anodos325 and bmeagherix September 10, 2024 19:16
tests/api2/test_audit_basic.py Outdated Show resolved Hide resolved
src/middlewared/middlewared/plugins/audit/audit.py Outdated Show resolved Hide resolved
src/middlewared/middlewared/plugins/audit/audit.py Outdated Show resolved Hide resolved
Improve failure handling on the 'remote_call'.
Remove changes to audit/utils.py
Update CI tests.
@mgrimesix mgrimesix merged commit 505fa8a into master Sep 12, 2024
2 of 3 checks passed
@mgrimesix mgrimesix deleted the NAS-130700 branch September 12, 2024 00:32
@bugclerk
Copy link
Contributor

This PR has been merged and conversations have been locked.
If you would like to discuss more about this issue please use our forums or raise a Jira ticket.

@truenas truenas locked as resolved and limited conversation to collaborators Sep 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants