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

Database Maintenance Mode and Operations #1386

Open
cd-rite opened this issue Sep 25, 2024 · 0 comments
Open

Database Maintenance Mode and Operations #1386

cd-rite opened this issue Sep 25, 2024 · 0 comments
Labels
API enhancement New feature or request UI

Comments

@cd-rite
Copy link
Collaborator

cd-rite commented Sep 25, 2024

Allow App managers to put the app into a "Maintenance Mode" limiting app functionality for other users, but enabling new maintenance features.

The once enabled, /op/maintenance endpoints will let admins:

  • invoke OPTIMIZE TABLES

  • invoke ANALYZE TABLES

  • run statements that re-calculate metrics (with granularity?)

  • run statements that populate our materialized views (current_rev, default_rev)

  • dump select data to file (ie. AppData)

  • push data from a file (ie. AppData)

  • run statements that restore disabled objects

  • run statements that performantly delete disabled objects

  • delete orphaned reviews

  • force history deletions

  • export history?

  • offer MySQL SELECT statements

  • See raw endpoint responses

  • Enable Swagger UI

  • get maintenance mode status (operations in progress, etc)

  • Request END MAINTENANCE MODE (account for ops in progress)

  • Not all of the above may require full "maintenance mode" limiting access for other users.

Consider:
Allowing access to STIG endpoints for Reference STIG imports, allowing unfettered metrics recalculation (in lieu of background metrics calculations)

Client behavior on invocation of maintenance mode:
App Managers:
Any app Admin can use "maintenance" features once mode is invoked.
Restricted Ext client or full client, any operation allowed?
Leaning towards - Entirely new client with limited feature set.

When does Maintenance Mode end?
Initially - no timeout, must be ended by app admin.
Alternate "permanent" entry to maintenance mode - set w Envvar

Others:
Alternate client - Simple "STIGMan is in maintenance mode. Invoked by: XXXXX" message.
Standard Error handler - intercept "maintenance mode" message and invoke special handling (suggest reloading app, etc.)

API
In maintenance mode:
return 503s based on user privilege (populated by "maintenance mode" message).
intercept in auth handling - user must have "admin" privilege to process any request

Feature:
Take "snapshot" of current state of collection(s) Reviews/metrics, or parts thereof.

@cd-rite cd-rite changed the title Database Maintenance Mode Database Maintenance Mode and Features Sep 26, 2024
@cd-rite cd-rite changed the title Database Maintenance Mode and Features Database Maintenance Mode and Operations Sep 26, 2024
@cd-rite cd-rite added enhancement New feature or request API UI labels Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API enhancement New feature or request UI
Projects
Development

No branches or pull requests

1 participant