public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stefan Reiter <s.reiter@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH common 2/2] systemd: allow SendSIGKILL and TimeoutStopUSec dbus properties
Date: Mon, 21 Jun 2021 18:35:42 +0200	[thread overview]
Message-ID: <20210621163542.1752647-3-s.reiter@proxmox.com> (raw)
In-Reply-To: <20210621163542.1752647-1-s.reiter@proxmox.com>

Used in qemu-server for avoiding KillMode 'none'. SendSIGKILL is a
boolean, so we need to use dbus_boolean to serialize it.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
---
 src/PVE/Systemd.pm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/PVE/Systemd.pm b/src/PVE/Systemd.pm
index e9712e0..2517d31 100644
--- a/src/PVE/Systemd.pm
+++ b/src/PVE/Systemd.pm
@@ -3,7 +3,7 @@ package PVE::Systemd;
 use strict;
 use warnings;
 
-use Net::DBus qw(dbus_uint32 dbus_uint64);
+use Net::DBus qw(dbus_uint32 dbus_uint64 dbus_boolean);
 use Net::DBus::Callback;
 use Net::DBus::Reactor;
 
@@ -107,7 +107,9 @@ sub enter_systemd_scope {
     foreach my $key (keys %extra) {
 	if ($key eq 'Slice' || $key eq 'KillMode') {
 	    push @{$properties}, [$key, $extra{$key}];
-	} elsif ($key eq 'CPUShares' || $key eq 'CPUWeight') {
+	} elsif ($key eq 'SendSIGKILL') {
+	    push @{$properties}, [$key, dbus_boolean($extra{$key})];
+	} elsif ($key eq 'CPUShares' || $key eq 'CPUWeight' || $key eq 'TimeoutStopUSec') {
 	    push @{$properties}, [$key, dbus_uint64($extra{$key})];
 	} elsif ($key eq 'CPUQuota') {
 	    push @{$properties}, ['CPUQuotaPerSecUSec',
-- 
2.30.2





  parent reply	other threads:[~2021-06-21 16:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-21 16:35 [pve-devel] [PATCH 0/2] Work around systemd warning about KillMode 'none' Stefan Reiter
2021-06-21 16:35 ` [pve-devel] [PATCH qemu-server 1/2] use KillMode 'process' for systemd scope Stefan Reiter
2021-06-22  6:02   ` Thomas Lamprecht
2021-06-22  7:23     ` Stefan Reiter
2021-06-23 10:06   ` [pve-devel] applied: " Thomas Lamprecht
2021-06-21 16:35 ` Stefan Reiter [this message]
2021-06-22  5:45   ` [pve-devel] applied: [PATCH common 2/2] systemd: allow SendSIGKILL and TimeoutStopUSec dbus properties 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=20210621163542.1752647-3-s.reiter@proxmox.com \
    --to=s.reiter@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