From 70af7c7a711d459c0ef739c4fb879055e9926e53 Mon Sep 17 00:00:00 2001 From: themylogin Date: Wed, 27 Nov 2024 23:52:46 +0100 Subject: [PATCH] Fix `NOTICE: s3: s3 provider "" not known - please set correctly` also in `cloudsync.credentials.verify` (cherry picked from commit 103c0539f3f97313f6470fa5a1547b6aeb90391c) --- src/middlewared/middlewared/rclone/remote/s3.py | 3 +-- src/middlewared/middlewared/rclone/remote/storjix.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/middlewared/middlewared/rclone/remote/s3.py b/src/middlewared/middlewared/rclone/remote/s3.py index 5117c11d56916..0ab64c9777fb2 100644 --- a/src/middlewared/middlewared/rclone/remote/s3.py +++ b/src/middlewared/middlewared/rclone/remote/s3.py @@ -67,7 +67,7 @@ async def validate_task_basic(self, task, credentials, verrors): task["attributes"]["region"] = response["LocationConstraint"] or "us-east-1" async def get_credentials_extra(self, credentials): - result = {} + result = {"provider": "Other"} if (credentials["attributes"].get("endpoint") or "").rstrip("/").endswith(".scw.cloud"): if credentials["attributes"].get("max_upload_parts", 10000) == 10000: @@ -81,7 +81,6 @@ async def get_task_extra(self, task): server_side_encryption=task["attributes"].get("encryption") or "", skip_region=undefined, signatures_v2=undefined, - provider="Other", ) if not task["credentials"]["attributes"].get("skip_region", False): diff --git a/src/middlewared/middlewared/rclone/remote/storjix.py b/src/middlewared/middlewared/rclone/remote/storjix.py index 5ea355f8bd8bc..7359a39768ad7 100644 --- a/src/middlewared/middlewared/rclone/remote/storjix.py +++ b/src/middlewared/middlewared/rclone/remote/storjix.py @@ -85,7 +85,7 @@ def list_buckets_sync(): return await self.middleware.run_in_thread(list_buckets_sync) async def get_credentials_extra(self, credentials): - return {"endpoint": "https://gateway.storjshare.io"} + return {"endpoint": "https://gateway.storjshare.io", "provider": "Other"} async def get_task_extra(self, task): # Storj recommended these settings @@ -93,7 +93,6 @@ async def get_task_extra(self, task): "chunk_size": "64M", "disable_http2": "true", "upload_cutoff": "64M", - "provider": "Other", } def get_restic_config(self, task):