fix #4785: avoid overly noisy mkdir deprecation warning for now

Move the warning over to creating and updating storage configs, which
is much less noisy as the constantly called activate storage (e.g.,
pvestatd).

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht
2023-06-17 12:41:46 +02:00
parent 09f1f847ae
commit c61e609eb6
2 changed files with 12 additions and 2 deletions

View File

@ -1369,8 +1369,8 @@ sub activate_storage {
"directory '$path' does not exist or is unreachable\n";
}
warn "${storeid}: 'mkdir' option is deprecated. Use 'create-base-path' or 'create-subdirs' instead.\n"
if defined($scfg->{mkdir});
# TODO: mkdir is basically deprecated since 8.0, but we don't warn here until 8.4 or 9.0, as we
# only got the replacement in 8.0, so no real replacement window, and its really noisy.
if (defined($scfg->{content})) {
# (opt-out) create content dirs and check validity