Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-25566

CLONE - cbbackupmgr "argument already specified" error seen when argument is set as an environment variable

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 4.6.4
    • 4.6.2
    • tools
    • None
    • Untriaged
    • Unknown

    Description

      Issue:
      * When cbbackupmgr is executed with the following arguments:

      ./cbbackupmgr backup -a /tmp/test -r perf-test -c couchbase://10.xxx.xxx.101 -u Administrator -p password
      the error message "Argument for p/-password already specified" is displayed. 


      * When cbbackupmgr is executed with the following arguments after removing the "-p", the following error is seen:

      ./cbbackupmgr backup -a /tmp/test -r perf-test -c couchbase://10.141.162.101 -u Administrator
      The error message: "Error backing up cluster: Authentication error executing "GET http://10.xxx.xxx.101:8091/pools" check username and password" is displayed. 


      In this case, it indicates that the cbbackupmgr is obtaining the password from somewhere. The source of the password is an environmental variable CB_PASSWORD, but its not explicitly mentioned in the message seen on the console.

      This kind of behavior is seen even for all the other arguments "-a", "-u" and "-c" which correspond to "CB_ARCHIVE_PATH", "CB_USERNAME" and "CB_CLUSTER" environment variables respectively. 


      The users may not remember that they have already set the arguments as environment variables and can be confused seeing the "Argument already specified" message. They may be unable to figure out the source from where cbbackupmgr is picking up the values as it is not mentioned in the message.

      Expected Behavior:

      In the cases where the arguments are already specified as an environment variables and if the user provides the arguments again as command line parameters (for example: "-p" <password>)

      * cbbackupmgr can give precedence to the value of the argument  provided on the command line (for example "-p <password>") instead of the picking it up from the environment variable (for example "CB_PASSWORD") thereby overriding the value present in the environment variable. 


      OR

      • cbbackupmgr can provide a helpful error message. For example, mentioning something like: "Password  is set as an environment variable and is also provided with -p, please only specify one value."

      The same logic can apply to all the other arguments mentioned above.


      Attachments

        Issue Links

          For Gerrit Dashboard: MB-25566
          # Subject Branch Project Status CR V

          Activity

            People

              thuan Thuan Nguyen
              sindhura.palakodety Sindhura Palakodety (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty