confluentinc / cp-docker-images

[DEPRECATED] Docker images for Confluent Platform.
Apache License 2.0
1.14k stars 704 forks source link

Connect's Internal converters configurations still required #797

Closed ybyzek closed 4 years ago

ybyzek commented 5 years ago

It appears that https://github.com/confluentinc/cp-docker-images/pull/761/ is incomplete. It removed the check that those variables are defined (dub ensure) with the intention that docker images could remove the configs:

CONNECT_INTERNAL_KEY_CONVERTER: "org.apache.kafka.connect.json.JsonConverter"
CONNECT_INTERNAL_VALUE_CONVERTER: "org.apache.kafka.connect.json.JsonConverter"

However removing those config lines results in the Connect image failing:

kafka-connect      | /etc/confluent/docker/configure: line 36: CONNECT_INTERNAL_KEY_CONVERTER: unbound variable

The reason is that the code in the kafka-connect-base image references those variables anyway, and thus will fail if they're not set: https://github.com/confluentinc/cp-docker-images/blob/5.3.1-post/debian/kafka-connect-base/include/etc/confluent/docker/configure#L36.

cc: @rmoff

rspurgeon commented 5 years ago

Occurs because of: https://github.com/confluentinc/cp-docker-images/blob/5.3.1-post/debian/base/include/etc/confluent/docker/bash-config#L16

set -o nounset

https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#The-Set-Builtin

set -u nounset same as -u

-u
    Treat unset variables and parameters other than the special parameters ‘@’ or ‘*’ as an error when performing parameter expansion. An error message will be written to the standard error, and a non-interactive shell will exit.
rmoff commented 4 years ago

Fixed with https://github.com/confluentinc/cp-docker-images/pull/805 and https://github.com/confluentinc/kafka-images/pull/11