From 321e8850ed28529f424ffb0f2ef72130075ebc4c Mon Sep 17 00:00:00 2001 From: Colleen Murphy Date: Tue, 6 Feb 2024 10:49:41 -0800 Subject: [PATCH] Add persistent volume for mysql The ctfe_init container uses a persistent volume to store the tree head ID among other things from previous runs. However, the mysql container is not guaranteed to reuse the same data directory when it is destroyed and recreated, so it may come up empty. When this happens, but the CT log is configured for an existing tree, then signing objects will fail with a Not Found error. This change adds a persistent volume to the docker-compose file for mysql so that the database can live on and be consistent with the CT log's configuration. --- docker-compose.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 124a9ec5b..cee2a6410 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -109,6 +109,8 @@ services: timeout: 3s retries: 3 start_period: 10s + volumes: + - mysql:/var/lib/mysql trillian-log-server: image: gcr.io/trillian-opensource-ci/log_server command: [ @@ -141,3 +143,4 @@ services: - mysql volumes: ctfeConfig: {} + mysql: {}