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

Jepsen mariadb fixes #498

Merged
merged 3 commits into from
Aug 2, 2024
Merged

Jepsen mariadb fixes #498

merged 3 commits into from
Aug 2, 2024

Conversation

vladbogo
Copy link
Collaborator

Template selection

Please go the the Preview tab and select the appropriate sub-template:

@grooverdan
Copy link
Member

As lein is important part of the build it should be built into the container.

The building from source isn't a good idea as we can use a pre-build binary. This is supported in the project already - MariaDB/jepsen-mariadb@7baa716 but requires a manual hack to change from the base debian-12 that is assumed.

sed -i -e 's/debian-12/ubuntu-2004/' src/jepsen/mysql/db/maria.clj

@grooverdan
Copy link
Member

grooverdan commented Jul 18, 2024

Running for apt-get installed packages (I did distro ones however ci base repo of https://ci.mariadb.org/47558/amd64-ubuntu-2004-deb-autobake/mariadb.sources is just as good).

Using packages means:

  • its a sudo installed in the container?
  • not all the build dependences of the base image are needed. Probably in jepsen.Dockerfile installed dependencies of mariadb-server
  • This might restrict tests to a version supported by that distro (so no 10.5 on a 2004 base?)

Code diff:

diff --git a/src/jepsen/mysql/db/maria_docker.clj b/src/jepsen/mysql/db/maria_docker.clj
index 94076c1..cf427bc 100644
--- a/src/jepsen/mysql/db/maria_docker.clj
+++ b/src/jepsen/mysql/db/maria_docker.clj
@@ -118,7 +118,7 @@
       db/DB
       (setup! [this test node]
         (configure! test)
-        (sh (str (install-dir test) "/scripts/mariadb-install-db")
+        (sh (str (install-dir test) "/bin/mariadb-install-db")
             (str "--defaults-file=" (cnf-path test)))
         (db/start! this test node)
         (make-db! test))

run as bb user:

$ ../lein run test --db maria-docker    "--nodes" "localhost" --concurrency 16   "--rate" "1000" "--time-limit" "60"  "--key-count" "40" "--no-ssh" "true" "--innodb-strict-isolation=true"   -w append -i serializable --mariadb-install-dir=/usr --mariadb-data-dir=/tmp/datadir

# Clone the jepsen-mysql repository, download leiningen, and set permissions
RUN git clone https://github.com/vlad-lesin/jepsen-mysql jepsen-mariadb \
# Clone the jepsen-mariadb repository, download leiningen, and set permissions
RUN git clone https://github.com/MariaDB/jepsen-mariadb jepsen-mariadb \
Copy link
Collaborator

Choose a reason for hiding this comment

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

This pins the scripts to the repository version at the time of image build.
Is this the desired behavior?

If not, at least a Pull should happen during a BB-Build or git clone to be moved out of dockerfile.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I understood that's the desired behaviour, but we can add a git pull in a step if it needs to be updated. The files are needed during image creation

master-docker-nonstandard-2/master.cfg Outdated Show resolved Hide resolved
Remove trailing commas
@vladbogo vladbogo merged commit 403348d into MariaDB:dev Aug 2, 2024
27 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants