Skip to content

feat: add global OpenSearch index prefix support (#8489)#8514

Draft
mezzeddinee wants to merge 2 commits intoDIRACGrid:integrationfrom
mezzeddinee:feature/8489-opensearch-global-index-prefix
Draft

feat: add global OpenSearch index prefix support (#8489)#8514
mezzeddinee wants to merge 2 commits intoDIRACGrid:integrationfrom
mezzeddinee:feature/8489-opensearch-global-index-prefix

Conversation

@mezzeddinee
Copy link
Copy Markdown

@mezzeddinee mezzeddinee commented Apr 14, 2026

Fixes #8489 by introducing index prefixing as a global OpenSearch setting and removing MonitoringDB-local prefix handling.

What changed

  • src/DIRAC/ConfigurationSystem/Client/Utilities.py

    • Read /Systems/NoSQLDatabases/IndexPrefix in getElasticDBParameters.
    • Normalize value (strip().lower()) and pass it as IndexPrefix.
  • src/DIRAC/Core/Base/ElasticDB.py

    • Read global IndexPrefix from DB parameters.
    • Forward it to ElasticSearchDB as globalIndexPrefix.
  • src/DIRAC/Core/Utilities/ElasticSearchDB.py

    • Added globalIndexPrefix constructor parameter and property setter.
    • Added _withGlobalPrefix() helper to prepend the global prefix to index names/patterns.
    • Applied prefixing across index/template/search/read/write/delete operations.
    • Refactored bulk_index flow to avoid apparent double-prepending.
  • src/DIRAC/MonitoringSystem/DB/MonitoringDB.py

    • Removed MonitoringDB-specific IndexPrefix lookup from CS.
    • Rely on inherited global prefix mechanism via ElasticDB.
  • docs/source/AdministratorGuide/ExternalsSupport/index.rst

    • Documented IndexPrefix under Systems/NoSQLDatabases and clarified it is lower-case.
  • docs/source/AdministratorGuide/Systems/MonitoringSystem/index.rst

    • Updated docs to reference global Systems/NoSQLDatabases/IndexPrefix.
  • src/DIRAC/Core/scripts/install_full.cfg

    • Added commented example for global IndexPrefix under NoSQLDatabases.

@mezzeddinee mezzeddinee marked this pull request as draft April 14, 2026 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Introduce the concept of a global prefix for OpenSearch indexes

2 participants