|
|
9119d9 |
From c93d91b3260e3211f19275380e773605af7681d2 Mon Sep 17 00:00:00 2001
|
|
|
9119d9 |
Message-Id: <c93d91b3260e3211f19275380e773605af7681d2@dist-git>
|
|
|
9119d9 |
From: weiwei li <weiweili821@gmail.com>
|
|
|
9119d9 |
Date: Fri, 31 Oct 2014 12:33:01 +0100
|
|
|
9119d9 |
Subject: [PATCH] qemu: Release nbd port from migrationPorts instead of
|
|
|
9119d9 |
remotePorts
|
|
|
9119d9 |
MIME-Version: 1.0
|
|
|
9119d9 |
Content-Type: text/plain; charset=UTF-8
|
|
|
9119d9 |
Content-Transfer-Encoding: 8bit
|
|
|
9119d9 |
|
|
|
9119d9 |
commit 3e1e16aa8d4238241a1806cb9bdb3b9ad60db777 (Use a port from the
|
|
|
9119d9 |
migration range for NBD as well) changed ndb port allocation from
|
|
|
9119d9 |
remotePorts to migrationPorts, but did not change the port releasing
|
|
|
9119d9 |
process, which makes an error when migrating several times (above 64):
|
|
|
9119d9 |
error: internal error: Unable to find an unused port in range
|
|
|
9119d9 |
'migration' (49152-49215)
|
|
|
9119d9 |
|
|
|
9119d9 |
https://bugzilla.redhat.com/show_bug.cgi?id=1159245
|
|
|
9119d9 |
|
|
|
9119d9 |
Signed-off-by: Weiwei Li <nuonuoli@tencent.com>
|
|
|
9119d9 |
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
|
|
9119d9 |
(cherry picked from commit be598c5ff84656d3498b950d473fafe5b86f87b4)
|
|
|
9119d9 |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
9119d9 |
---
|
|
|
9119d9 |
src/qemu/qemu_migration.c | 6 +++---
|
|
|
9119d9 |
src/qemu/qemu_process.c | 2 +-
|
|
|
9119d9 |
2 files changed, 4 insertions(+), 4 deletions(-)
|
|
|
9119d9 |
|
|
|
9119d9 |
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
|
|
|
9119d9 |
index 2b922fe..1998bc9 100644
|
|
|
9119d9 |
--- a/src/qemu/qemu_migration.c
|
|
|
9119d9 |
+++ b/src/qemu/qemu_migration.c
|
|
|
9119d9 |
@@ -1389,7 +1389,7 @@ qemuMigrationStartNBDServer(virQEMUDriverPtr driver,
|
|
|
9119d9 |
cleanup:
|
|
|
9119d9 |
VIR_FREE(diskAlias);
|
|
|
9119d9 |
if (ret < 0)
|
|
|
9119d9 |
- virPortAllocatorRelease(driver->remotePorts, port);
|
|
|
9119d9 |
+ virPortAllocatorRelease(driver->migrationPorts, port);
|
|
|
9119d9 |
return ret;
|
|
|
9119d9 |
}
|
|
|
9119d9 |
|
|
|
9119d9 |
@@ -1595,7 +1595,7 @@ qemuMigrationStopNBDServer(virQEMUDriverPtr driver,
|
|
|
9119d9 |
|
|
|
9119d9 |
qemuDomainObjExitMonitor(driver, vm);
|
|
|
9119d9 |
|
|
|
9119d9 |
- virPortAllocatorRelease(driver->remotePorts, priv->nbdPort);
|
|
|
9119d9 |
+ virPortAllocatorRelease(driver->migrationPorts, priv->nbdPort);
|
|
|
9119d9 |
priv->nbdPort = 0;
|
|
|
9119d9 |
}
|
|
|
9119d9 |
|
|
|
9119d9 |
@@ -2821,7 +2821,7 @@ qemuMigrationPrepareAny(virQEMUDriverPtr driver,
|
|
|
9119d9 |
VIR_FORCE_CLOSE(dataFD[1]);
|
|
|
9119d9 |
if (vm) {
|
|
|
9119d9 |
if (ret < 0) {
|
|
|
9119d9 |
- virPortAllocatorRelease(driver->remotePorts, priv->nbdPort);
|
|
|
9119d9 |
+ virPortAllocatorRelease(driver->migrationPorts, priv->nbdPort);
|
|
|
9119d9 |
priv->nbdPort = 0;
|
|
|
9119d9 |
}
|
|
|
9119d9 |
if (ret >= 0 || vm->persistent)
|
|
|
9119d9 |
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
|
|
|
9119d9 |
index 6565956..e711b5f 100644
|
|
|
9119d9 |
--- a/src/qemu/qemu_process.c
|
|
|
9119d9 |
+++ b/src/qemu/qemu_process.c
|
|
|
9119d9 |
@@ -4794,7 +4794,7 @@ void qemuProcessStop(virQEMUDriverPtr driver,
|
|
|
9119d9 |
}
|
|
|
9119d9 |
}
|
|
|
9119d9 |
|
|
|
9119d9 |
- virPortAllocatorRelease(driver->remotePorts, priv->nbdPort);
|
|
|
9119d9 |
+ virPortAllocatorRelease(driver->migrationPorts, priv->nbdPort);
|
|
|
9119d9 |
priv->nbdPort = 0;
|
|
|
9119d9 |
|
|
|
9119d9 |
if (priv->agent) {
|
|
|
9119d9 |
--
|
|
|
9119d9 |
2.1.3
|
|
|
9119d9 |
|