public inbox for pmg-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pmg-devel] [PATCH pmg-api 0/2] improve restart behavior of api daemons
@ 2021-11-24 16:04 Stoiko Ivanov
  2021-11-24 16:04 ` [pmg-devel] [PATCH pmg-api 1/2] api-daemons: restart on-failure Stoiko Ivanov
  2021-11-24 16:04 ` [pmg-devel] [PATCH pmg-api 2/2] api-daemons: set oom-policy to continue Stoiko Ivanov
  0 siblings, 2 replies; 5+ messages in thread
From: Stoiko Ivanov @ 2021-11-24 16:04 UTC (permalink / raw)
  To: pmg-devel

Sending as two patches - since I tested them individually, think both do
make sense, but consider them independent of each other.

Currently limiting the scope to pmgdaemon and pmgproxy, since we observed
problems with the current behavior with those 2 recently, while I'm not
aware of any similar issues with the other daemons in PMG

pveproxy, pvedaemon already have the Restart policy set - but I'll gladly
send the OOMPolicy patch if wanted.

Stoiko Ivanov (2):
  api-daemons: restart on-failure
  api-daemons: set oom-policy to continue

 debian/pmgdaemon.service | 2 ++
 debian/pmgproxy.service  | 2 ++
 2 files changed, 4 insertions(+)

-- 
2.30.2





^ permalink raw reply	[flat|nested] 5+ messages in thread

* [pmg-devel] [PATCH pmg-api 1/2] api-daemons: restart on-failure
  2021-11-24 16:04 [pmg-devel] [PATCH pmg-api 0/2] improve restart behavior of api daemons Stoiko Ivanov
@ 2021-11-24 16:04 ` Stoiko Ivanov
  2021-11-24 18:01   ` [pmg-devel] applied: " Thomas Lamprecht
  2021-11-24 16:04 ` [pmg-devel] [PATCH pmg-api 2/2] api-daemons: set oom-policy to continue Stoiko Ivanov
  1 sibling, 1 reply; 5+ messages in thread
From: Stoiko Ivanov @ 2021-11-24 16:04 UTC (permalink / raw)
  To: pmg-devel

user experience benefits when we restart pmgdaemon and pmgproxy if
they get terminated abnormally (now observed with oom-kills).

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
 debian/pmgdaemon.service | 1 +
 debian/pmgproxy.service  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/debian/pmgdaemon.service b/debian/pmgdaemon.service
index 13da2b8..f45986e 100644
--- a/debian/pmgdaemon.service
+++ b/debian/pmgdaemon.service
@@ -11,6 +11,7 @@ ExecStart=/usr/bin/pmgdaemon start
 ExecStop=/usr/bin/pmgdaemon stop
 ExecReload=/usr/bin/pmgdaemon restart
 PIDFile=/run/pmgdaemon.pid
+Restart=on-failure
 Type=forking
 
 [Install]
diff --git a/debian/pmgproxy.service b/debian/pmgproxy.service
index f978862..247a241 100644
--- a/debian/pmgproxy.service
+++ b/debian/pmgproxy.service
@@ -13,6 +13,7 @@ ExecStart=/usr/bin/pmgproxy start
 ExecStop=/usr/bin/pmgproxy stop
 ExecReload=/usr/bin/pmgproxy restart
 PIDFile=/run/pmgproxy/pmgproxy.pid
+Restart=on-failure
 Type=forking
 
 [Install]
-- 
2.30.2





^ permalink raw reply	[flat|nested] 5+ messages in thread

* [pmg-devel] [PATCH pmg-api 2/2] api-daemons: set oom-policy to continue
  2021-11-24 16:04 [pmg-devel] [PATCH pmg-api 0/2] improve restart behavior of api daemons Stoiko Ivanov
  2021-11-24 16:04 ` [pmg-devel] [PATCH pmg-api 1/2] api-daemons: restart on-failure Stoiko Ivanov
@ 2021-11-24 16:04 ` Stoiko Ivanov
  2021-11-24 18:02   ` [pmg-devel] applied: " Thomas Lamprecht
  1 sibling, 1 reply; 5+ messages in thread
From: Stoiko Ivanov @ 2021-11-24 16:04 UTC (permalink / raw)
  To: pmg-devel

OOMPolicy [0] defaults to stop - resulting in the complete daemon to
be killed.
Our Daemon class does start new workers automatically if it detects
that fewer than configured are running.

[0] systemd.service(5)

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
 debian/pmgdaemon.service | 1 +
 debian/pmgproxy.service  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/debian/pmgdaemon.service b/debian/pmgdaemon.service
index f45986e..4e3ed85 100644
--- a/debian/pmgdaemon.service
+++ b/debian/pmgdaemon.service
@@ -10,6 +10,7 @@ After=ssh.service
 ExecStart=/usr/bin/pmgdaemon start
 ExecStop=/usr/bin/pmgdaemon stop
 ExecReload=/usr/bin/pmgdaemon restart
+OOMPolicy=continue
 PIDFile=/run/pmgdaemon.pid
 Restart=on-failure
 Type=forking
diff --git a/debian/pmgproxy.service b/debian/pmgproxy.service
index 247a241..7ffce87 100644
--- a/debian/pmgproxy.service
+++ b/debian/pmgproxy.service
@@ -12,6 +12,7 @@ After=ssh.service
 ExecStart=/usr/bin/pmgproxy start
 ExecStop=/usr/bin/pmgproxy stop
 ExecReload=/usr/bin/pmgproxy restart
+OOMPolicy=continue
 PIDFile=/run/pmgproxy/pmgproxy.pid
 Restart=on-failure
 Type=forking
-- 
2.30.2





^ permalink raw reply	[flat|nested] 5+ messages in thread

* [pmg-devel] applied: [PATCH pmg-api 1/2] api-daemons: restart on-failure
  2021-11-24 16:04 ` [pmg-devel] [PATCH pmg-api 1/2] api-daemons: restart on-failure Stoiko Ivanov
@ 2021-11-24 18:01   ` Thomas Lamprecht
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Lamprecht @ 2021-11-24 18:01 UTC (permalink / raw)
  To: Stoiko Ivanov, pmg-devel

On 24.11.21 17:04, Stoiko Ivanov wrote:
> user experience benefits when we restart pmgdaemon and pmgproxy if
> they get terminated abnormally (now observed with oom-kills).
> 
> Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
> ---
>  debian/pmgdaemon.service | 1 +
>  debian/pmgproxy.service  | 1 +
>  2 files changed, 2 insertions(+)
> 
>

applied, thanks!




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [pmg-devel] applied: [PATCH pmg-api 2/2] api-daemons: set oom-policy to continue
  2021-11-24 16:04 ` [pmg-devel] [PATCH pmg-api 2/2] api-daemons: set oom-policy to continue Stoiko Ivanov
@ 2021-11-24 18:02   ` Thomas Lamprecht
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Lamprecht @ 2021-11-24 18:02 UTC (permalink / raw)
  To: Stoiko Ivanov, pmg-devel

On 24.11.21 17:04, Stoiko Ivanov wrote:
> OOMPolicy [0] defaults to stop - resulting in the complete daemon to
> be killed.
> Our Daemon class does start new workers automatically if it detects
> that fewer than configured are running.
> 
> [0] systemd.service(5)
> 
> Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
> ---
>  debian/pmgdaemon.service | 1 +
>  debian/pmgproxy.service  | 1 +
>  2 files changed, 2 insertions(+)
> 
>

applied, thanks!




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-11-24 18:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-24 16:04 [pmg-devel] [PATCH pmg-api 0/2] improve restart behavior of api daemons Stoiko Ivanov
2021-11-24 16:04 ` [pmg-devel] [PATCH pmg-api 1/2] api-daemons: restart on-failure Stoiko Ivanov
2021-11-24 18:01   ` [pmg-devel] applied: " Thomas Lamprecht
2021-11-24 16:04 ` [pmg-devel] [PATCH pmg-api 2/2] api-daemons: set oom-policy to continue Stoiko Ivanov
2021-11-24 18:02   ` [pmg-devel] applied: " Thomas Lamprecht

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