From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pbs-devel-bounces@lists.proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
	by lore.proxmox.com (Postfix) with ESMTPS id 781BC1FF16E
	for <inbox@lore.proxmox.com>; Mon, 17 Mar 2025 13:36:14 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
	by firstgate.proxmox.com (Proxmox) with ESMTP id EC7AD2174;
	Mon, 17 Mar 2025 13:36:04 +0100 (CET)
Message-ID: <944705db-906a-47f1-9959-d51e25d22647@proxmox.com>
Date: Mon, 17 Mar 2025 13:36:01 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird Beta
To: Christian Ebner <c.ebner@proxmox.com>,
 Proxmox Backup Server development discussion <pbs-devel@lists.proxmox.com>
References: <20250310170125.528732-1-c.ebner@proxmox.com>
 <66676a8d-15fd-4a2c-b80b-19564cc268df@proxmox.com>
 <1d56786a-408b-4bd1-841e-5515cd1df15e@proxmox.com>
 <69533b86-7d14-41a5-8355-9eade40301b9@proxmox.com>
 <9bdf3889-b288-458a-bfe6-5ac9099971de@proxmox.com>
Content-Language: en-US
From: Dominik Csapak <d.csapak@proxmox.com>
In-Reply-To: <9bdf3889-b288-458a-bfe6-5ac9099971de@proxmox.com>
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.022 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DMARC_MISSING             0.1 Missing DMARC policy
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
Subject: Re: [pbs-devel] [PATCH proxmox-backup 1/2] fix: ui: sync job:
 switch rate limit based on sync direction
X-BeenThere: pbs-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox Backup Server development discussion
 <pbs-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pbs-devel>, 
 <mailto:pbs-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pbs-devel/>
List-Post: <mailto:pbs-devel@lists.proxmox.com>
List-Help: <mailto:pbs-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel>, 
 <mailto:pbs-devel-request@lists.proxmox.com?subject=subscribe>
Reply-To: Proxmox Backup Server development discussion
 <pbs-devel@lists.proxmox.com>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Errors-To: pbs-devel-bounces@lists.proxmox.com
Sender: "pbs-devel" <pbs-devel-bounces@lists.proxmox.com>

On 3/17/25 13:11, Christian Ebner wrote:
> On 3/17/25 12:56, Dominik Csapak wrote:
>> On 3/17/25 11:32, Christian Ebner wrote:
>>> On 3/17/25 11:07, Dominik Csapak wrote:
>>>> High level comment:
>>>>
>>>> I know it's preexisting, bu does it even make sense to have a 'rate- in' and 'rate-out' for sync
>>>> jobs? would it not make more sense to have a single 'rate' parameter and apply it to both
>>>> directions?
>>>
>>> You mean only as additional parameter for the api endpoint for sync job config creation and 
>>> update? Or as parameter for the sync job config itself?
>>>
>>> The former might be the better option, and one can check if both rate and rate-in/out were set 
>>> and abort with error in that case or abort with error if a rate-in was configured for a push or 
>>> rate-out for a pull?
>>>
>>
>> i had actually imagined 3 options for the sync job config
>> rate: limits both in/out
>> rate-in/out: precedence over rate, limits the respective direction
>>
>> and only expose the 'rate' option on the ui
> 
> Okay, that makes sense, but the issue I see there is that per-existing rate limits are not shown in 
> the UI anymore, as the `rate` field is now used, while the config has the explicit `rate-in/out` set.
> 
> So this would need some merging first, or am I missing something?

no, you're right, but i think we have a few options:

* contrary to what i suggested, don't prioritize rate-in/out, but only use it when 'rate' is not set
* delete rate-in/out when setting the rate via the gui
* as you suggested in the other response, only keep rate-in and rate-out but expose both
   (although i can already see the confusion about what is 'in' and what is 'out' regarding sync 
direction)
* (other suggestions?)


_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel