[pve-devel] applied: [PATCH manager 2/3] api/services: fallback to restart in reload

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Jul 24 15:25:26 CEST 2020


And document that it is preferred

Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 PVE/API2/Services.pm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/PVE/API2/Services.pm b/PVE/API2/Services.pm
index e5b3c3da..df9606f4 100644
--- a/PVE/API2/Services.pm
+++ b/PVE/API2/Services.pm
@@ -319,7 +319,7 @@ __PACKAGE__->register_method ({
     name => 'service_restart',
     path => '{service}/restart',
     method => 'POST',
-    description => "Restart service.",
+    description => "Hard restart service. Use reload if you want to reduce interruptions.",
     permissions => {
 	check => ['perm', '/nodes/{node}', [ 'Sys.Modify' ]],
     },
@@ -355,7 +355,7 @@ __PACKAGE__->register_method ({
     name => 'service_reload',
     path => '{service}/reload',
     method => 'POST',
-    description => "Reload service.",
+    description => "Reload service. Falls back to restart if service cannot be reloaded.",
     permissions => {
 	check => ['perm', '/nodes/{node}', [ 'Sys.Modify' ]],
     },
@@ -381,7 +381,7 @@ __PACKAGE__->register_method ({
 	    my $upid = shift;
 	    syslog('info', "reloading service $param->{service}: $upid\n");
 
-	    $service_cmd->($param->{service}, 'reload');
+	    $service_cmd->($param->{service}, 'try-reload-or-restart');
 
 	};
 
-- 
2.20.1






More information about the pve-devel mailing list