Skip to content

Add validation of IP addresses and domains in settings #46918

@rschu1ze

Description

@rschu1ze

Many settings in ClickHouse's configuration file specify hosts in the form of IP addresses (12.13.14.15) or domains (mail.stanford.edu). Example:

<clickhouse>
    <zookeeper>
        <node ...>
            <host> 172.31.0.47</host>
            ...
        </node>
    </zookeeper>
</clickhouse>

Many similar settings exist. As of now, these settings are parsed as strings and typos (e.g. a leading space in above example) cannot be detected immediately - in this case the connection to the host would silently fail. We should add a method bool getHost(const std::string & key) const; to "base/poco/Util/include/Poco/Util/AbstractConfiguration.h" which does some basic validity checking by itself and throw an exception accordingly.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions