mirror of
https://git.proxmox.com/git/pve-common
synced 2025-08-09 03:25:57 +00:00
systemd: allow SendSIGKILL and TimeoutStopUSec dbus properties
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>
This commit is contained in:
parent
9d065c72fb
commit
ffe48b8e8a
@ -3,7 +3,7 @@ package PVE::Systemd;
|
|||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
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::Callback;
|
||||||
use Net::DBus::Reactor;
|
use Net::DBus::Reactor;
|
||||||
|
|
||||||
@ -107,7 +107,9 @@ sub enter_systemd_scope {
|
|||||||
foreach my $key (keys %extra) {
|
foreach my $key (keys %extra) {
|
||||||
if ($key eq 'Slice' || $key eq 'KillMode') {
|
if ($key eq 'Slice' || $key eq 'KillMode') {
|
||||||
push @{$properties}, [$key, $extra{$key}];
|
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})];
|
push @{$properties}, [$key, dbus_uint64($extra{$key})];
|
||||||
} elsif ($key eq 'CPUQuota') {
|
} elsif ($key eq 'CPUQuota') {
|
||||||
push @{$properties}, ['CPUQuotaPerSecUSec',
|
push @{$properties}, ['CPUQuotaPerSecUSec',
|
||||||
|
Loading…
Reference in New Issue
Block a user