You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kudu.apache.org by "Alexey Serbin (JIRA)" <ji...@apache.org> on 2017/05/04 03:03:04 UTC

[jira] [Updated] (KUDU-1993) The validation of 'grouped' flags works incorrectly if flags re-ordered

     [ https://issues.apache.org/jira/browse/KUDU-1993?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Serbin updated KUDU-1993:
--------------------------------
    Description: 
To illustrate the issue, run with the following order of the {{webserver_certificate_file,webserver_private_key_file}} grouped flags:

{noformat}
./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'
{noformat}

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.

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

{noformat}
./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'
{noformat}

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

The problem is 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.


> The validation of 'grouped' flags works incorrectly if flags re-ordered
> -----------------------------------------------------------------------
>
>                 Key: KUDU-1993
>                 URL: https://issues.apache.org/jira/browse/KUDU-1993
>             Project: Kudu
>          Issue Type: Bug
>          Components: master, tserver
>    Affects Versions: 1.3.0, 1.3.1
>            Reporter: Alexey Serbin
>            Assignee: Alexey Serbin
>
> To illustrate the issue, run with the following order of the {{webserver_certificate_file,webserver_private_key_file}} grouped flags:
> {noformat}
> ./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'
> {noformat}
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)