upgrade_client: Make sure we allow future deployment server

This commit is contained in:
deajan 2025-02-11 15:02:31 +01:00
parent 1a9f1284d0
commit e637a27329
2 changed files with 5 additions and 2 deletions

View file

@ -41,3 +41,6 @@ if not "BUILD_TYPE" in globals():
def set_build_type(build_type: str) -> None:
global BUILD_TYPE
BUILD_TYPE = build_type
ALLOWED_UPGRADE_SERVER_IDS = ("npbackup.upgrader", "npbackup.deployment_server")

View file

@ -26,7 +26,7 @@ from command_runner import deferred_command
from npbackup.path_helper import CURRENT_DIR, CURRENT_EXECUTABLE
from npbackup.__version__ import version_dict, IS_COMPILED
from npbackup.__debug__ import _NPBACKUP_ALLOW_AUTOUPGRADE_DEBUG
from npbackup.__env__ import UPGRADE_DEFER_TIME
from npbackup.__env__ import UPGRADE_DEFER_TIME, ALLOWED_UPGRADE_SERVER_IDS
logger = getLogger()
@ -102,7 +102,7 @@ def _check_new_version(
return None
try:
if not server_ident["app"] == "npbackup.upgrader":
if not server_ident["app"] in ALLOWED_UPGRADE_SERVER_IDS:
msg = "Current server is not a recognized NPBackup update server"
if ignore_errors:
logger.info(msg)