]> git.proxmox.com Git - pve-container.git/commitdiff
move nohotplug error to after disk-creation
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 1 Oct 2015 08:58:31 +0000 (10:58 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 1 Oct 2015 09:33:58 +0000 (11:33 +0200)
Added a reminder comment...

src/PVE/LXC.pm

index 1b27f34a04ba39e1260c9798c09649a5968293c3..bc71163edfdf776d6000497cd3acdfc4baa78bb1 100644 (file)
@@ -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 {