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

fix integration tests #11638

Merged
merged 3 commits into from
Aug 30, 2021
Merged

fix integration tests #11638

merged 3 commits into from
Aug 30, 2021

Conversation

clintropolis
Copy link
Member

Looks like openjdk:8-slim image updated from debian buster to bullseye, which seems not cool and all the integration tests are failing with an error of the form:

Step 15/43 : RUN find /var/lib/mysql -type f -exec touch {} \; && /etc/init.d/mysql start       && echo "CREATE USER 'druid'@'%' IDENTIFIED BY 'diurd'; GRANT ALL ON druid.* TO 'druid'@'%'; CREATE database druid DEFAULT CHARACTER SET utf8mb4;" | mysql -u root       && /etc/init.d/mysql stop
 ---> Running in 98c01deea008
/bin/sh: 1: /etc/init.d/mysql: not found

For now, specifying buster as it is known to work, though at some point we should probably try to figure out how to upgrade to the newer image.

@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ARG JDK_VERSION=8-slim
ARG JDK_VERSION=8-slim-buster
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@clintropolis, I see an occurrence of the same image in this distribution Dockerfile. Should this need to be updated as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, the docker image seems to work ok for me without any changes, however the k8s integration tests are still failing, so it might be related somehow, I'm not certain if maven:3-jdk-11-slim is actually related to the openjdk slim images (the maven dockerfile looks like it downloads openjdk itself)

Removing intermediate container 249c6ec65c11
 ---> 4cab348af9bf
Step 8/21 : RUN VERSION=$(mvn -B -q org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate       -Dexpression=project.version -DforceStdout=true     )  && tar -zxf ./distribution/target/apache-druid-${VERSION}-bin.tar.gz -C /opt  && mv /opt/apache-druid-${VERSION} /opt/druid
 ---> Running in ef1f63133a73
ls: cannot access '/usr/bin/mvn': Operation not permitted
Error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher
Caused by: java.lang.ClassNotFoundException: org.codehaus.plexus.classworlds.launcher.Launcher
The command '/bin/sh -c VERSION=$(mvn -B -q org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate       -Dexpression=project.version -DforceStdout=true     )  && tar -zxf ./distribution/target/apache-druid-${VERSION}-bin.tar.gz -C /opt  && mv /opt/apache-druid-${VERSION} /opt/druid' returned a non-zero code: 1
[ERROR] Command execution failed.

I'm also having a bit of trouble running the integration test locally to troubleshoot the issue, the scripts seem to expect Linux.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, i was looking at the wrong dockerfile, it is using the openjdk base image https://github.com/carlossg/docker-maven/blob/0a7b1ef030687a5d95ce3e7567a4c279ab87dc81/openjdk-11-slim/Dockerfile#L1

That said, there doesn't seem to be any buster version of this image, related carlossg/docker-maven#221 I think.

At some point we need to like work out whatever the problem is so we can use the newer image.

Copy link
Contributor

@maytasm maytasm Aug 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw a comment on the linked issue that you can pin to maven:3.8.1-jdk-11-slim to solve this issue

@clintropolis
Copy link
Member Author

@clintropolis, I see an occurrence of the same image in this distribution Dockerfile. Should this need to be updated as well?

I'm not sure that one matters since it doesn't run a MySQL server internally, but I will test it out to double check.

@clintropolis clintropolis added this to the 0.22.0 milestone Aug 30, 2021
@clintropolis clintropolis merged commit a096888 into master Aug 30, 2021
@clintropolis clintropolis deleted the fix-integration-tests branch August 30, 2021 20:53
JulianJaffePinterest pushed a commit to JulianJaffePinterest/druid that referenced this pull request Oct 27, 2021
* Update Dockerfile

* Update docker_build_containers.sh

* Update Dockerfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants