Uploaded image for project: 'Kudu'
  1. Kudu
  2. KUDU-1993

The validation of 'grouped' flags works incorrectly if flags re-ordered

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.0, 1.3.1
    • Fix Version/s: 1.3.2, 1.4.0
    • Component/s: master, tserver
    • Labels:
      None

      Description

      To illustrate the issue, run with the following order of the webserver_certificate_file,webserver_private_key_file grouped flags:

      ./bin/kudu-tserver --webserver_certificate_file=/tmp/x.pem --webserver_private_key_file=/tmp/y.pem
      WARNING: Logging before InitGoogleLogging() is written to STDERR
      E0503 18:43:23.122520 21873 webserver_options.cc:93] --webserver_certificate_file and --webserver_private_key_file must be set as a group
      E0503 18:43:23.122825 21873 webserver_options.cc:93] --webserver_certificate_file and --webserver_private_key_file must be set as a group
      ERROR: failed validation of new value '/tmp/y.pem' for flag 'webserver_private_key_file'
      

      Specifying the flags in different order passes the validation with no issues.

      The problem happens because a gflag validator is fired upon parsing particular flag, but since current 'group' flags validators assume the counterpart flags have already been parsed and set, it depends on the order of the flags in the command line.

        Attachments

          Activity

            People

            • Assignee:
              aserbin Alexey Serbin
              Reporter:
              aserbin Alexey Serbin
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: