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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.3.0, 1.3.1
    • 1.3.2, 1.4.0
    • master, tserver
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: