Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Precreate the plugins directory to avoid errors in Mirror Maker 2 pods #9607

Conversation

scholzj
Copy link
Member

@scholzj scholzj commented Jan 27, 2024

Type of change

  • Bugfix

Description

In Connect and MM2, we preconfigure the plugin.path option to /opt/kafka/plugins. But out of the box, this directory does not exist. And that causes the following error:

2024-01-27 15:48:27,103 ERROR Could not get listing for plugin path: /opt/kafka/plugins. Ignoring. (org.apache.kafka.connect.runtime.isolation.PluginUtils) [main]
java.io.FileNotFoundException: /opt/kafka/plugins
	at org.apache.kafka.connect.runtime.isolation.PluginUtils.pluginLocations(PluginUtils.java:214)
	at org.apache.kafka.connect.runtime.isolation.Plugins.<init>(Plugins.java:71)
	at org.apache.kafka.connect.runtime.isolation.Plugins.<init>(Plugins.java:64)
	at org.apache.kafka.connect.cli.AbstractConnectCli.startConnect(AbstractConnectCli.java:121)
	at org.apache.kafka.connect.cli.AbstractConnectCli.run(AbstractConnectCli.java:94)
	at org.apache.kafka.connect.cli.ConnectDistributed.main(ConnectDistributed.java:116)

It is just a log message without causing any crash-looping, but it is not great if it can be avoided. With Connect, the general expectation is that users will add connectors and create the plugin directory that way. But in Mirror Maker 2, users normally don't add plugins, so this directory is almost always missing.

This PR pre-creates the directly already in the base image and leaves it empty. That helps us avoid the error even if the base image is used directly such as in MM2.

Checklist

  • Make sure all tests pass
  • Try your changes from Pod inside your Kubernetes and OpenShift cluster, not just locally

@scholzj scholzj added this to the 0.40.0 milestone Jan 27, 2024
@scholzj
Copy link
Member Author

scholzj commented Jan 28, 2024

/azp run regression

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@scholzj scholzj marked this pull request as ready for review January 28, 2024 10:02
@scholzj scholzj merged commit 8067ae4 into strimzi:main Jan 29, 2024
21 checks passed
@scholzj scholzj deleted the pre-create-the-plugins-directory-to-avoid-MM2-errors branch January 29, 2024 09:19
adamj-m pushed a commit to jamesfarlow/strimzi-kafka-operator that referenced this pull request Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants