Issue
When using flags with nomad cli commands there are seemingly needless requirements for where the flags are written in the command, and whether the parameters are flags or arguments also varies. This is a big annoyance since the position requirements of the flags also differ between commands, resulting in growing frustration among our users.
Example 1:
nomad alloc status -verbose 34a63710 works, but nomad alloc status 34a63710 -verbose does not.
Example 2:
Sometimes the task parameter is defined as a flag for a command, and sometimes not:
When reading logs the task is passed as an argument:
nomad alloc logs -f -tail 28403873 galera-node
I actually got frustrated with this myself, just writing this issue and trying to show examples, this is a great example of why this needs reworking:
nomad exec -i -t 28403873 sh
Allocation "28403873" is running the following tasks:
* host-dir-setup
* galera-node
Please specify the task.
Okay... "specify the task", naturally it should be the same way as with nomad alloc logs, right?
nomad exec -i -t 28403873 galera-node sh
Allocation "28403873" is running the following tasks:
* host-dir-setup
* galera-node
Please specify the task.
Nope - that didn't work, according to the help we need to set task as a flag here instead:
nomad exec -i -t -task galera-node 28403873 sh
Note that for the nomad exec command you need to specify the task before the allocation ID, while for the nomad alloc logs its passed after the allocation ID, this kind of inconsistent behavior between commands is really confusing and time consuming because you have to start figuring out how the flags and args are supposed to be passed for different commands.
Issue
When using flags with nomad cli commands there are seemingly needless requirements for where the flags are written in the command, and whether the parameters are flags or arguments also varies. This is a big annoyance since the position requirements of the flags also differ between commands, resulting in growing frustration among our users.
Example 1:
nomad alloc status -verbose 34a63710works, butnomad alloc status 34a63710 -verbosedoes not.Example 2:
Sometimes the
taskparameter is defined as a flag for a command, and sometimes not:When reading logs the task is passed as an argument:
nomad alloc logs -f -tail 28403873 galera-nodeI actually got frustrated with this myself, just writing this issue and trying to show examples, this is a great example of why this needs reworking:
Okay... "specify the task", naturally it should be the same way as with
nomad alloc logs, right?Nope - that didn't work, according to the help we need to set
taskas a flag here instead:Note that for the
nomad execcommand you need to specify the task before the allocation ID, while for thenomad alloc logsits passed after the allocation ID, this kind of inconsistent behavior between commands is really confusing and time consuming because you have to start figuring out how the flags and args are supposed to be passed for different commands.