[pve-devel] [PATCH] fix #2456 setting bind-mount through API/CLI is broken

Wolfgang Link w.link at proxmox.com
Thu Nov 7 07:51:07 CET 2019


Content-type check is only valid for mp from type 'volume'.
The Content-type check is correct for rootfs and mount points.
---
 src/PVE/LXC/Config.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm
index 7e51b8d..39de691 100644
--- a/src/PVE/LXC/Config.pm
+++ b/src/PVE/LXC/Config.pm
@@ -937,7 +937,7 @@ sub update_pct_config {
 	if ($opt =~ m/^mp(\d+)$/ || $opt eq 'rootfs') {
 	    $class->check_protection($conf, "can't update CT $vmid drive '$opt'");
 	    my $mp = $opt eq 'rootfs' ? $class->parse_ct_rootfs($value) : $class->parse_ct_mountpoint($value);
-	    $check_content_type->($mp);
+	    $check_content_type->($mp) if ($mp->{type} eq 'volume');
 	} elsif ($opt eq 'hookscript') {
 	    PVE::GuestHelpers::check_hookscript($value);
 	} elsif ($opt eq 'nameserver') {
-- 
2.20.1





More information about the pve-devel mailing list