[PATCH 16/16] Virt: adjust auto http servers (content/kickstart) ports to not overlap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Cleber Rosa <crosa@xxxxxxxxxx>

There's a race condition when picking free ports and starting the
http server thread, so both servers get the same port.

Change to non-overlapping ranges to avoid that.

Signed-off-by: Cleber Rosa <crosa@xxxxxxxxxx>
---
 client/virt/tests/unattended_install.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/client/virt/tests/unattended_install.py b/client/virt/tests/unattended_install.py
index 7316b24..a78e2bc 100644
--- a/client/virt/tests/unattended_install.py
+++ b/client/virt/tests/unattended_install.py
@@ -513,7 +513,7 @@ class UnattendedInstallConfig(object):
             if self.unattended_server_port is None:
                 self.unattended_server_port = virt_utils.find_free_port(
                     8000,
-                    8100,
+                    8099,
                     self.url_auto_content_ip)
 
             if _unattended_server_thread is None:
@@ -660,8 +660,8 @@ class UnattendedInstallConfig(object):
             utils.run(m_cmd)
 
         self.url_auto_content_port = virt_utils.find_free_port(
-            8000,
             8100,
+            8199,
             self.url_auto_content_ip)
 
         if _url_auto_content_server_thread is None:
-- 
1.7.7

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux