* [pve-devel] [PATCH qemu-server] vmstatus: don't set PID when VM is not running
@ 2021-06-18 11:36 Fabian Ebner
2021-06-18 12:05 ` [pve-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Fabian Ebner @ 2021-06-18 11:36 UTC (permalink / raw)
To: pve-devel
by avoiding int(undef)
Reported-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
---
LXC does not have the same problem as it's guarded by a check that the container
is active already.
PVE/QemuServer.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 7630829..6962d7d 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -2654,7 +2654,7 @@ sub vmstatus {
my $conf = PVE::QemuConfig->load_config($vmid);
my $d = { vmid => int($vmid) };
- $d->{pid} = int($list->{$vmid}->{pid});
+ $d->{pid} = int($list->{$vmid}->{pid}) if $list->{$vmid}->{pid};
# fixme: better status?
$d->{status} = $list->{$vmid}->{pid} ? 'running' : 'stopped';
--
2.30.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pve-devel] applied: [PATCH qemu-server] vmstatus: don't set PID when VM is not running
2021-06-18 11:36 [pve-devel] [PATCH qemu-server] vmstatus: don't set PID when VM is not running Fabian Ebner
@ 2021-06-18 12:05 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2021-06-18 12:05 UTC (permalink / raw)
To: Proxmox VE development discussion, Fabian Ebner
On 18.06.21 13:36, Fabian Ebner wrote:
> by avoiding int(undef)
>
> Reported-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
> Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
> ---
>
> LXC does not have the same problem as it's guarded by a check that the container
> is active already.
>
> PVE/QemuServer.pm | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>
applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-18 12:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-18 11:36 [pve-devel] [PATCH qemu-server] vmstatus: don't set PID when VM is not running Fabian Ebner
2021-06-18 12:05 ` [pve-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