From 66a11232684bcacdcb55d92ba437022b2a22117a Mon Sep 17 00:00:00 2001 From: Dave Page Date: Mon, 1 Aug 2022 16:17:49 +0100 Subject: [PATCH] Clarify config settings that may need to be re-defined if SERVER_MODE or DATA_DIR are updated in an included config file. --- docs/en_US/config_py.rst | 7 ++++--- web/config.py | 9 +++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/en_US/config_py.rst b/docs/en_US/config_py.rst index 4902feb76..7f4a779fe 100644 --- a/docs/en_US/config_py.rst +++ b/docs/en_US/config_py.rst @@ -45,9 +45,10 @@ The configuration files are as follows: macOS,/Library/Preferences/pgadmin/config_system.py Windows,%CommonProgramFiles%\\pgadmin\\config_system.py -.. note:: If the SERVER_MODE setting is changed in ``config_distro.py``, - ``config_local.py``, or ``config_system.py`` you will most likely need to - re-set the LOG_FILE, SQLITE_PATH, SESSION_DB_PATH and STORAGE_DIR values +.. note:: If the SERVER_MODE or DATA_DIR settings are changed in + ``config_distro.py``, ``config_local.py``, or ``config_system.py`` you + will most likely need to re-set the LOG_FILE, SQLITE_PATH, SESSION_DB_PATH, + STORAGE_DIR, KERBEROS_CCACHE_DIR, and AZURE_CREDENTIAL_CACHE_DIR values as well as they will have been set based on the default configuration or overridden by the runtime. diff --git a/web/config.py b/web/config.py index 378567148..4cc1fd5d6 100644 --- a/web/config.py +++ b/web/config.py @@ -107,10 +107,11 @@ NODE_BLACKLIST = [] # We only set SERVER_MODE if it's not already set. That's to allow the # runtime to force it to False. # -# NOTE: If you change the value of SERVER_MODE in an included config file, -# you may also need to redefine any values below that are derived -# from it, notably various paths such as LOG_FILE and anything -# using DATA_DIR. +# NOTE: If you change the value of SERVER_MODE or DATA_DIR in an included config +# file, you may also need to redefine any values below that are derived +# from it, notably various paths such as LOG_FILE, SQLITE_PATH, +# SESSION_DB_PATH, STORAGE_DIR, KERBEROS_CCACHE_DIR, and +# AZURE_CREDENTIAL_CACHE_DIR if (not hasattr(builtins, 'SERVER_MODE')) or builtins.SERVER_MODE is None: SERVER_MODE = True