-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Install linux generic libc2.12 mysqlbinlog
binary and libraries
#15854
Conversation
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
mysqlbinlog
package and librariesmysqlbinlog
binary and libraries
@@ -18,13 +18,20 @@ | |||
|
|||
# Use a temporary layer for the build stage. | |||
ARG bootstrap_version=31 | |||
ARG image="vitess/bootstrap:${bootstrap_version}-mysql80" | |||
ARG image="vitess/bootstrap:${bootstrap_version}-common" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was reverted back to common
as we no longer need to copy mysqlbinlog
from the bootstrap image.
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
@@ -51,16 +55,19 @@ RUN groupadd -r vitess && useradd -r -g vitess vitess | |||
RUN mkdir -p /vt/vtdataroot && chown -R vitess:vitess /vt | |||
|
|||
# Set up Vitess environment (just enough to run pre-built Go binaries) | |||
ENV VTROOT /vt/src/vitess.io/vitess |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only use was for the vtdataroot
directory, but we might as well put everything under /vt
instead of having two different directories.
COPY --from=builder --chown=vitess:vitess /vt/src/vitess.io/vitess/mysql-generic-binaries/lib/private/libcrypto.so.3 $VTROOT/lib/private/libcrypto.so.3 | ||
COPY --from=builder --chown=vitess:vitess /vt/src/vitess.io/vitess/mysql-generic-binaries/lib/private/libssl.so.3 $VTROOT/lib/private/libssl.so.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copying the two libraries needed by mysqlbinlog
into /vt/lib/private
, the mysqlbinlog
expects the libraires to be found there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@frouioui This assumes we use always OpenSSL 3, which is not something we could assume yet I think? I don't think we can copy it like this tbh, those libraries themselves also then have dependencies and we suddenly would be responsible here for security issues in those versions and have to manage that? Which is a big pain since they are not versioned with apt-get
at all.
Closing this as we are going to do another PR for this issue. |
Description
After merging #15620 we realized that
mysqlbinlog
was missing from thevitess/lite
image, we decided to add it back to the image with #15775. However, we realized thatmysqlbinlog
is used by themysqld
container in K8S, and the image of this container is defined by the user (official MySQL image, Percona image, custom build, etc...), meaning that the when executingmysqlbinlog
in themysqld
container we had 0 guarantee that all the required libraries were installed. For this reason, we are now installing a generic linux version ofmysql
based on libc2.12 (from 2010) in the base image ofvitess/lite
, this binary and libraries are going to be compatible with most x86_64 environments where Vitess will run.The
mysqlbinlog
binary has two libraries that we need to copy from the downloaded tarball to the final Docker image:libcrypto.so.3
andlibssl.so.3
. The binary expect to find both libraries in the../lib/private/
folder from where the binary is found. For this reason, in the final image, the libraries are copied into/vt/lib/private
andmysqlbinlog
to/vt/bin
. The goal here, is for the vitess-operator to modify thevtRootInitScript
to copymysqlbinlog
and the libraries. @mattlord is already working on this in planetscale/vitess-operator#541.Docker Image tests
Vitess-operator deployment tests
Checklist