* [pve-devel] [PATCH manager stable-7] pve7to8: content-dirs check: skip paths that cannot be resolved
@ 2023-06-15 13:22 Friedrich Weber
2023-06-15 14:47 ` [pve-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Friedrich Weber @ 2023-06-15 13:22 UTC (permalink / raw)
To: pve-devel
The current inequality check for content-dirs does not correctly
handle the case in which `abs_path` returns undef. This can result in
confusing warnings:
storage [...] uses directory for multiple content types [...]
Fix this by skipping paths for which `abs_path` returns undef. This
matches the behavior of the actual content-dirs check in PVE 8 [0].
[0]: https://git.proxmox.com/?p=pve-storage.git;a=commit;h=09f1f847a
Fixes: ea0a4f1943ffafe94282afc800d5720db45df198
Signed-off-by: Friedrich Weber <f.weber@proxmox.com>
---
PVE/CLI/pve7to8.pm | 1 +
1 file changed, 1 insertion(+)
diff --git a/PVE/CLI/pve7to8.pm b/PVE/CLI/pve7to8.pm
index d8624ca7..22a477a5 100644
--- a/PVE/CLI/pve7to8.pm
+++ b/PVE/CLI/pve7to8.pm
@@ -986,6 +986,7 @@ sub check_storage_content_dirs {
my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
for my $vtype (keys $scfg->{content}->%*) {
my $abs_subdir = Cwd::abs_path($plugin->get_subdir($scfg, $vtype));
+ next if !defined($abs_subdir);
push $resolved_subdirs->{$abs_subdir}->@*, $vtype;
}
for my $subdir (keys $resolved_subdirs->%*) {
--
2.39.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pve-devel] applied: [PATCH manager stable-7] pve7to8: content-dirs check: skip paths that cannot be resolved
2023-06-15 13:22 [pve-devel] [PATCH manager stable-7] pve7to8: content-dirs check: skip paths that cannot be resolved Friedrich Weber
@ 2023-06-15 14:47 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2023-06-15 14:47 UTC (permalink / raw)
To: Proxmox VE development discussion, Friedrich Weber
Am 15/06/2023 um 15:22 schrieb Friedrich Weber:
> The current inequality check for content-dirs does not correctly
> handle the case in which `abs_path` returns undef. This can result in
> confusing warnings:
>
> storage [...] uses directory for multiple content types [...]
>
> Fix this by skipping paths for which `abs_path` returns undef. This
> matches the behavior of the actual content-dirs check in PVE 8 [0].
>
> [0]: https://git.proxmox.com/?p=pve-storage.git;a=commit;h=09f1f847a
>
> Fixes: ea0a4f1943ffafe94282afc800d5720db45df198
> Signed-off-by: Friedrich Weber <f.weber@proxmox.com>
> ---
> PVE/CLI/pve7to8.pm | 1 +
> 1 file changed, 1 insertion(+)
>
>
applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-06-15 14:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-15 13:22 [pve-devel] [PATCH manager stable-7] pve7to8: content-dirs check: skip paths that cannot be resolved Friedrich Weber
2023-06-15 14:47 ` [pve-devel] applied: " Thomas Lamprecht
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal