From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id C3B1A97BE7 for ; Wed, 6 Mar 2024 10:09:07 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id A940613F30 for ; Wed, 6 Mar 2024 10:09:07 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Wed, 6 Mar 2024 10:09:04 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 0B341487BC; Wed, 6 Mar 2024 10:09:04 +0100 (CET) Message-ID: <738ea02b-aacc-42da-9bc4-4165a5e0942c@proxmox.com> Date: Wed, 6 Mar 2024 10:09:03 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta To: Thomas Lamprecht , Proxmox Backup Server development discussion References: <20240306084702.940876-1-d.csapak@proxmox.com> Content-Language: en-US From: Dominik Csapak In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.019 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 T_SCC_BODY_TEXT_LINE -0.01 - Subject: Re: [pbs-devel] [PATCH proxmox-backup] api: tape: don't allow overwriting of ids in changer/drive config X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Mar 2024 09:09:07 -0000 On 3/6/24 09:56, Thomas Lamprecht wrote: > Am 06/03/2024 um 09:47 schrieb Dominik Csapak: >> by checking the whole section config for an existing id, not only the >> ones of the given type. >> >> This prevents creation of a drive config with the same name as an >> existing changer and vice versa. > > Ok, but why is that bad? Just confusion potential, does something > break as we only use the ID without the section-key later on, ...? > > Describing the effects/background, even if rather obvious, would > be still appreciated. ah yes, sorry first, it's really unexpected that creating a changer 'foo' deletes the existing drive 'foo' (or vice versa). but it also breaks our assumptions a bit, for example: i create a changer 'foo' then i create the drive 'foo' and select changer 'foo' as it's changer this works, but afterwards i don't have the changer anymore in the config but the drive still references that when i now select the changer 'foo' in the navigation, i'm greeted with the error: `got unexpected type 'lto' for changer 'foo'` should i send a v2 with an updated commit message?