public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] applied: [PATCH manager 2/3] api/services: fallback to restart in reload
Date: Fri, 24 Jul 2020 15:25:26 +0200	[thread overview]
Message-ID: <20200724132527.3623835-2-t.lamprecht@proxmox.com> (raw)
In-Reply-To: <20200724132527.3623835-1-t.lamprecht@proxmox.com>

And document that it is preferred

Signed-off-by: Thomas Lamprecht <t.lamprecht@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





  reply	other threads:[~2020-07-24 13:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-24 13:25 [pve-devel] applied: [PATCH manager 1/3] api/services: improve essential service check, allow reload and start Thomas Lamprecht
2020-07-24 13:25 ` Thomas Lamprecht [this message]
2020-07-24 13:25 ` [pve-devel] applied: [PATCH manager 3/3] ui: node/services: use safer reload as restart command Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200724132527.3623835-2-t.lamprecht@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal