summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorweiwei li <weiweili821@gmail.com>2014-10-31 16:16:22 +0800
committerJán Tomko <jtomko@redhat.com>2014-10-31 12:20:06 +0100
commitbe598c5ff84656d3498b950d473fafe5b86f87b4 (patch)
treeb900b244403563be08e950690222298fd51dfff7
parent720be2eb5f0216564d158dca99c466fac2c16a53 (diff)
downloadlibvirt-be598c5ff84656d3498b950d473fafe5b86f87b4.tar.gz
qemu: Release nbd port from migrationPorts instead of remotePorts
commit 3e1e16aa8d4238241a1806cb9bdb3b9ad60db777 (Use a port from the migration range for NBD as well) changed ndb port allocation from remotePorts to migrationPorts, but did not change the port releasing process, which makes an error when migrating several times (above 64): error: internal error: Unable to find an unused port in range 'migration' (49152-49215) https://bugzilla.redhat.com/show_bug.cgi?id=1159245 Signed-off-by: Weiwei Li <nuonuoli@tencent.com> Signed-off-by: Ján Tomko <jtomko@redhat.com>
-rw-r--r--src/qemu/qemu_migration.c6
-rw-r--r--src/qemu/qemu_process.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index ca70e35294..13239ebe31 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -1389,7 +1389,7 @@ qemuMigrationStartNBDServer(virQEMUDriverPtr driver,
cleanup:
VIR_FREE(diskAlias);
if (ret < 0)
- virPortAllocatorRelease(driver->remotePorts, port);
+ virPortAllocatorRelease(driver->migrationPorts, port);
return ret;
}
@@ -1595,7 +1595,7 @@ qemuMigrationStopNBDServer(virQEMUDriverPtr driver,
qemuDomainObjExitMonitor(driver, vm);
- virPortAllocatorRelease(driver->remotePorts, priv->nbdPort);
+ virPortAllocatorRelease(driver->migrationPorts, priv->nbdPort);
priv->nbdPort = 0;
}
@@ -2813,7 +2813,7 @@ qemuMigrationPrepareAny(virQEMUDriverPtr driver,
VIR_FORCE_CLOSE(dataFD[1]);
if (vm) {
if (ret < 0) {
- virPortAllocatorRelease(driver->remotePorts, priv->nbdPort);
+ virPortAllocatorRelease(driver->migrationPorts, priv->nbdPort);
priv->nbdPort = 0;
}
if (ret >= 0 || vm->persistent)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index ef258cfad8..ba8ba82665 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -4839,7 +4839,7 @@ void qemuProcessStop(virQEMUDriverPtr driver,
}
}
- virPortAllocatorRelease(driver->remotePorts, priv->nbdPort);
+ virPortAllocatorRelease(driver->migrationPorts, priv->nbdPort);
priv->nbdPort = 0;
if (priv->agent) {