Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-3279

maxctrl password option -p throws error

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Won't Fix
    • 2.5
    • N/A
    • maxctrl
    • None
    • 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

      Attachments

        Issue Links

          Activity

            markus makela markus makela added a comment - - edited

            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.

            markus makela markus makela added a comment - - edited 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.
            markus makela markus makela added a comment -

            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.

            markus makela markus makela added a comment - 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.
            markus makela markus makela added a comment - - edited

            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).

            markus makela markus makela added a comment - - edited 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).
            markus makela markus makela added a comment -

            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.

            markus makela markus makela added a comment - 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.

            People

              markus makela markus makela
              Richard Richard Stracke
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.