Skip to content

Require SolrCloud mode: enforce at runtime and document clearly#43

Merged
janhoy merged 2 commits into
apache:mainfrom
janhoy:feature/require-cloud
May 30, 2026
Merged

Require SolrCloud mode: enforce at runtime and document clearly#43
janhoy merged 2 commits into
apache:mainfrom
janhoy:feature/require-cloud

Conversation

@janhoy
Copy link
Copy Markdown
Contributor

@janhoy janhoy commented May 29, 2026

Solr Orbit only supports SolrCloud (ZooKeeper) mode. Standalone/user-managed mode is not supported because collection management relies on the Collections API which is unavailable in standalone mode.

Changes:

  • Add SolrAdminClient.is_cloud_mode() which probes the CLUSTERSTATUS endpoint; returns True for cloud mode, False for standalone (HTTP 400), or raises on unexpected errors.
  • Add _check_cloud_mode() in test_run_orchestrator and call it from benchmark_only() so users get a clear error immediately rather than a confusing failure later.
  • Fix quickstart.md docker run example: replace 'solr-demo' (standalone) with '-c' (SolrCloud). Add an important callout about the cloud mode requirement.
  • Add SolrCloud requirement notes to running-workloads.md and test-procedures.md.
  • Add unit tests for all three is_cloud_mode() outcomes.

For Solr 9.x: start with '-c' flag (bin/solr start -c or docker run ... solr:9 -c). For Solr 10.0.0+: SolrCloud is the default; no extra flag needed. The provisioning pipelines (docker, from-distribution, from-sources) already start Solr with cloud mode for all versions.

Closes #33

Solr Orbit only supports SolrCloud (ZooKeeper) mode. Standalone/user-managed
mode is not supported because collection management relies on the Collections
API which is unavailable in standalone mode.

Changes:
- Add SolrAdminClient.is_cloud_mode() which probes the CLUSTERSTATUS endpoint;
  returns True for cloud mode, False for standalone (HTTP 400), or raises on
  unexpected errors.
- Add _check_cloud_mode() in test_run_orchestrator and call it from
  benchmark_only() so users get a clear error immediately rather than a
  confusing failure later.
- Fix quickstart.md docker run example: replace 'solr-demo' (standalone) with
  '-c' (SolrCloud). Add an important callout about the cloud mode requirement.
- Add SolrCloud requirement notes to running-workloads.md and test-procedures.md.
- Add unit tests for all three is_cloud_mode() outcomes.

For Solr 9.x: start with '-c' flag (bin/solr start -c or docker run ... solr:9 -c).
For Solr 10.0.0+: SolrCloud is the default; no extra flag needed.
The provisioning pipelines (docker, from-distribution, from-sources) already
start Solr with cloud mode for all versions.

Closes apache#33
Comment thread docs/quickstart.md Outdated
Copy link
Copy Markdown
Contributor

@epugh epugh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than a question about the phrasing of SolrCloud mode, this LGTM. I like that you went beyond just the documentation and actually made it part of the code! Will save folks who run it against something without reading the docs, or point to a solr that just happens to NOT be in cloud mode.

@janhoy janhoy merged commit e34a7ea into apache:main May 30, 2026
5 checks passed
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.

[Bug]: delete-collection fails with non cloud running Solr

2 participants