[pbs-devel] [PATCH proxmox-backup] api: tape: don't allow overwriting of ids in changer/drive config

Dominik Csapak d.csapak at proxmox.com
Wed Mar 6 10:09:03 CET 2024


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?




More information about the pbs-devel mailing list