[pve-devel] [PATCH pve-container 6/8] move nohotplug error to after disk-creation

Wolfgang Bumiller w.bumiller at proxmox.com
Thu Oct 1 10:58:31 CEST 2015


Added a reminder comment...
---
 src/PVE/LXC.pm | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
index 1b27f34..bc71163 100644
--- a/src/PVE/LXC.pm
+++ b/src/PVE/LXC.pm
@@ -1312,10 +1312,6 @@ sub update_pct_config {
 	write_config($vmid, $conf) if $running;
     }
 
-    if ($running && scalar(@nohotplug)) {
-	die "unable to modify " . join(',', @nohotplug) . " while container is running\n";
-    }
-
     if (@deleted_volumes) {
 	my $storage_cfg = PVE::Storage::config();
 	foreach my $volume (@deleted_volumes) {
@@ -1327,6 +1323,11 @@ sub update_pct_config {
 	my $storage_cfg = PVE::Storage::config();
 	create_disks($storage_cfg, $vmid, $conf, $conf);
     }
+
+    # This should be the last thing we do here
+    if ($running && scalar(@nohotplug)) {
+	die "unable to modify " . join(',', @nohotplug) . " while container is running\n";
+    }
 }
 
 sub has_dev_console {
-- 
2.1.4





More information about the pve-devel mailing list