[pve-devel] [PATCH storage v4 3/4] pbs: Extraxt check_datastore_exists from activate_storage

Fiona Ebner f.ebner at proxmox.com
Mon Feb 19 09:34:25 CET 2024

Am 27.11.23 um 12:40 schrieb Philipp Hufnagl:
> Parts contained in activate_storage are needed to be run to fix #5008,
> however, implementing a namespace check there would cause unneeded
> overhead.

Actually, maybe we can do without the overhead, which would also avoid
the need for making the connection in scan_datastores() optional. In
activate_storage(), we could do

if there is a namespace in scfg

because for a nonexistent datastore, the API call querying the
namespaces will still fail with a nice "no such datastore 'nonexistent'"
error, so we'd still catch that without making two API calls.

Not sure if we should even add additional checks in the on_{add,update}

What do you (or other devs) think?

More information about the pve-devel mailing list