SlideShare a Scribd company logo
How MariaDB in Debian uses
Salsa-CI/Gitlab-CI
Ensure smooth upgrades and avoid regressions
In Miniauditório at Tue 23rd July 2019 14:30-15:15
Follow
@ottokekalainen
to
get
link
to
slides!
Making use of new Debian infrastructure
Salsa.Debian.org
● Debian’s own Gitlab instance
● First prototype in 2017,
rolled-out big scale in 2018
● See docs at https://wiki.debian.org/Salsa
● Run by Debian Salsa-Admin team
● MariaDB/MySQL packaging
repositories moved from
git.debian.org to
salsa.debian.org in January
2018
Salsa-CI
● Debian packaging specific
Gitlab-CI pipeline
● First version in summer 2018,
very active development all the
time
● See README at
https://salsa.debian.org/salsa-ci-team/pipeline
● Run by Debian Salsa-CI team (I
am a former member of it)
● Repositories for mariadb-10.1,
mariadb-connector-c, galera-3
adopted it in August 2018
Salsa-CI is
amazing
If you are a
Debian Developer,
start using it now!
Ensures that on every commit/push:
● Sources build and Debian
packages are generated
● blhc: Build logs don’t have
errors
● reprotest: Builds are
reproducible (no randomness)
● autopkgtests: binaries can run
● lintian: static code analysis
● piuparts: packages install,
uninstall and upgrade
● Stop wasting your time on stupid mistakes and
unnecessary prepare-upload-wait-check cycles.
● Stop wasting Debian archive resources with
excess uploads.
● Give confidence to your contributors who can
run CI on their merge requests.
● Give yourself a peace of mind, reduce stress and
free up time to contribute more to Debian!
● Go from 10x engineer to 20x engineer!
Example: debian/gitlab-ci.yml contents in galera-3
Branch: master
include:
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml
Branch: buster
include:
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml
variables:
RELEASE: 'buster'
Example: check Gitlab-CI config path and runner settings
Example: salsa.debian.org/mariadb-team/galera-3/pipelines
Gitlab-CI offers real-time logs, graphs,
artifacts download… Everything you need!
Example: Commit history and Merge Request statuses
Example: Notification email
Salsa-CI is very easy for a simple package
See also Augustin Henze’s talk:
debconf19.debconf.org/talks/148-salsa-ci-debian-pipeline-for-developers/
..but MariaDB far from simple
13 million lines of code...
One source package generates 25 binary packages...
libmariadb-dev
libmariadbclient-dev
libmariadb-dev-compat
libmariadb3
libmariadbd19
libmariadbd-dev
mariadb-common
mariadb-client-core-10.3
mariadb-client-10.3
mariadb-server-core-10.3
mariadb-server-10.3
mariadb-server
mariadb-client
mariadb-backup
mariadb-plugin-connect
mariadb-plugin-rocksdb
mariadb-plugin-oqgraph
mariadb-plugin-tokudb
mariadb-plugin-mroonga
mariadb-plugin-spider
mariadb-plugin-gssapi-server
mariadb-plugin-gssapi-client
mariadb-plugin-cracklib-password-check
mariadb-test
mariadb-test-data
https://packages.debian.org/search?lang=en&suite=all&searc
hon=names&keywords=mariadb-server
https://packages.ubuntu.com/search?lang=en&suite=all&sear
chon=names&keywords=mariadb-server
Multiple upstream versions in maintenance in parallel in
two distros each with multiple releases...
The configuration and data needs to persist and work over each upgrade...
Default configuration
/etc/mysql/
/etc/mysql/conf.d
/etc/mysql/conf.d/mysql.cnf
/etc/mysql/conf.d/mysqldump.cnf
/etc/mysql/mariadb.conf.d
/etc/mysql/mariadb.conf.d/50-client.cnf
/etc/mysql/mariadb.conf.d/50-mysql-clients.cnf
/etc/mysql/mariadb.conf.d/50-mysqld_safe.cnf
/etc/mysql/mariadb.conf.d/50-server.cnf
/etc/mysql/my.cnf.fallback
/etc/mysql/my.cnf
/etc/mysql/mariadb.cnf
/etc/mysql/debian-start
/etc/mysql/debian.cnf
Default data
/var/lib/mysql/debian-10.1.flag
/var/lib/mysql/mysql
/var/lib/mysql/mysql/db.frm
/var/lib/mysql/mysql/db.MYI
/var/lib/mysql/mysql/db.MYD
/var/lib/mysql/mysql/host.frm
/var/lib/mysql/mysql/host.MYI
/var/lib/mysql/mysql/host.MYD
/var/lib/mysql/mysql/user.MYI
/var/lib/mysql/mysql/user.MYD
…
/var/lib/mysql/mysql/user.frm
/var/lib/mysql/aria_log_control
/var/lib/mysql/aria_log.00000001
/var/lib/mysql/ibdata1
/var/lib/mysql/ib_logfile1
/var/lib/mysql/ib_logfile0
/var/lib/mysql/performance_schema
/var/lib/mysql/performance_schema/db.opt
Lot’s of direct users: 30 % of Debian popcon submitters
Hundreds of indirect users and dependencies that need to continue working...
Packages that depend on MariaDB server or client directly
apt-cache rdepends 'default-mysql-s*' 'mariadb-s*' | wc -l
96
apt-cache rdepends 'default-mysql-c*' 'mariadb-c*' | wc -l
73
Packages that depend on MariaDB client libraries
apt-cache rdepends 'default-libmysql*' 'libmariadb*' | wc -l
194
MariaDB packaging custom Gitlab-CI pipeline
18 jobs in 5 stages
Stage 1: build
Build in target
release plus one older
(ensuring backporting
is still possible).
Stage 2: test quality of built packages
Quickly detect if the
software malfunctions
in an obvious way.
Stage 3: upgrade from current version in same release
E.g. what will happen to
users when the built
version is uploaded to
unstable (or stable if
maintenance branch).
Stage 4: upgrade from the version in (old) stable releases
E.g. what will happen
when users run
dist-upgrade from the
previous stable or
oldstable to the
version being built
now.
Stage 5: additional tests
E.g. what will happen if
users upgrade from MySQL
5.7 (which would not
normally happen in a
Debian dist-upgrade).
Also lesser priority
tests that are allowed to
fail.
libmysql* to libmariadb* upgrade
# Install all libmysql* available in Debian unstable
- apt-get install -y pkg-config libmysqld-dev libmysqlclient-dev
- pkg-config --list-all
- pkg-config --cflags mysqlclient # mysqlclient.pc from original package
- apt-get install -y ./libmariadb3_*.deb ./mariadb-common_*.deb
- pkg-config --list-all
- apt-get install -y ./libmariadb-dev_*.deb
- pkg-config --list-all
...
- apt-get install -y default-libmysqlclient-dev default-libmysqld-dev
- ldconfig -p # | grep -e mariadb -e mysql
- pkg-config --list-all
- pkg-config --cflags --libs mysqlclient
- pkg-config --cflags --libs libmariadb
- pkg-config --cflags --libs mariadb
build mariadbclient consumer Python-MySQLdb
- apt-get install -y pkg-config ./libmariadb-dev*.deb ./libmariadb3_*.deb
./mariadb-common*.deb
- pkg-config --cflags --libs mysqlclient # See what MySQLdb builds with
- apt-get install -y python3-pip
- pip3 install mysqlclient # Compiles module against libmysqlclient
- apt-get purge -y libmariadb-dev # Not needed for run-time
- python3 -c "import MySQLdb; print(MySQLdb.get_client_info())"
Ensures we have a chance to notice if other software that used (legacy)
libmysqlclient and are now automatically using libmariadb3 still works.
Priceless: This caught upstream bugs what otherwise would have gone
unnoticed for a long time since the “damage” is so subtle and invisible.
Explore it yourself!
Gitlab, Salsa-CI and MariaDB evolves constantly
salsa.debian.org/mariadb-team/mariadb-10.3
Challenges and peculiarities
● Custom gitlab-ci.yml has been
developed now for a little over
a year and grown to 550+ lines.
● Tries to cover all relevant
install/upgrade scenarios.
● Docker images don’t have
systemd running by default,
must activate with
○ sed -i "s/101/0/g" -i
/usr/sbin/policy-rc.d
● Build time max 2h
○ Slowness was tackled with
ccache (and also upstreamed
to Salsa-CI
● Build log max 4 MB
○ build command runs with
■ | tail -n 10000
○ before build starts a a
progress indicator is spawned
■ while true; do sleep 600;
echo "10 minutes passed"
>&2; done &
Next additions?
● Fix Jessie to latest upgrade
test that regressied in early
May 2019 with:
○ systemd-udevdstart-stop-daemon:
unrecognized option
'--notify-await'
○ Bug in Jessie or Jessie Docker
image, not MariaDB
● Making RocksDB and TokuDB
plugins build reproducibly
○ Can you help?
● Extend testing of MariaDB
plugins and high-level features
not covered by upstream MariaDB
test suite
● Manipulate config files and
database contents before
starting upgrade to test how
the maintainer scripts can
recover from customized
situations and heterogeneous
environments
● Custom runner guarantee it is
fast?
Thank you!
@ottokekalainen
Reminder of next session:
Salsa and Salsa-CI BoF
Room: Miniauditório
Time: Jul 26 (Fri), 14:30

More Related Content

PDF
DebConf 2019 MariaDB packaging in Debian BoF
PDF
FOSDEM2021: MariaDB post-release quality assurance in Debian and Ubuntu
PDF
MariaDB quality assurance in Debian and Ubuntu
PDF
DebConf16 BoF on MariaDB/MySQL packaging
PDF
Less passwords, more security: unix socket authentication and other MariaDB h...
PPTX
How to deploy a MariaDB Galera cluster on Ubuntu 14.04
PPTX
MariaDB Enterprise & MariaDB Enterprise Cluster - MariaDB Webinar July 2014
PDF
Passwordless login with unix auth_socket
DebConf 2019 MariaDB packaging in Debian BoF
FOSDEM2021: MariaDB post-release quality assurance in Debian and Ubuntu
MariaDB quality assurance in Debian and Ubuntu
DebConf16 BoF on MariaDB/MySQL packaging
Less passwords, more security: unix socket authentication and other MariaDB h...
How to deploy a MariaDB Galera cluster on Ubuntu 14.04
MariaDB Enterprise & MariaDB Enterprise Cluster - MariaDB Webinar July 2014
Passwordless login with unix auth_socket

What's hot (17)

PDF
PXC 5.5 to MariaDB 10.4 Galera Cluster Migration Workshop
PDF
High Availability with Galera Cluster - SkySQL Road Show 2013 in Berlin
PDF
SUSE Manager with Salt - Deploy and Config Management for MariaDB
PPT
Mysql
PDF
MariaDB Galera Cluster - Simple, Transparent, Highly Available
PDF
9 DevOps Tips for Going in Production with Galera Cluster for MySQL - Slides
PDF
Pf sense 2.0
PDF
Webinar slides: 9 DevOps Tips for Going in Production with Galera Cluster for...
ODP
Ceph Day NYC: The Future of CephFS
PDF
Getting modern with my sql
PDF
MySQL Sandbox 3
PDF
Galera cluster for MySQL - Introduction Slides
PDF
Webinar slides: Introducing Galera 3.0 - Now supporting MySQL 5.6
PDF
Webseminar: MariaDB Enterprise und MariaDB Enterprise Cluster
PDF
Galera 3.0 Webinar Slides: Galera Monitoring & Management
ODP
pfSense presentation
PDF
Cassandra - Say Goodbye to the Relational Database (5-6-2010)
PXC 5.5 to MariaDB 10.4 Galera Cluster Migration Workshop
High Availability with Galera Cluster - SkySQL Road Show 2013 in Berlin
SUSE Manager with Salt - Deploy and Config Management for MariaDB
Mysql
MariaDB Galera Cluster - Simple, Transparent, Highly Available
9 DevOps Tips for Going in Production with Galera Cluster for MySQL - Slides
Pf sense 2.0
Webinar slides: 9 DevOps Tips for Going in Production with Galera Cluster for...
Ceph Day NYC: The Future of CephFS
Getting modern with my sql
MySQL Sandbox 3
Galera cluster for MySQL - Introduction Slides
Webinar slides: Introducing Galera 3.0 - Now supporting MySQL 5.6
Webseminar: MariaDB Enterprise und MariaDB Enterprise Cluster
Galera 3.0 Webinar Slides: Galera Monitoring & Management
pfSense presentation
Cassandra - Say Goodbye to the Relational Database (5-6-2010)
Ad

Similar to How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regressions (20)

PDF
Developing MIPS Exploits to Hack Routers
PDF
How to Install and Configure MariaDB on Debian 12.pdf
PDF
MariaDB in Debian and Ubuntu: The next million users
PDF
OpenStack Tokyo Meeup - Gluster Storage Day
PDF
How to Install MariaDB on Ubuntu 2404.pdf
PPTX
How To Install GitLab As Your Private GitHub Clone
PDF
MySQL for Beginners - part 1
PDF
DebConf 2020: What’s New in MariaDB Server 10.5 and Galera 4?
PDF
Debian quality assurance systems – What can MariaDB developers learn from them?
PDF
Git lab installation guide
PDF
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
DOCX
Upgrading mysql version 5.5.30 to 5.6.10
PDF
Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)
PPT
Architecting cloud
PDF
Developing MIPS Exploits to Hack Routers
PDF
9 steps to install and configure postgre sql from source on linux
KEY
Ruby and Rails Packaging to Production
PDF
Bundling Packages and Deploying Applications with RPM
PDF
LCA 2012: High Availability Sprint
PDF
MariaDB 10.2 & MariaDB 10.1 by Michael Monty Widenius at Database Camp 2016 @ UN
Developing MIPS Exploits to Hack Routers
How to Install and Configure MariaDB on Debian 12.pdf
MariaDB in Debian and Ubuntu: The next million users
OpenStack Tokyo Meeup - Gluster Storage Day
How to Install MariaDB on Ubuntu 2404.pdf
How To Install GitLab As Your Private GitHub Clone
MySQL for Beginners - part 1
DebConf 2020: What’s New in MariaDB Server 10.5 and Galera 4?
Debian quality assurance systems – What can MariaDB developers learn from them?
Git lab installation guide
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
Upgrading mysql version 5.5.30 to 5.6.10
Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)
Architecting cloud
Developing MIPS Exploits to Hack Routers
9 steps to install and configure postgre sql from source on linux
Ruby and Rails Packaging to Production
Bundling Packages and Deploying Applications with RPM
LCA 2012: High Availability Sprint
MariaDB 10.2 & MariaDB 10.1 by Michael Monty Widenius at Database Camp 2016 @ UN
Ad

More from Otto Kekäläinen (20)

PDF
Search in WordPress - how it works and howto customize it
PDF
Technical SEO for WordPress - 2019 edition
PDF
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
PDF
The 5 most common reasons for a slow WordPress site and how to fix them
PDF
How to investigate and recover from a security breach in WordPress
PDF
Technical SEO for WordPress
PDF
Automatic testing and quality assurance for WordPress plugins and themes
PDF
10 things every developer should know about their database to run word press ...
PDF
Automatic testing and quality assurance for WordPress plugins
PDF
Improving WordPress performance (xdebug and profiling)
PDF
WordPress-tietoturvan perusteet
PDF
Technical SEO for WordPress - 2017 edition
PDF
Improving WordPress Performance with Xdebug and PHP Profiling
PDF
MariaDB adoption in Linux distributions and development environments
PDF
WordPress security 101 - WP Jyväskylä Meetup 21.3.2017
PDF
WordPress security 101 - WP Turku Meetup 2.2.2017
PDF
Find WordPress performance bottlenecks with XDebug PHP profiling
PDF
Testing and updating WordPress - Advanced techniques for avoiding regressions
PDF
Git best practices 2016
PDF
MariaDB Developers Meetup 2016 welcome words
Search in WordPress - how it works and howto customize it
Technical SEO for WordPress - 2019 edition
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them
How to investigate and recover from a security breach in WordPress
Technical SEO for WordPress
Automatic testing and quality assurance for WordPress plugins and themes
10 things every developer should know about their database to run word press ...
Automatic testing and quality assurance for WordPress plugins
Improving WordPress performance (xdebug and profiling)
WordPress-tietoturvan perusteet
Technical SEO for WordPress - 2017 edition
Improving WordPress Performance with Xdebug and PHP Profiling
MariaDB adoption in Linux distributions and development environments
WordPress security 101 - WP Jyväskylä Meetup 21.3.2017
WordPress security 101 - WP Turku Meetup 2.2.2017
Find WordPress performance bottlenecks with XDebug PHP profiling
Testing and updating WordPress - Advanced techniques for avoiding regressions
Git best practices 2016
MariaDB Developers Meetup 2016 welcome words

Recently uploaded (20)

PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
medical staffing services at VALiNTRY
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Softaken Excel to vCard Converter Software.pdf
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Digital Strategies for Manufacturing Companies
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Nekopoi APK 2025 free lastest update
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PPTX
L1 - Introduction to python Backend.pptx
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Odoo Companies in India – Driving Business Transformation.pdf
How to Choose the Right IT Partner for Your Business in Malaysia
Adobe Illustrator 28.6 Crack My Vision of Vector Design
medical staffing services at VALiNTRY
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Softaken Excel to vCard Converter Software.pdf
Odoo POS Development Services by CandidRoot Solutions
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Operating system designcfffgfgggggggvggggggggg
Which alternative to Crystal Reports is best for small or large businesses.pdf
Digital Strategies for Manufacturing Companies
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
VVF-Customer-Presentation2025-Ver1.9.pptx
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Nekopoi APK 2025 free lastest update
CHAPTER 2 - PM Management and IT Context
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Design an Analysis of Algorithms I-SECS-1021-03
L1 - Introduction to python Backend.pptx
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Odoo Companies in India – Driving Business Transformation.pdf

How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regressions

  • 1. How MariaDB in Debian uses Salsa-CI/Gitlab-CI Ensure smooth upgrades and avoid regressions In Miniauditório at Tue 23rd July 2019 14:30-15:15 Follow @ottokekalainen to get link to slides!
  • 2. Making use of new Debian infrastructure Salsa.Debian.org ● Debian’s own Gitlab instance ● First prototype in 2017, rolled-out big scale in 2018 ● See docs at https://wiki.debian.org/Salsa ● Run by Debian Salsa-Admin team ● MariaDB/MySQL packaging repositories moved from git.debian.org to salsa.debian.org in January 2018 Salsa-CI ● Debian packaging specific Gitlab-CI pipeline ● First version in summer 2018, very active development all the time ● See README at https://salsa.debian.org/salsa-ci-team/pipeline ● Run by Debian Salsa-CI team (I am a former member of it) ● Repositories for mariadb-10.1, mariadb-connector-c, galera-3 adopted it in August 2018
  • 3. Salsa-CI is amazing If you are a Debian Developer, start using it now! Ensures that on every commit/push: ● Sources build and Debian packages are generated ● blhc: Build logs don’t have errors ● reprotest: Builds are reproducible (no randomness) ● autopkgtests: binaries can run ● lintian: static code analysis ● piuparts: packages install, uninstall and upgrade
  • 4. ● Stop wasting your time on stupid mistakes and unnecessary prepare-upload-wait-check cycles. ● Stop wasting Debian archive resources with excess uploads. ● Give confidence to your contributors who can run CI on their merge requests. ● Give yourself a peace of mind, reduce stress and free up time to contribute more to Debian! ● Go from 10x engineer to 20x engineer!
  • 5. Example: debian/gitlab-ci.yml contents in galera-3 Branch: master include: - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml Branch: buster include: - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml variables: RELEASE: 'buster'
  • 6. Example: check Gitlab-CI config path and runner settings
  • 7. Example: salsa.debian.org/mariadb-team/galera-3/pipelines Gitlab-CI offers real-time logs, graphs, artifacts download… Everything you need!
  • 8. Example: Commit history and Merge Request statuses
  • 10. Salsa-CI is very easy for a simple package See also Augustin Henze’s talk: debconf19.debconf.org/talks/148-salsa-ci-debian-pipeline-for-developers/
  • 11. ..but MariaDB far from simple
  • 12. 13 million lines of code...
  • 13. One source package generates 25 binary packages... libmariadb-dev libmariadbclient-dev libmariadb-dev-compat libmariadb3 libmariadbd19 libmariadbd-dev mariadb-common mariadb-client-core-10.3 mariadb-client-10.3 mariadb-server-core-10.3 mariadb-server-10.3 mariadb-server mariadb-client mariadb-backup mariadb-plugin-connect mariadb-plugin-rocksdb mariadb-plugin-oqgraph mariadb-plugin-tokudb mariadb-plugin-mroonga mariadb-plugin-spider mariadb-plugin-gssapi-server mariadb-plugin-gssapi-client mariadb-plugin-cracklib-password-check mariadb-test mariadb-test-data
  • 15. The configuration and data needs to persist and work over each upgrade... Default configuration /etc/mysql/ /etc/mysql/conf.d /etc/mysql/conf.d/mysql.cnf /etc/mysql/conf.d/mysqldump.cnf /etc/mysql/mariadb.conf.d /etc/mysql/mariadb.conf.d/50-client.cnf /etc/mysql/mariadb.conf.d/50-mysql-clients.cnf /etc/mysql/mariadb.conf.d/50-mysqld_safe.cnf /etc/mysql/mariadb.conf.d/50-server.cnf /etc/mysql/my.cnf.fallback /etc/mysql/my.cnf /etc/mysql/mariadb.cnf /etc/mysql/debian-start /etc/mysql/debian.cnf Default data /var/lib/mysql/debian-10.1.flag /var/lib/mysql/mysql /var/lib/mysql/mysql/db.frm /var/lib/mysql/mysql/db.MYI /var/lib/mysql/mysql/db.MYD /var/lib/mysql/mysql/host.frm /var/lib/mysql/mysql/host.MYI /var/lib/mysql/mysql/host.MYD /var/lib/mysql/mysql/user.MYI /var/lib/mysql/mysql/user.MYD … /var/lib/mysql/mysql/user.frm /var/lib/mysql/aria_log_control /var/lib/mysql/aria_log.00000001 /var/lib/mysql/ibdata1 /var/lib/mysql/ib_logfile1 /var/lib/mysql/ib_logfile0 /var/lib/mysql/performance_schema /var/lib/mysql/performance_schema/db.opt
  • 16. Lot’s of direct users: 30 % of Debian popcon submitters
  • 17. Hundreds of indirect users and dependencies that need to continue working... Packages that depend on MariaDB server or client directly apt-cache rdepends 'default-mysql-s*' 'mariadb-s*' | wc -l 96 apt-cache rdepends 'default-mysql-c*' 'mariadb-c*' | wc -l 73 Packages that depend on MariaDB client libraries apt-cache rdepends 'default-libmysql*' 'libmariadb*' | wc -l 194
  • 18. MariaDB packaging custom Gitlab-CI pipeline
  • 19. 18 jobs in 5 stages
  • 20. Stage 1: build Build in target release plus one older (ensuring backporting is still possible).
  • 21. Stage 2: test quality of built packages Quickly detect if the software malfunctions in an obvious way.
  • 22. Stage 3: upgrade from current version in same release E.g. what will happen to users when the built version is uploaded to unstable (or stable if maintenance branch).
  • 23. Stage 4: upgrade from the version in (old) stable releases E.g. what will happen when users run dist-upgrade from the previous stable or oldstable to the version being built now.
  • 24. Stage 5: additional tests E.g. what will happen if users upgrade from MySQL 5.7 (which would not normally happen in a Debian dist-upgrade). Also lesser priority tests that are allowed to fail.
  • 25. libmysql* to libmariadb* upgrade # Install all libmysql* available in Debian unstable - apt-get install -y pkg-config libmysqld-dev libmysqlclient-dev - pkg-config --list-all - pkg-config --cflags mysqlclient # mysqlclient.pc from original package - apt-get install -y ./libmariadb3_*.deb ./mariadb-common_*.deb - pkg-config --list-all - apt-get install -y ./libmariadb-dev_*.deb - pkg-config --list-all ... - apt-get install -y default-libmysqlclient-dev default-libmysqld-dev - ldconfig -p # | grep -e mariadb -e mysql - pkg-config --list-all - pkg-config --cflags --libs mysqlclient - pkg-config --cflags --libs libmariadb - pkg-config --cflags --libs mariadb
  • 26. build mariadbclient consumer Python-MySQLdb - apt-get install -y pkg-config ./libmariadb-dev*.deb ./libmariadb3_*.deb ./mariadb-common*.deb - pkg-config --cflags --libs mysqlclient # See what MySQLdb builds with - apt-get install -y python3-pip - pip3 install mysqlclient # Compiles module against libmysqlclient - apt-get purge -y libmariadb-dev # Not needed for run-time - python3 -c "import MySQLdb; print(MySQLdb.get_client_info())" Ensures we have a chance to notice if other software that used (legacy) libmysqlclient and are now automatically using libmariadb3 still works. Priceless: This caught upstream bugs what otherwise would have gone unnoticed for a long time since the “damage” is so subtle and invisible.
  • 27. Explore it yourself! Gitlab, Salsa-CI and MariaDB evolves constantly salsa.debian.org/mariadb-team/mariadb-10.3
  • 28. Challenges and peculiarities ● Custom gitlab-ci.yml has been developed now for a little over a year and grown to 550+ lines. ● Tries to cover all relevant install/upgrade scenarios. ● Docker images don’t have systemd running by default, must activate with ○ sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d ● Build time max 2h ○ Slowness was tackled with ccache (and also upstreamed to Salsa-CI ● Build log max 4 MB ○ build command runs with ■ | tail -n 10000 ○ before build starts a a progress indicator is spawned ■ while true; do sleep 600; echo "10 minutes passed" >&2; done &
  • 29. Next additions? ● Fix Jessie to latest upgrade test that regressied in early May 2019 with: ○ systemd-udevdstart-stop-daemon: unrecognized option '--notify-await' ○ Bug in Jessie or Jessie Docker image, not MariaDB ● Making RocksDB and TokuDB plugins build reproducibly ○ Can you help? ● Extend testing of MariaDB plugins and high-level features not covered by upstream MariaDB test suite ● Manipulate config files and database contents before starting upgrade to test how the maintainer scripts can recover from customized situations and heterogeneous environments ● Custom runner guarantee it is fast?
  • 30. Thank you! @ottokekalainen Reminder of next session: Salsa and Salsa-CI BoF Room: Miniauditório Time: Jul 26 (Fri), 14:30