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:
@ -256,6 +256,11 @@ __PACKAGE__->register_method ({
|
||||
|
||||
$returned_config = $plugin->on_add_hook($storeid, $opts, %$sensitive);
|
||||
|
||||
if (defined($opts->{mkdir})) { # TODO: remove complete option in Proxmox VE 9
|
||||
warn "NOTE: The 'mkdir' option set for '${storeid}' is deprecated and will be removed"
|
||||
." in Proxmox VE 9. Use 'create-base-path' or 'create-subdirs' instead.\n"
|
||||
}
|
||||
|
||||
eval {
|
||||
# try to activate if enabled on local node,
|
||||
# we only do this to detect errors/problems sooner
|
||||
@ -363,6 +368,11 @@ __PACKAGE__->register_method ({
|
||||
$scfg->{$k} = $opts->{$k};
|
||||
}
|
||||
|
||||
if (defined($scfg->{mkdir})) { # TODO: remove complete option in Proxmox VE 9
|
||||
warn "NOTE: The 'mkdir' option set for '${storeid}' is deprecated and will be removed"
|
||||
." in Proxmox VE 9. Use 'create-base-path' or 'create-subdirs' instead.\n"
|
||||
}
|
||||
|
||||
PVE::Storage::write_config($cfg);
|
||||
|
||||
}, "update storage failed");
|
||||
|
||||
Reference in New Issue
Block a user