[MXS-3279] maxctrl password option -p throws error Created: 2020-11-02  Updated: 2021-08-02  Resolved: 2021-08-02

Status: Closed
Project: MariaDB MaxScale
Component/s: maxctrl
Affects Version/s: 2.5
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Richard Stracke Assignee: markus makela
Resolution: Won't Fix Votes: 0
Labels: None

Issue Links:
Relates
relates to MXS-3308 Passing options in interactive mode r... Closed
relates to MXS-3272 maxctrl not prompt directy for the pa... Closed
Sprint: MXS-SPRINT-119

 Description   

If in 2.5 the -p option is used

[root@e6609fcdb55c /]#  maxctrl -u someuser -p
Not enough arguments following: p

Option --password has the same behaviour like MXS-3272



 Comments   
Comment by markus makela [ 2020-11-10 ]

This appears to have happened due to changes in the argument parsing library yargs. If a parameter is given that expects an argument and no argument is given, the default value (in this case mariadb) was used. This made it impossible to know whether the user provided a password without explicitly passing an empty string to the -p option.

This would require changes in the parser library and it's possible that the code was written with an expectation for it to work in a way that was not intended by the library developers.

For starters, we'll update the command help output to mention that passing an empty string as the password will cause it to be read from the standard input.

Comment by markus makela [ 2020-11-17 ]

The output of the --help command now explains that the option requires an argument and it must be an empty space for the password to be queried.

Comment by markus makela [ 2020-11-24 ]

Closing as Incomplete as this is something that can't be fixed at this point in time. In hindsight it's better to leave it as open until a proper solution arrives (this is a problem in the library we use).

Comment by markus makela [ 2021-08-02 ]

Due to this being very complex to implement outside of the Yargs library, I'll close this as Won't Fix now that the documentation explicitly mentions the need to pass an empty string to the -p argument.

Generated at Thu Feb 08 04:20:16 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.