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

NC | Avoid concurrency master key manager initialization #8097

Merged
merged 1 commit into from
May 30, 2024

Conversation

romayalon
Copy link
Contributor

@romayalon romayalon commented May 29, 2024

Explain the changes

  1. manage_nsfs.js -
  • account_management() - call nc_mkm.init() - in order to avoid concurrent calls master key manager initialization that might cause race conditions. call init() only if action is account add/update or show_secrets flag was provided (show_secrets can be passed in account list/status).
  • list_config_files() - inside the loop - decrypt access keys only if show_secrets is set to true - reduce calls to nc_mkm.init() which will reduce calls for reading/getting the master keys json.
  1. nc_master_key_manager.js - add prints for debugging.

Issues: Fixed #xxx / Gap #xxx

Testing Instructions:

  • Doc added/updated
  • Tests added

src/cmd/manage_nsfs.js Outdated Show resolved Hide resolved
@guymguym guymguym added this to the 5.15.4 milestone May 29, 2024
@romayalon romayalon force-pushed the romy-concurrent-nc-mkm-init branch 2 times, most recently from 12abfee to acfed4d Compare May 30, 2024 06:00
@romayalon romayalon requested a review from guymguym May 30, 2024 06:06
@romayalon romayalon force-pushed the romy-concurrent-nc-mkm-init branch from acfed4d to f90c5ad Compare May 30, 2024 06:12
Signed-off-by: Romy <35330373+romayalon@users.noreply.github.com>
@romayalon romayalon force-pushed the romy-concurrent-nc-mkm-init branch from f90c5ad to 6f1d2a7 Compare May 30, 2024 06:43
@romayalon romayalon merged commit 0c1ba1c into noobaa:master May 30, 2024
10 checks passed
@romayalon romayalon mentioned this pull request May 30, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants