[ 
https://issues.apache.org/jira/browse/KAFKA-17192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17868415#comment-17868415
 ] 

Greg Harris commented on KAFKA-17192:
-------------------------------------

Hi [~k0b3rit] thanks for the bug report!

The "config.providers" not being propagated to the connector config is actually 
a desirable property, as config providers are typically defined in the worker 
and evaluated on behalf of connectors. However, it appears the same prefix-bug 
is preventing the MirrorMakerConfig#workerConfig from propagating the 
config.providers.

I think you can work around this by specifying "<cluster>.config.providers=env" 
for each "<cluster>" in the "clusters" config. We can also change this so that 
workerConfig includes "config.providers".

> MirrorMaker2 worker config does not pass config.providers value to connectors
> -----------------------------------------------------------------------------
>
>                 Key: KAFKA-17192
>                 URL: https://issues.apache.org/jira/browse/KAFKA-17192
>             Project: Kafka
>          Issue Type: Bug
>          Components: mirrormaker
>    Affects Versions: 3.7.0, 3.7.1
>            Reporter: Bertalan Kondrat
>            Assignee: Bertalan Kondrat
>            Priority: Major
>
> MirrorMaker2 worker config does not pass config.providers value to connectors.
> With this 
> [commit|https://github.com/apache/kafka/commit/8cfafba2794562840b0f1c537e304f084b9359cf#diff-015b9a2584a6c84806c633ec7fb59d7a9639bb7d8b206e582029af486881e41dL309]
>  we changed the behavior of the _stringsWithPrefix_ method.
> The new implementation does not include the configurations where the prefix 
> exactly the same as the config key.
> For example:
> Prefix:
> {code:java}
> config.providers{code}
> Configs:
> {code:java}
> config.providers=env
> config.providers.env.class=org.apache.kafka.common.config.provider.EnvVarConfigProvider{code}
> Result:
> {code:java}
> config.providers.env.class=org.apache.kafka.common.config.provider.EnvVarConfigProvider
>  {code}
> The result does not include the 
> {noformat}
> config.providers=env{noformat}
>  
> As a result of this behavior, the connectors could not resolve variables.
> Reproduction is easy, just start an MM2 instance with the following config
> {code:java}
> ssl.truststore.location=${env:TRUSTSTORE_LOCATION}
> config.providers=env
> config.providers.env.class=org.apache.kafka.common.config.provider.EnvVarConfigProvider
>  {code}
> Check the connector configs in the log. (grep for ${env:TRUSTSTORE_LOCATION})



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to