aboutsummaryrefslogtreecommitdiff
path: root/docker/proxysql
AgeCommit message (Collapse)AuthorFilesLines
2026-07-06Migrate to pyproject.tomlMichal Nasiadka3-226/+0
[tool.setuptools.data-files] does not support recursive directory installation. The old setup.cfg [files] worked because PBR's FilesConfig.expand_globs() used os.walk() to expand docker/*, but this hook is not triggered by the pbr.build PEP-517 backend. Move docker/ into kolla/ and use [tool.setuptools.package-data] instead. Update kolla_worker._get_images_dir() to check the kolla package directory first so both editable and regular installs work. Change-Id: I4fc452c03740ef22ebbb4e8d0d86c4f4783e2d09 Signed-off-by: Michal Nasiadka <mnasiadka@gmail.com>
2026-06-24kolla-build: fix build-date LABEL invalidating Docker layer cacheMichal Nasiadka1-1/+1
The build-date label was rendered into a LABEL instruction on line 3 of every Dockerfile template, immediately after FROM. Because Docker invalidates the cache for a changed instruction and all subsequent layers, a date change caused a full rebuild of every image on each new calendar day, even when nothing else had changed. Fix this by removing build-date from the Dockerfile templates and applying it as a --label argument at build time via image.labels. Labels passed on the build command line are not part of the Dockerfile cache key, so the date is still recorded in the image metadata without affecting layer caching. Change-Id: I8ef0d85bab1a999a4d09f7cbf0c088ca00fdcf77 Signed-off-by: Michal Nasiadka <mnasiadka@gmail.com>
2025-06-04Fix ProxySQL rule sanity check to support username-based routingMichal Arbet1-4/+14
Kolla Ansible now generates ProxySQL query rules not only based on the schema name (schemaname), but also on the username. This is needed to properly route queries that are executed before a database schema is selected, such as `SET AUTOCOMMIT` or `ROLLBACK`. To support this, the ProxySQL config sanity check must correctly deduplicate rules based on both `schemaname` and `username`, and avoid false positives when both types are used simultaneously. This change adjusts the logic in `kolla_proxysql_config_sync` to: - recognize rules by key `schema:<schemaname>` or `user:<username>` - assign unique rule IDs only to truly distinct rules - log and skip exact duplicates with appropriate context This fix is required to support the Kolla Ansible patch below. Needed-By: https://review.opendev.org/c/openstack/kolla-ansible/+/951599 Change-Id: I99acd1984ee555a5b6c731e6ee460a33677060d0
2024-11-15Add mechanism for patching files in containersMichal Arbet1-0/+2
This patch adds a way to patch files in a Docker image built by Kolla. This is very useful for several reasons, specifically: - Custom modifications - The stable branch of some library has a fix but no pip package has been released - Eliminates the need to package your own pip packages - Eliminates the need to invent your own versioning to prevent upstream versioning - Eliminates the need to manage a pip server - In other words, it eliminates the need to get a wheel into the image and install it manually using any method not previously mentioned It is also highly desirable because, although Kolla can replace the source for a service with a custom URL for a tarball or its own Git repo, it cannot do this for dependencies pulled from pip. I would also like to point out that this is a feature with its own code path and works only if the user "inserts" a patch into the folder patches/docker-image/something.patch and creates an analogous series file for patch source code. Simply said, this code will never interfere with the upstream build process since this feature is not intended for use in upstream. It is rather meant for downstream users who know what they are doing. Now they just have an option to patch their images. Everything works on all layers of the Docker image and stores a report of applied patches which can then be seen in /etc. This mechanism is similar as debian patch quilt. Change-Id: I61d0790c5d4d070b7ea9e8c99c0a76ff5d22bf9d
2024-09-12Removal of deletion of the proxysql databaseMichal Arbet1-13/+0
It seems that at the time of implementing proxysql, it did not have the --reload parameter, or I overlooked it back then. In any case, it is available now, and this patch just removes the deletion of the proxysql database and keeps it there. The deletion was in the extended start precisely because proxysql ignored changes in the configuration file, so the internal database was always rebuilt during a restart. However, this now works with the --reload parameter. Change-Id: I47848bb1e9847821c9b5fa25f0d817ef00358dd6
2024-04-15CI: Add codespell for spell checkingMichal Nasiadka1-1/+1
Fix existing spell checking Change-Id: Ief7b8f2d427b2557c84fda9b3774ed85ceb105f4
2022-07-28Run proxysql with proxysql userMichal Arbet3-14/+11
This patch is switching root user to proxysql user and provides some necessary changes to work. Change-Id: Id603cc1e9c084eac8afc4c6d2ddde9a1f4fe6728
2022-04-11Adjust permissions on _extend_start files.Tim Shearer1-1/+1
Explicitly set the permissions on the kolla-toolbox kolla_extend_start file. Also, since all extend_start files are sourced rather than executed, the executable bits are now cleared throughout the project. Change-Id: I5c2deb4a2e33575d57c852089f856a9acc6818d0
2022-04-11drop infra_image_prefixMarcin Juszkiewicz1-1/+1
We have one install_type only now so that infra stuff is not needed anymore. Change-Id: I60d50ba7699d46d001eaef365fb84b0ce8e9b262
2021-09-16Add proxysql imageMichal Arbet4-0/+230
Replacement for MySQL balancing solution provided by haproxy. Needed-By: https://review.opendev.org/c/openstack/kolla-ansible/+/770215 Change-Id: I85ebe3b20294cd9dc847a3582053d3e21f6a2216