From 00ac547acacc9fef86f9045a979adf523ab7617b Mon Sep 17 00:00:00 2001 From: Abhishek Kekane Date: Mon, 9 Aug 2021 05:54:32 +0000 Subject: [PATCH] Glance remote worker should use own cache directory Earlier glance remote worker was using same cache directory used by glance worker. Ideally both should use their own cache directory. This patch makes provision for the same by setting different path for image_cache_dir config option. Change-Id: If2627e9c212fd765b96d925046c04e9cb1001c3d --- lib/glance | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/glance b/lib/glance index cd26d97dc4..6848aa3c1b 100644 --- a/lib/glance +++ b/lib/glance @@ -552,6 +552,11 @@ function start_glance_remote_clone { iniset $(glance_remote_conf "$GLANCE_API_CONF") os_glance_tasks_store \ filesystem_store_datadir "${remote_data}/os_glance_tasks_store" + # Point this worker to use different cache dir + mkdir -p "$remote_data/cache" + iniset $(glance_remote_conf "$GLANCE_API_CONF") DEFAULT \ + image_cache_dir "${remote_data}/cache" + # Change our uwsgi to our new port sed -ri "s/^(http-socket.*):[0-9]+/\1:$glance_remote_port/" \ "$glance_remote_uwsgi"