]> git.proxmox.com Git - pve-storage.git/commit - src/PVE/Storage/Plugin.pm
deprecate mkdir option for create-base-path and create-subdirs
authorAaron Lauterer <a.lauterer@proxmox.com>
Wed, 31 May 2023 12:46:09 +0000 (14:46 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 5 Jun 2023 08:56:24 +0000 (10:56 +0200)
commit7c242295c9d8ba24ddd3de8e98f453af04ee5da1
treea88da7036054d845f1173c72ae687a5c58a30d14
parent39d9fb244028284f31ad88efbe77016e3f33a494
deprecate mkdir option for create-base-path and create-subdirs

The `mkdir` option has two meanings[0][1] which are split up in `create-path`
and `create-sub-dirs`.

The `create-base-path` option decides if the path to the storage is
automatically created or not.
The `create-subdirs` options decides if the default directory
structure (dump, images, ...) at the storage location is created.

The `mkdir` option is still working but will trigger a warning in the
logs.

As a side effect, this also fixes #3214 because the `create-base-path` option
is now run after the `is_mountpoint` check in the `activate_storage`
method in DirPlugin.pm.

The 'mkpath' command has been moved into a new helper function that
first determines if the conditions to create the path is true, called
'config_aware_base_mkdir'.

[0] https://lists.proxmox.com/pipermail/pve-devel/2020-December/046575.html
[1] https://lists.proxmox.com/pipermail/pve-devel/2020-December/046576.html

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Reviewed-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
src/PVE/Storage/BTRFSPlugin.pm
src/PVE/Storage/CIFSPlugin.pm
src/PVE/Storage/CephFSPlugin.pm
src/PVE/Storage/DirPlugin.pm
src/PVE/Storage/GlusterfsPlugin.pm
src/PVE/Storage/NFSPlugin.pm
src/PVE/Storage/Plugin.pm