Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@philjb
Copy link
Contributor

@philjb philjb commented Nov 12, 2025

It has been a common mistake to run core's binary thinking it is enterprise 3. This seems to error first on the --cluster-id arg which is present in enterprise 3 but not core. Clap gives an "unexpected argument" error which is confusing as the user thought they were running enterprise.

This commit updates Core to look for this argument and always return an error explaing that this is core and an enterprise argument was used. This gives clear direction for the problem and how to fix it.

The error looks like this: which is clear in the problem and how to address it (some might say verbose). Clap's errors are already multiline so i didn't fret much about adding more newlines.

> influxdb3 serve --cluster-id foo --node-id bar
error: invalid value 'foo' for '--cluster-id <CLUSTER_ID>': You've incorrectly specified a cluster-id for InfluxDB 3 Core OSS.

Cluster-id is an InfluxDB 3 Enterprise parameter.
Did you install Core in an upgrade or run Core by mistake?

Remove --cluster-id to run InfluxDB 3 Core OSS.

For more information, try '--help'.

Note

If you don't like my (ab)use of clap; see my comment in the ticket for an alternative which i didn't like as much. Either way works.


pub fn fail_cluster_id(_: &str) -> Result<String, anyhow::Error> {
Err(anyhow::anyhow!(
"You've incorrectly specified a cluster-id for InfluxDB 3 Core OSS.\n\nCluster-id is an InfluxDB 3 Enterprise parameter. \
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wanted to make sure the first error line was clear for systems that might only catch the first line or replace newlines with spaces.

The first line will be like

error: invalid value 'foo' for '--cluster-id <CLUSTER_ID>': You've incorrectly specified a cluster-id for InfluxDB 3 Core OSS.

It says "error" and "invalid" and that the argument is "incorrect" for "Influxdb 3 Core oss".

That should be enough for most; if not, i've got three more lines of help for this error.

@philjb philjb requested review from hiltontj and pauldix and removed request for pauldix November 12, 2025 05:26
It has been a common mistake to run core's binary thinking it is
enterprise 3. This seems to error first on the --cluster-id arg which
is present in enterprise 3 but not core. Clap gives an "unexpected
argument" error which is confusing as the user thought they were running
enterprise.

This commit updates Core to look for this argument and always return
an error explaing that this is core and an enterprise argument was used.
This gives clear direction for the problem and how to fix it.

* closes #26967
@philjb philjb force-pushed the pjb/26967-cluster-id-error branch from fc0626d to 66d5600 Compare November 12, 2025 05:30
@philjb philjb marked this pull request as ready for review November 12, 2025 05:31
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.

Give better error when user specifies --cluster-id serve parameter

2 participants