[libvirt] [PATCH v2 1/1] qemu: Tidy up job handling during live migration

During a QEMU live migration several warning messages about job handling could be written to syslog on the destination host: "entering monitor without asking for a nested job is dangerous" The messages are written because the job handling during migration uses hard coded asyncJob values in several places that are incorrect. This patch passes the required asyncJob value around and prevents the warnings as well as any issues that the warnings may be referring to. Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com> --- v2: * Handle failures from qemuDomainObjEnterMonitorAsync() rather than ignoring them. * Include qemuDomainChangeGraphicsPasswords(). src/qemu/qemu_domain.c | 6 ++++-- src/qemu/qemu_domain.h | 2 +- src/qemu/qemu_driver.c | 21 ++++++++++++--------- src/qemu/qemu_migration.c | 3 ++- src/qemu/qemu_process.c | 46 ++++++++++++++++++++++++++++------------------ src/qemu/qemu_process.h | 1 + 6 files changed, 48 insertions(+), 31 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 4f63c88..59b2647 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -2497,7 +2497,8 @@ qemuDomainDetermineDiskChain(virQEMUDriverPtr driver, int qemuDomainUpdateDeviceList(virQEMUDriverPtr driver, - virDomainObjPtr vm) + virDomainObjPtr vm, + int asyncJob) { qemuDomainObjPrivatePtr priv = vm->privateData; char **aliases; @@ -2505,7 +2506,8 @@ qemuDomainUpdateDeviceList(virQEMUDriverPtr driver, if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE_DEL_EVENT)) return 0; - qemuDomainObjEnterMonitor(driver, vm); + if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0) + return -1; if (qemuMonitorGetDeviceAliases(priv->mon, &aliases) < 0) { qemuDomainObjExitMonitor(driver, vm); return -1; diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index 67972b9..8736889 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -369,7 +369,7 @@ extern virDomainXMLNamespace virQEMUDriverDomainXMLNamespace; extern virDomainDefParserConfig virQEMUDriverDomainDefParserConfig; int qemuDomainUpdateDeviceList(virQEMUDriverPtr driver, - virDomainObjPtr vm); + virDomainObjPtr vm, int asyncJob); bool qemuDomainDefCheckABIStability(virQEMUDriverPtr driver, virDomainDefPtr src, diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 33541d3..b0439d2 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -1616,7 +1616,8 @@ static virDomainPtr qemuDomainCreateXML(virConnectPtr conn, goto cleanup; } - if (qemuProcessStart(conn, driver, vm, NULL, -1, NULL, NULL, + if (qemuProcessStart(conn, driver, vm, QEMU_ASYNC_JOB_NONE, + NULL, -1, NULL, NULL, VIR_NETDEV_VPORT_PROFILE_OP_CREATE, start_flags) < 0) { virDomainAuditStart(vm, "booted", false); @@ -5446,7 +5447,8 @@ qemuDomainSaveImageStartVM(virConnectPtr conn, } /* Set the migration source and start it up. */ - ret = qemuProcessStart(conn, driver, vm, "stdio", *fd, path, NULL, + ret = qemuProcessStart(conn, driver, vm, QEMU_ASYNC_JOB_NONE, + "stdio", *fd, path, NULL, VIR_NETDEV_VPORT_PROFILE_OP_RESTORE, VIR_QEMU_PROCESS_START_PAUSED); @@ -6143,7 +6145,8 @@ qemuDomainObjStart(virConnectPtr conn, } } - ret = qemuProcessStart(conn, driver, vm, NULL, -1, NULL, NULL, + ret = qemuProcessStart(conn, driver, vm, QEMU_ASYNC_JOB_NONE, + NULL, -1, NULL, NULL, VIR_NETDEV_VPORT_PROFILE_OP_CREATE, start_flags); virDomainAuditStart(vm, "booted", ret >= 0); if (ret >= 0) { @@ -6500,7 +6503,7 @@ qemuDomainAttachDeviceLive(virDomainObjPtr vm, } if (ret == 0) - qemuDomainUpdateDeviceList(driver, vm); + qemuDomainUpdateDeviceList(driver, vm, QEMU_ASYNC_JOB_NONE); return ret; } @@ -6560,7 +6563,7 @@ qemuDomainDetachDeviceLive(virDomainObjPtr vm, } if (ret == 0) - qemuDomainUpdateDeviceList(driver, vm); + qemuDomainUpdateDeviceList(driver, vm, QEMU_ASYNC_JOB_NONE); return ret; } @@ -14101,8 +14104,8 @@ static int qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, if (config) virDomainObjAssignDef(vm, config, false, NULL); - rc = qemuProcessStart(snapshot->domain->conn, - driver, vm, NULL, -1, NULL, snap, + rc = qemuProcessStart(snapshot->domain->conn, driver, vm, + QEMU_ASYNC_JOB_NONE, NULL, -1, NULL, snap, VIR_NETDEV_VPORT_PROFILE_OP_CREATE, VIR_QEMU_PROCESS_START_PAUSED); virDomainAuditStart(vm, "from-snapshot", rc >= 0); @@ -14195,8 +14198,8 @@ static int qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, if (event) qemuDomainEventQueue(driver, event); - rc = qemuProcessStart(snapshot->domain->conn, - driver, vm, NULL, -1, NULL, NULL, + rc = qemuProcessStart(snapshot->domain->conn, driver, vm, + QEMU_ASYNC_JOB_NONE, NULL, -1, NULL, NULL, VIR_NETDEV_VPORT_PROFILE_OP_CREATE, start_flags); virDomainAuditStart(vm, "from-snapshot", rc >= 0); diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 767d840..1c46b34 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -2480,7 +2480,8 @@ qemuMigrationPrepareAny(virQEMUDriverPtr driver, /* Start the QEMU daemon, with the same command-line arguments plus * -incoming $migrateFrom */ - if (qemuProcessStart(dconn, driver, vm, migrateFrom, dataFD[0], NULL, NULL, + if (qemuProcessStart(dconn, driver, vm, QEMU_ASYNC_JOB_MIGRATION_IN, + migrateFrom, dataFD[0], NULL, NULL, VIR_NETDEV_VPORT_PROFILE_OP_MIGRATE_IN_START, VIR_QEMU_PROCESS_START_PAUSED | VIR_QEMU_PROCESS_START_AUTODESTROY) < 0) { diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 8a6b384..690927e 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -1444,7 +1444,8 @@ static qemuMonitorCallbacks monitorCallbacks = { }; static int -qemuConnectMonitor(virQEMUDriverPtr driver, virDomainObjPtr vm, int logfd) +qemuConnectMonitor(virQEMUDriverPtr driver, virDomainObjPtr vm, int asyncJob, + int logfd) { qemuDomainObjPrivatePtr priv = vm->privateData; int ret = -1; @@ -1495,7 +1496,8 @@ qemuConnectMonitor(virQEMUDriverPtr driver, virDomainObjPtr vm, int logfd) } - qemuDomainObjEnterMonitor(driver, vm); + if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0) + goto error; ret = qemuMonitorSetCapabilities(priv->mon); if (ret == 0 && virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_MONITOR_JSON)) @@ -1901,6 +1903,7 @@ qemuProcessFindCharDevicePTYs(virDomainObjPtr vm, static int qemuProcessWaitForMonitor(virQEMUDriverPtr driver, virDomainObjPtr vm, + int asyncJob, virQEMUCapsPtr qemuCaps, off_t pos) { @@ -1926,7 +1929,7 @@ qemuProcessWaitForMonitor(virQEMUDriverPtr driver, } VIR_DEBUG("Connect monitor to %p '%s'", vm, vm->def->name); - if (qemuConnectMonitor(driver, vm, logfd) < 0) + if (qemuConnectMonitor(driver, vm, asyncJob, logfd) < 0) goto cleanup; /* Try to get the pty path mappings again via the monitor. This is much more @@ -1938,7 +1941,8 @@ qemuProcessWaitForMonitor(virQEMUDriverPtr driver, goto cleanup; priv = vm->privateData; - qemuDomainObjEnterMonitor(driver, vm); + if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0) + goto cleanup; ret = qemuMonitorGetPtyPaths(priv->mon, paths); qemuDomainObjExitMonitor(driver, vm); @@ -1984,13 +1988,14 @@ qemuProcessWaitForMonitor(virQEMUDriverPtr driver, static int qemuProcessDetectVcpuPIDs(virQEMUDriverPtr driver, - virDomainObjPtr vm) + virDomainObjPtr vm, int asyncJob) { pid_t *cpupids = NULL; int ncpupids; qemuDomainObjPrivatePtr priv = vm->privateData; - qemuDomainObjEnterMonitor(driver, vm); + if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0) + return -1; /* failure to get the VCPU<-> PID mapping or to execute the query * command will not be treated fatal as some versions of qemu don't * support this command */ @@ -2213,7 +2218,8 @@ qemuProcessSetEmulatorAffinities(virConnectPtr conn ATTRIBUTE_UNUSED, static int qemuProcessInitPasswords(virConnectPtr conn, virQEMUDriverPtr driver, - virDomainObjPtr vm) + virDomainObjPtr vm, + int asyncJob) { int ret = 0; qemuDomainObjPrivatePtr priv = vm->privateData; @@ -2254,7 +2260,8 @@ qemuProcessInitPasswords(virConnectPtr conn, goto cleanup; alias = vm->def->disks[i]->info.alias; - qemuDomainObjEnterMonitor(driver, vm); + if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0) + goto cleanup; ret = qemuMonitorSetDrivePassphrase(priv->mon, alias, secret); VIR_FREE(secret); qemuDomainObjExitMonitor(driver, vm); @@ -3150,7 +3157,7 @@ qemuProcessUpdateDevices(virQEMUDriverPtr driver, old = priv->qemuDevices; priv->qemuDevices = NULL; - if (qemuDomainUpdateDeviceList(driver, vm) < 0) + if (qemuDomainUpdateDeviceList(driver, vm, QEMU_ASYNC_JOB_NONE) < 0) goto cleanup; if ((tmp = old)) { @@ -3216,7 +3223,7 @@ qemuProcessReconnect(void *opaque) virObjectRef(obj); /* XXX check PID liveliness & EXE path */ - if (qemuConnectMonitor(driver, obj, -1) < 0) + if (qemuConnectMonitor(driver, obj, QEMU_ASYNC_JOB_NONE, -1) < 0) goto error; /* Failure to connect to agent shouldn't be fatal */ @@ -3655,6 +3662,7 @@ qemuProcessVerifyGuestCPU(virQEMUDriverPtr driver, virDomainObjPtr vm) int qemuProcessStart(virConnectPtr conn, virQEMUDriverPtr driver, virDomainObjPtr vm, + int asyncJob, const char *migrateFrom, int stdin_fd, const char *stdin_path, @@ -4137,7 +4145,7 @@ int qemuProcessStart(virConnectPtr conn, goto cleanup; VIR_DEBUG("Waiting for monitor to show up"); - if (qemuProcessWaitForMonitor(driver, vm, priv->qemuCaps, pos) < 0) + if (qemuProcessWaitForMonitor(driver, vm, asyncJob, priv->qemuCaps, pos) < 0) goto cleanup; /* Failure to connect to agent shouldn't be fatal */ @@ -4160,7 +4168,7 @@ int qemuProcessStart(virConnectPtr conn, goto cleanup; VIR_DEBUG("Detecting VCPU PIDs"); - if (qemuProcessDetectVcpuPIDs(driver, vm) < 0) + if (qemuProcessDetectVcpuPIDs(driver, vm, asyncJob) < 0) goto cleanup; VIR_DEBUG("Setting cgroup for each VCPU (if required)"); @@ -4180,7 +4188,7 @@ int qemuProcessStart(virConnectPtr conn, goto cleanup; VIR_DEBUG("Setting any required VM passwords"); - if (qemuProcessInitPasswords(conn, driver, vm) < 0) + if (qemuProcessInitPasswords(conn, driver, vm, asyncJob) < 0) goto cleanup; /* If we have -device, then addresses are assigned explicitly. @@ -4195,7 +4203,8 @@ int qemuProcessStart(virConnectPtr conn, /* qemu doesn't support setting this on the command line, so * enter the monitor */ VIR_DEBUG("Setting network link states"); - qemuDomainObjEnterMonitor(driver, vm); + if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0) + goto cleanup; if (qemuProcessSetLinkStates(vm) < 0) { qemuDomainObjExitMonitor(driver, vm); goto cleanup; @@ -4204,7 +4213,7 @@ int qemuProcessStart(virConnectPtr conn, qemuDomainObjExitMonitor(driver, vm); VIR_DEBUG("Fetching list of active devices"); - if (qemuDomainUpdateDeviceList(driver, vm) < 0) + if (qemuDomainUpdateDeviceList(driver, vm, asyncJob) < 0) goto cleanup; /* Technically, qemuProcessStart can be called from inside @@ -4219,7 +4228,8 @@ int qemuProcessStart(virConnectPtr conn, vm->def->mem.cur_balloon); goto cleanup; } - qemuDomainObjEnterMonitor(driver, vm); + if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0) + goto cleanup; if (vm->def->memballoon && vm->def->memballoon->period) qemuMonitorSetMemoryStatsPeriod(priv->mon, vm->def->memballoon->period); if (qemuMonitorSetBalloon(priv->mon, cur_balloon) < 0) { @@ -4764,7 +4774,7 @@ int qemuProcessAttach(virConnectPtr conn ATTRIBUTE_UNUSED, vm->pid = pid; VIR_DEBUG("Waiting for monitor to show up"); - if (qemuProcessWaitForMonitor(driver, vm, priv->qemuCaps, -1) < 0) + if (qemuProcessWaitForMonitor(driver, vm, QEMU_ASYNC_JOB_NONE, priv->qemuCaps, -1) < 0) goto error; /* Failure to connect to agent shouldn't be fatal */ @@ -4779,7 +4789,7 @@ int qemuProcessAttach(virConnectPtr conn ATTRIBUTE_UNUSED, } VIR_DEBUG("Detecting VCPU PIDs"); - if (qemuProcessDetectVcpuPIDs(driver, vm) < 0) + if (qemuProcessDetectVcpuPIDs(driver, vm, QEMU_ASYNC_JOB_NONE) < 0) goto error; /* If we have -device, then addresses are assigned explicitly. diff --git a/src/qemu/qemu_process.h b/src/qemu/qemu_process.h index 9c78736..5948ea4 100644 --- a/src/qemu/qemu_process.h +++ b/src/qemu/qemu_process.h @@ -53,6 +53,7 @@ typedef enum { int qemuProcessStart(virConnectPtr conn, virQEMUDriverPtr driver, virDomainObjPtr vm, + int asyncJob, const char *migrateFrom, int stdin_fd, const char *stdin_path, -- 2.0.2.731.g247b4d5

Also add qemuDomainChangeGraphicsPasswords, qemuProcessVerifyGuestCPU and qemuProcessInitPCIAddresses. Replace tabs by spaces. --- I'll do some testing on the patch and push it later with this squashed in if it works well. src/qemu/qemu_domain.c | 2 +- src/qemu/qemu_hotplug.c | 12 ++++++++---- src/qemu/qemu_hotplug.h | 3 ++- src/qemu/qemu_process.c | 33 ++++++++++++++++++++------------- 4 files changed, 31 insertions(+), 19 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 59b2647..e9506e0 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -2507,7 +2507,7 @@ qemuDomainUpdateDeviceList(virQEMUDriverPtr driver, return 0; if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0) - return -1; + return -1; if (qemuMonitorGetDeviceAliases(priv->mon, &aliases) < 0) { qemuDomainObjExitMonitor(driver, vm); return -1; diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 004b6a4..f7e223a 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -2357,7 +2357,8 @@ qemuDomainChangeGraphics(virQEMUDriverPtr driver, ret = qemuDomainChangeGraphicsPasswords(driver, vm, VIR_DOMAIN_GRAPHICS_TYPE_VNC, &dev->data.vnc.auth, - cfg->vncPassword); + cfg->vncPassword, + QEMU_ASYNC_JOB_NONE); if (ret < 0) goto cleanup; @@ -2407,7 +2408,8 @@ qemuDomainChangeGraphics(virQEMUDriverPtr driver, ret = qemuDomainChangeGraphicsPasswords(driver, vm, VIR_DOMAIN_GRAPHICS_TYPE_SPICE, &dev->data.spice.auth, - cfg->spicePassword); + cfg->spicePassword, + QEMU_ASYNC_JOB_NONE); if (ret < 0) goto cleanup; @@ -3517,7 +3519,8 @@ qemuDomainChangeGraphicsPasswords(virQEMUDriverPtr driver, virDomainObjPtr vm, int type, virDomainGraphicsAuthDefPtr auth, - const char *defaultPasswd) + const char *defaultPasswd, + int asyncJob) { qemuDomainObjPrivatePtr priv = vm->privateData; time_t now = time(NULL); @@ -3534,7 +3537,8 @@ qemuDomainChangeGraphicsPasswords(virQEMUDriverPtr driver, if (auth->connected) connected = virDomainGraphicsAuthConnectedTypeToString(auth->connected); - qemuDomainObjEnterMonitor(driver, vm); + if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0) + goto cleanup; ret = qemuMonitorSetPassword(priv->mon, type, auth->passwd ? auth->passwd : defaultPasswd, diff --git a/src/qemu/qemu_hotplug.h b/src/qemu/qemu_hotplug.h index 6192973..f626c0a 100644 --- a/src/qemu/qemu_hotplug.h +++ b/src/qemu/qemu_hotplug.h @@ -61,7 +61,8 @@ int qemuDomainChangeGraphicsPasswords(virQEMUDriverPtr driver, virDomainObjPtr vm, int type, virDomainGraphicsAuthDefPtr auth, - const char *defaultPasswd); + const char *defaultPasswd, + int asyncJob); int qemuDomainChangeNet(virQEMUDriverPtr driver, virDomainObjPtr vm, virDomainPtr dom, diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 17f65b4..13c396f 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -1559,7 +1559,7 @@ qemuConnectMonitor(virQEMUDriverPtr driver, virDomainObjPtr vm, int asyncJob, if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0) - goto error; + goto error; ret = qemuMonitorSetCapabilities(priv->mon); if (ret == 0 && virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_MONITOR_JSON)) @@ -2004,7 +2004,7 @@ qemuProcessWaitForMonitor(virQEMUDriverPtr driver, priv = vm->privateData; if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0) - goto cleanup; + goto cleanup; ret = qemuMonitorGetPtyPaths(priv->mon, paths); qemuDomainObjExitMonitor(driver, vm); @@ -2057,7 +2057,7 @@ qemuProcessDetectVcpuPIDs(virQEMUDriverPtr driver, qemuDomainObjPrivatePtr priv = vm->privateData; if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0) - return -1; + return -1; /* failure to get the VCPU<-> PID mapping or to execute the query * command will not be treated fatal as some versions of qemu don't * support this command */ @@ -2293,12 +2293,14 @@ qemuProcessInitPasswords(virConnectPtr conn, ret = qemuDomainChangeGraphicsPasswords(driver, vm, VIR_DOMAIN_GRAPHICS_TYPE_VNC, &graphics->data.vnc.auth, - cfg->vncPassword); + cfg->vncPassword, + asyncJob); } else if (graphics->type == VIR_DOMAIN_GRAPHICS_TYPE_SPICE) { ret = qemuDomainChangeGraphicsPasswords(driver, vm, VIR_DOMAIN_GRAPHICS_TYPE_SPICE, &graphics->data.spice.auth, - cfg->spicePassword); + cfg->spicePassword, + asyncJob); } if (ret < 0) @@ -2706,14 +2708,16 @@ qemuProcessDetectPCIAddresses(virDomainObjPtr vm, static int qemuProcessInitPCIAddresses(virQEMUDriverPtr driver, - virDomainObjPtr vm) + virDomainObjPtr vm, + int asyncJob) { qemuDomainObjPrivatePtr priv = vm->privateData; int naddrs; int ret; qemuMonitorPCIAddress *addrs = NULL; - qemuDomainObjEnterMonitor(driver, vm); + if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0) + return -1; naddrs = qemuMonitorGetAllPCIAddresses(priv->mon, &addrs); qemuDomainObjExitMonitor(driver, vm); @@ -3661,7 +3665,9 @@ qemuValidateCpuMax(virDomainDefPtr def, virQEMUCapsPtr qemuCaps) static bool -qemuProcessVerifyGuestCPU(virQEMUDriverPtr driver, virDomainObjPtr vm) +qemuProcessVerifyGuestCPU(virQEMUDriverPtr driver, + virDomainObjPtr vm, + int asyncJob) { virDomainDefPtr def = vm->def; virArch arch = def->os.arch; @@ -3674,7 +3680,8 @@ qemuProcessVerifyGuestCPU(virQEMUDriverPtr driver, virDomainObjPtr vm) switch (arch) { case VIR_ARCH_I686: case VIR_ARCH_X86_64: - qemuDomainObjEnterMonitor(driver, vm); + if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0) + return false; rc = qemuMonitorGetGuestCPU(priv->mon, arch, &guestcpu); qemuDomainObjExitMonitor(driver, vm); @@ -4230,7 +4237,7 @@ int qemuProcessStart(virConnectPtr conn, } VIR_DEBUG("Detecting if required emulator features are present"); - if (!qemuProcessVerifyGuestCPU(driver, vm)) + if (!qemuProcessVerifyGuestCPU(driver, vm, asyncJob)) goto cleanup; VIR_DEBUG("Setting up post-init cgroup restrictions"); @@ -4265,7 +4272,7 @@ int qemuProcessStart(virConnectPtr conn, * If not, then we have to detect dynamic ones here */ if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE)) { VIR_DEBUG("Determining domain device PCI addresses"); - if (qemuProcessInitPCIAddresses(driver, vm) < 0) + if (qemuProcessInitPCIAddresses(driver, vm, asyncJob) < 0) goto cleanup; } @@ -4299,7 +4306,7 @@ int qemuProcessStart(virConnectPtr conn, goto cleanup; } if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0) - goto cleanup; + goto cleanup; if (vm->def->memballoon && vm->def->memballoon->period) qemuMonitorSetMemoryStatsPeriod(priv->mon, vm->def->memballoon->period); if (qemuMonitorSetBalloon(priv->mon, cur_balloon) < 0) { @@ -4866,7 +4873,7 @@ int qemuProcessAttach(virConnectPtr conn ATTRIBUTE_UNUSED, * If not, then we have to detect dynamic ones here */ if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE)) { VIR_DEBUG("Determining domain device PCI addresses"); - if (qemuProcessInitPCIAddresses(driver, vm) < 0) + if (qemuProcessInitPCIAddresses(driver, vm, QEMU_ASYNC_JOB_NONE) < 0) goto error; } -- 1.8.5.5

On 14.08.2014 10:41, Ján Tomko wrote:
Also add qemuDomainChangeGraphicsPasswords, qemuProcessVerifyGuestCPU and qemuProcessInitPCIAddresses.
Replace tabs by spaces. --- I'll do some testing on the patch and push it later with this squashed in if it works well.
src/qemu/qemu_domain.c | 2 +- src/qemu/qemu_hotplug.c | 12 ++++++++---- src/qemu/qemu_hotplug.h | 3 ++- src/qemu/qemu_process.c | 33 ++++++++++++++++++++------------- 4 files changed, 31 insertions(+), 19 deletions(-)
ACK to the original with this squashed in. Michal

On 08/14/2014 11:52 AM, Michal Privoznik wrote:
On 14.08.2014 10:41, Ján Tomko wrote:
Also add qemuDomainChangeGraphicsPasswords, qemuProcessVerifyGuestCPU and qemuProcessInitPCIAddresses.
Replace tabs by spaces. --- I'll do some testing on the patch and push it later with this squashed in if it works well.
src/qemu/qemu_domain.c | 2 +- src/qemu/qemu_hotplug.c | 12 ++++++++---- src/qemu/qemu_hotplug.h | 3 ++- src/qemu/qemu_process.c | 33 ++++++++++++++++++++------------- 4 files changed, 31 insertions(+), 19 deletions(-)
ACK to the original with this squashed in.
Now pushed. Jan

On 14/08/14 20:14, Ján Tomko wrote:
On 08/14/2014 11:52 AM, Michal Privoznik wrote:
On 14.08.2014 10:41, Ján Tomko wrote:
Also add qemuDomainChangeGraphicsPasswords, qemuProcessVerifyGuestCPU and qemuProcessInitPCIAddresses.
Replace tabs by spaces. --- I'll do some testing on the patch and push it later with this squashed in if it works well.
src/qemu/qemu_domain.c | 2 +- src/qemu/qemu_hotplug.c | 12 ++++++++---- src/qemu/qemu_hotplug.h | 3 ++- src/qemu/qemu_process.c | 33 ++++++++++++++++++++------------- 4 files changed, 31 insertions(+), 19 deletions(-)
ACK to the original with this squashed in.
Now pushed.
Jan
Jan, Michal, Thanks for your help :-) (I'll be more careful with formatting in future.) Cheers, Sam.

On 2014/8/15 12:16, Sam Bobroff wrote:
On 14/08/14 20:14, Ján Tomko wrote:
On 08/14/2014 11:52 AM, Michal Privoznik wrote:
On 14.08.2014 10:41, Ján Tomko wrote:
Also add qemuDomainChangeGraphicsPasswords, qemuProcessVerifyGuestCPU and qemuProcessInitPCIAddresses.
Replace tabs by spaces. --- I'll do some testing on the patch and push it later with this squashed in if it works well.
src/qemu/qemu_domain.c | 2 +- src/qemu/qemu_hotplug.c | 12 ++++++++---- src/qemu/qemu_hotplug.h | 3 ++- src/qemu/qemu_process.c | 33 ++++++++++++++++++++------------- 4 files changed, 31 insertions(+), 19 deletions(-)
ACK to the original with this squashed in.
Now pushed.
Jan
Jan, Michal,
Thanks for your help :-)
(I'll be more careful with formatting in future.)
Cheers, Sam.
This patch fix my problem. https://www.redhat.com/archives/libvir-list/2014-May/msg00236.html Thanks.
participants (4)
-
Ján Tomko
-
Michal Privoznik
-
Sam Bobroff
-
Wang Rui