|
|
c1c534 |
From 50bfc7b26b1a45d34ff8f62febbd59d6be9fb02c Mon Sep 17 00:00:00 2001
|
|
|
c1c534 |
Message-Id: <50bfc7b26b1a45d34ff8f62febbd59d6be9fb02c@dist-git>
|
|
|
c1c534 |
From: Martin Kletzander <mkletzan@redhat.com>
|
|
|
c1c534 |
Date: Wed, 31 Jan 2018 16:32:43 +0100
|
|
|
c1c534 |
Subject: [PATCH] qemu: Restore machinename even without cgroups
|
|
|
c1c534 |
|
|
|
c1c534 |
The virresctrl will use this as well and we need to have that info after restart
|
|
|
c1c534 |
to properly clean up /sys/fs/resctrl.
|
|
|
c1c534 |
|
|
|
c1c534 |
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
|
|
|
c1c534 |
(cherry picked from commit 272649a1d7b4c6a9f5c355a3b3e2a49b748e0f4d)
|
|
|
c1c534 |
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
|
|
|
c1c534 |
|
|
|
c1c534 |
https://bugzilla.redhat.com/show_bug.cgi?id=1289368
|
|
|
c1c534 |
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
|
|
|
c1c534 |
---
|
|
|
c1c534 |
src/qemu/qemu_cgroup.c | 4 ----
|
|
|
c1c534 |
src/qemu/qemu_process.c | 4 ++++
|
|
|
c1c534 |
2 files changed, 4 insertions(+), 4 deletions(-)
|
|
|
c1c534 |
|
|
|
c1c534 |
diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
|
|
|
c1c534 |
index 19252ea239..41e27c21e2 100644
|
|
|
c1c534 |
--- a/src/qemu/qemu_cgroup.c
|
|
|
c1c534 |
+++ b/src/qemu/qemu_cgroup.c
|
|
|
c1c534 |
@@ -986,10 +986,6 @@ qemuConnectCgroup(virDomainObjPtr vm)
|
|
|
c1c534 |
if (!virCgroupAvailable())
|
|
|
c1c534 |
goto done;
|
|
|
c1c534 |
|
|
|
c1c534 |
- priv->machineName = qemuDomainGetMachineName(vm);
|
|
|
c1c534 |
- if (!priv->machineName)
|
|
|
c1c534 |
- goto cleanup;
|
|
|
c1c534 |
-
|
|
|
c1c534 |
virCgroupFree(&priv->cgroup);
|
|
|
c1c534 |
|
|
|
c1c534 |
if (virCgroupNewDetectMachine(vm->def->name,
|
|
|
c1c534 |
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
|
|
|
c1c534 |
index 29a8d8ba53..08081aa278 100644
|
|
|
c1c534 |
--- a/src/qemu/qemu_process.c
|
|
|
c1c534 |
+++ b/src/qemu/qemu_process.c
|
|
|
c1c534 |
@@ -7194,6 +7194,10 @@ qemuProcessReconnect(void *opaque)
|
|
|
c1c534 |
if (qemuHostdevUpdateActiveDomainDevices(driver, obj->def) < 0)
|
|
|
c1c534 |
goto error;
|
|
|
c1c534 |
|
|
|
c1c534 |
+ priv->machineName = qemuDomainGetMachineName(obj);
|
|
|
c1c534 |
+ if (!priv->machineName)
|
|
|
c1c534 |
+ goto error;
|
|
|
c1c534 |
+
|
|
|
c1c534 |
if (qemuConnectCgroup(obj) < 0)
|
|
|
c1c534 |
goto error;
|
|
|
c1c534 |
|
|
|
c1c534 |
--
|
|
|
c1c534 |
2.16.1
|
|
|
c1c534 |
|