docs(opensearch): add the ES → OpenSearch migration runbook for Support and Cloud - #37103
docs(opensearch): add the ES → OpenSearch migration runbook for Support and Cloud#37103fabrizzio-dotCMS wants to merge 3 commits into
Conversation
…rt and Cloud (#37102) The existing OpenSearch docs cover architecture and lab testing; neither is a procedure someone can follow to migrate a customer. This adds that procedure. New docs/backend/OPENSEARCH_MIGRATION_RUNBOOK.md, five parts: - Understand — concepts, why four phases exist, the mirror strategy for the active index and every source of drift, and how one dotCMS drives two engines (single routing layer + Elasticsearch SDK types replaced by dotCMS domain objects). - Impact — VTL viewTools and the three field-proven regression classes, Lucene queries and the search REST endpoints, Site Search, and OSGi plugins graded by exposure level with the commands to audit a customer's bundles. - Prepare — OpenSearch prerequisites and security criteria (version, endpoint separation, TLS, least-privilege service account, the cluster:monitor/main and index-pattern traps), what happens when OpenSearch is unreachable per phase, customer selection and sizing, rehearsing on a clone, and the straight-to- Phase-3 fast path with its cost stated. - Execute — the readiness endpoint as source of truth and the role that gates it, where the phase lives and when a restart is mandatory, cluster node consistency and traffic handling, the 0→1→2→3 procedure, and Site Search. - Recover — downgrade paths, coming back from Phase 3, the pre-migration backup index trap, emergency stop, and a troubleshooting table. Plus three appendices: verification commands, configuration reference, and the log lines worth recognizing. Also corrects OPENSEARCH_MIGRATION_TESTER_GUIDE.md, which still described OS_MIGRATION_INDEX_VISIBILITY_ROLE_KEY as the role that reveals .os indices in the index portlet. Since #36360 MigrationIndexVisibility is purely phase-based (hidden in phases 0/1/2 for everyone, shown in phase 3) and the role key only gates the readiness endpoint. Cross-links the architecture doc and the tester guide to the runbook. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Claude finished @fabrizzio-dotCMS's task in 5m 14s —— View job Review — ES→OpenSearch migration runbookDocs-only PR. I verified the load-bearing technical claims against the code on this branch rather than trusting the prose, since a runbook's whole value is being right. The large majority check out exactly: the readiness endpoint path ( One factual error stands out, and it is the kind that bites during an incident. New Issues
No other inaccuracies surfaced across the claims I could verify against code. The internal-anchor sweep the author reports I couldn't reproduce here (the sandbox blocked scripting), but the anchors I spot-checked — including the double-hyphen em-dash stage anchors — resolve correctly. |
The first version was organised by topic, so the procedure landed at section 19
of 23 — you had to read 65% of the file before the first instruction, and that
section then delegated back out ("restart per §18", "permission check per §11").
It read as a reference manual, not as a guide.
Reordered so the procedure leads and the reference follows:
- "Before you begin" — what you are about to do, the three rules that prevent
almost every incident, the standard-vs-fast-path decision, and the access
checklist.
- Part 1, Stages 0-5 plus the fast path. Every step is Why / Do this / You
should see / If instead you see, with the command inline at the moment it is
needed instead of in an appendix. Every stage ends with a gate.
- Part 2 — recovery, emergency stop, and a symptom table that links to the step
that fixes it.
- Part 3 — R1-R15 reference, linked into from the steps.
The procedure now starts at line 142 instead of 1074. No technical content was
dropped; the conceptual material moved behind the steps and the operational
detail moved into them.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The guide went straight from the table of contents into "Stage 0 — Assess the customer". Someone opening it cold had no idea why the migration exists, what the four phases are, or when a restart is required — all of that was in the reference at the back, which is exactly where a newcomer will not look. Replaces the terse "Before you begin" page with a ten-minute orientation: 1. Why this migration exists — and why repointing ES_ENDPOINTS at OpenSearch does not work (the legacy client cannot write content to OpenSearch 3.x), which is the first question anyone asks. 2. What the search engine actually does for dotCMS — content pulls, URL maps, admin search, Site Search, GraphQL — so it is obvious why an incomplete index shows up as empty pages rather than errors. 3. The four phases explained one at a time: what changes, what the customer sees, what the phase proves, and what you must do while in it. 4. Changing the phase — where the switch lives, config vs system table, the restart rule with its reasoning, and a walkthrough of exactly what goes wrong (silently) if you skip the 0 -> 1 restart. 5-8. The three rules, path choice, prerequisites, and how the guide is laid out. R2 now points at the narrative version instead of being the only explanation. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Closes #37102
Proposed Changes
New —
docs/backend/OPENSEARCH_MIGRATION_RUNBOOK.md. A step-by-step migration guide: a Support or Cloud engineer is handed a customer instance and this walks them from "I have not touched anything" to "the customer is on OpenSearch". It assumes no Java and no knowledge of the internals.It is a guide, not a test plan — verification steps exist only to confirm a step landed before you move to the next one. QA coverage stays where it lives, in
OPENSEARCH_MIGRATION_TESTER_GUIDE.mdandOPENSEARCH_MIGRATION_TEST_PLAN.md.Structure — the procedure leads, the reference follows.
esSearch/esRaw, grade every OSGi bundle Level 1/2/3 with theunzip/grepcommands, inventory Site Search, choose the path.cluster:monitor/maingap from spike Spike: Validate dotCMS OpenSearch client requests against a non-admin OS 3.x user #35922), the three permission checks that catch the index-pattern-vs-cluster-id trap ([QA-G16] OpenSearch Migration — Limited (Non-Admin) OpenSearch User (TC-053–TC-058) #36222), and theOS_*settings..osrows exist, confirm one write reaches both engines by document, run the full reindex, crawl Site Search, confirm with the readiness report, soak.safeToAdvance, phase, rolling restart, walk the customer's site (the moment the Stage 0 risks materialise, with a symptom→cause table), watch for read fallbacks, soak.Fixed —
OPENSEARCH_MIGRATION_TESTER_GUIDE.mdwas stale. It still describedOS_MIGRATION_INDEX_VISIBILITY_ROLE_KEYas the role that reveals.osindices in the index portlet and in/api/v1/esindex. That stopped being true in #36360:MigrationIndexVisibilityis now purely phase-based — hidden in Phases 0/1/2 for everyone, shown in Phase 3, consulting no user or role — and the role key gates only the readiness endpoint. Corrected in the config table, the §6 callout, the "which phase am I in" bullets, and the FAQ, pointing readers at the readiness endpoint instead.Cross-links.
OPENSEARCH_MIGRATION.mdand the tester guide now point to the guide.Checklist
docker/docker-compose-examples/single-node-os-migration; no customer or production data appears anywhere in it.Additional Info
Every claim was verified against the code on this branch rather than carried over from the older docs — the readiness model and its derived
driftPercent/esIndexedPercent/osIndexedPercentfields, the startup validator's halt-vs-fail-loud split by phase,MigrationPhaseand the system-table precedence over the environment variable,MigrationIndexVisibilitybeing phase-only, the OpenSearch role's permission set inopensearch.py, the/v1/esindexand/v1/system-tableendpoint shapes, and theESContentToolmethod surface.All 92 internal anchors and all sibling-document links resolve.
Docs-only: no code, no schema, no API contract change. Nothing for CI to test and nothing for QA to exercise.