-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Install linux generic libc2.12 mysqlbinlog binary and libraries
#15854
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
Conversation
Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
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
| # 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 <[email protected]>
| 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
mysqlbinlogwas missing from thevitess/liteimage, we decided to add it back to the image with #15775. However, we realized thatmysqlbinlogis used by themysqldcontainer 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 executingmysqlbinlogin themysqldcontainer we had 0 guarantee that all the required libraries were installed. For this reason, we are now installing a generic linux version ofmysqlbased 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
mysqlbinlogbinary has two libraries that we need to copy from the downloaded tarball to the final Docker image:libcrypto.so.3andlibssl.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/privateandmysqlbinlogto/vt/bin. The goal here, is for the vitess-operator to modify thevtRootInitScriptto copymysqlbinlogand the libraries. @mattlord is already working on this in planetscale/vitess-operator#541.Docker Image tests
Vitess-operator deployment tests
Checklist