[pve-devel] [PATCH v5 container 3/4] switch to pve-container@ unit

Fabian Grünbichler f.gruenbichler at proxmox.com
Wed Oct 11 14:13:12 CEST 2017


Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
 src/PVE/API2/LXC/Status.pm | 2 +-
 src/PVE/VZDump/LXC.pm      | 2 +-
 src/lxc-pve-poststop-hook  | 7 ++++---
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/PVE/API2/LXC/Status.pm b/src/PVE/API2/LXC/Status.pm
index 0d24ea6..2989e9b 100644
--- a/src/PVE/API2/LXC/Status.pm
+++ b/src/PVE/API2/LXC/Status.pm
@@ -191,7 +191,7 @@ __PACKAGE__->register_method({
 
 		    local $ENV{PVE_SKIPLOCK}=1 if $skiplock;
 
-		    my $cmd = ['systemctl', 'start', "lxc\@$vmid"];
+		    my $cmd = ['systemctl', 'start', "pve-container\@$vmid"];
 
 		    run_command($cmd);
 
diff --git a/src/PVE/VZDump/LXC.pm b/src/PVE/VZDump/LXC.pm
index 45a851c..f9616e0 100644
--- a/src/PVE/VZDump/LXC.pm
+++ b/src/PVE/VZDump/LXC.pm
@@ -260,7 +260,7 @@ sub stop_vm {
 sub start_vm {
     my ($self, $task, $vmid) = @_;
 
-    $self->cmd(['systemctl', 'start', "lxc\@$vmid"]);
+    $self->cmd(['systemctl', 'start', "pve-container\@$vmid"]);
 }
 
 sub suspend_vm {
diff --git a/src/lxc-pve-poststop-hook b/src/lxc-pve-poststop-hook
index 0396739..654aa26 100755
--- a/src/lxc-pve-poststop-hook
+++ b/src/lxc-pve-poststop-hook
@@ -77,9 +77,10 @@ __PACKAGE__->register_method ({
 	    # In order to make sure hot-plugged config changes aren't reverted
 	    # to what the monitor initially loaded we need to stop the container
 	    # and restart it.
-	    # Update the config and queue a restart of the lxc@$vmid task, note
-	    # that we must not block because we're part of the service cgroup
-	    # systemd waits for to die before issuing the new lxc-start command.
+	    # Update the config and queue a restart of the pve-container@$vmid
+	    # task, note that we must not block because we're part of the
+	    # service cgroup systemd waits for to die before issuing the new
+	    # lxc-start command.
 	    PVE::LXC::update_lxc_config($vmid, $conf);
 	    # Tell the post-stop hook we want to be restarted.
 	    open(my $fh, '>', "/var/lib/lxc/$vmid/reboot")
-- 
2.14.1





More information about the pve-devel mailing list