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

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Mar 6 10:24:59 CET 2024


Am 06/03/2024 um 10:09 schrieb Dominik Csapak:
> 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'`

Ok, yeah, disallowing this explicitly sounds sensible enough and
easier compared to fixing support for changer and drive having their
own ID namespace.

> 
> should i send a  v2 with an updated commit message?
> 

yes please, as going in the other direction (fully support this) is
an option it would be good to encode that we actively decided against
it (as that's to cheap to not do even if we never need to rethink
this again).




More information about the pbs-devel mailing list