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

influxd binary needs better command-line parameter help #6805

Closed
beckettsean opened this issue Jun 7, 2016 · 5 comments · Fixed by #18043
Closed

influxd binary needs better command-line parameter help #6805

beckettsean opened this issue Jun 7, 2016 · 5 comments · Fixed by #18043
Assignees
Milestone

Comments

@beckettsean
Copy link
Contributor

Feature Request

Proposal: [Description of the feature]

Calling influxd with an unrecognized switch should point users to the influxd help subcommand.

Also, the current list of switches/flags is partially incorrect.

Current behavior: [What currently happens]

# influxd -help
usage: run [flags]

run starts the InfluxDB server. If this is the first time running the command
then a new cluster will be initialized unless the -join argument is used.

        -config <path>
                          Set the path to the configuration file.

        -hostname <name>
                          Override the hostname, the 'hostname' configuration
                          option will be overridden.

        -pidfile <path>
                          Write process ID to a file.

        -cpuprofile <path>
                          Write CPU profiling information to a file.

        -memprofile <path>
                          Write memory usage information to a file.

run: flag: help requested

To get the subcommands you must run influxd help, no flag:

# influxd help
Configure and start an InfluxDB server.

Usage:

    influxd [[command] [arguments]]

The commands are:

    backup               downloads a snapshot of a data node and saves it to disk
    config               display the default configuration
    restore              uses a snapshot of a data node to rebuild a cluster
    run                  run node with existing configuration
    version              displays the InfluxDB version

"run" is the default command.

Use "influxd help [command]" for more information about a command.

Desired behavior: [What you would like to happen]

The above switch output mentions -join, which in the post 0.12 world is likely deprecated or removed. It also doesn't mention the help command, which is the only way to find out about subcommands like version or backup.

Use case: [Why is this important (helps with prioritizing requests)]

It's impossible to remember every switch and flag to every binary, and naive POSIX users like me rely on being able to get a reminder output from the binary with something like influxd -? or influxd --help. I get output from those that is incomplete, because instead I must run influxd help, which isn't mentioned in the seemingly complete output from influxd -?

@jsternberg
Copy link
Contributor

I implemented this in a PR, but I would like us to consider using something other than Go's default command line parser in the future. I'm of the opinion that the Go command line parser is very user unfriendly since it uses almost no established standard and instead sets a new standard. The Docker project did something similar when they started getting towards 1.0.

@mark-rushakoff
Copy link
Contributor

@jsternberg You're right that the Go flag parser is nonstandard, as Rob Pike pointed out:

As the author of the flag package, I can explain [why the Go flag package uses a different convention to the traditional Unix command line flags]. It's loosely based on Google's flag package, although greatly simplified (and I mean greatly). I wanted a single, straightforward syntax for flags, nothing more, nothing less.

I'd be thrilled if we could get on Unix style flags, but is that a breaking change? Can we do that before 1.0 final?

@jsternberg
Copy link
Contributor

We can do what Docker did and accept both, but it's more work than I'd like at the moment which is why I haven't done it. I'll mess around with it in my free time to see how difficult it would be.

@jsternberg
Copy link
Contributor

The problems mentioned in this issue were fixed with a couple of different PRs. One of them is #6811. I think there are a few other PRs that fixed the help messages and made the formatting consistent, but I can't find the exact PR numbers.

@jsternberg
Copy link
Contributor

Also #7052 has an implementation for switching our binaries to use posix flags.

@timhallinflux timhallinflux added this to the 1.0.0 milestone Dec 19, 2016
rockstar added a commit that referenced this issue May 20, 2020
This patch implements the window pushdown for aggregate counts.

Fixes #6805
rockstar added a commit to rockstar/influxdb that referenced this issue May 20, 2020
This patch implements the window pushdown for aggregate counts.

Fixes influxdata#6805
rockstar added a commit to rockstar/influxdb that referenced this issue May 20, 2020
This patch implements the window pushdown for aggregate counts.

Fixes influxdata#6805
rockstar added a commit that referenced this issue May 20, 2020
This patch implements the window pushdown for aggregate counts.

Fixes #6805
rockstar added a commit that referenced this issue May 21, 2020
This patch implements the window pushdown for aggregate counts.

Fixes #6805
rockstar added a commit that referenced this issue May 21, 2020
This patch implements the window pushdown for aggregate counts.

Fixes #6805
rockstar added a commit to rockstar/influxdb that referenced this issue May 25, 2020
This patch implements the window pushdown for aggregate counts.

Fixes influxdata#6805
rockstar added a commit to rockstar/influxdb that referenced this issue May 25, 2020
This patch implements the window pushdown for aggregate counts.

Fixes influxdata#6805
rockstar added a commit that referenced this issue May 26, 2020
This patch implements the window pushdown for aggregate counts.

Fixes #6805
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 a pull request may close this issue.

4 participants