From 3da3f5d8de91181fa6c65ecfcf8d4733e000ace4 Mon Sep 17 00:00:00 2001 From: Rajesh Tailor Date: Mon, 16 Apr 2018 19:04:08 +0530 Subject: [PATCH] Modify libvirt port range for live-migration By default, libvirtd uses ports 49152 to 49215 for live-migration, as specified in qemu.conf Since these ports is subset to ephemeral port range, which is from 32768 to 61000 for linux, it can be consumed by any other service as well. It causes live-migration to fail, with below error: Live Migration failure: internal error: Unable to find an unused port in range 'migration' (49152-49215) Using port range out of ephemeral port range. Change-Id: I2039eca87c11638faf6262259b7bcface982f5c6 --- puppet/services/nova-libvirt.yaml | 4 +++- .../live_migration_port_range-54c28faf0a67a3fc.yaml | 11 +++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/live_migration_port_range-54c28faf0a67a3fc.yaml diff --git a/puppet/services/nova-libvirt.yaml b/puppet/services/nova-libvirt.yaml index f777f55dcd..6688d20536 100644 --- a/puppet/services/nova-libvirt.yaml +++ b/puppet/services/nova-libvirt.yaml @@ -209,6 +209,8 @@ outputs: nova::compute::libvirt::qemu::configure_qemu: true nova::compute::libvirt::qemu::max_files: 32768 nova::compute::libvirt::qemu::max_processes: 131072 + nova::migration::qemu::migration_port_min: 61152 + nova::migration::qemu::migration_port_max: 61215 nova::compute::libvirt::vncserver_listen: str_replace: template: @@ -220,7 +222,7 @@ outputs: '200 nova_libvirt': dport: - 16514 - - '49152-49215' + - '61152-61215' - '5900-6923' - diff --git a/releasenotes/notes/live_migration_port_range-54c28faf0a67a3fc.yaml b/releasenotes/notes/live_migration_port_range-54c28faf0a67a3fc.yaml new file mode 100644 index 0000000000..d9b71a4945 --- /dev/null +++ b/releasenotes/notes/live_migration_port_range-54c28faf0a67a3fc.yaml @@ -0,0 +1,11 @@ +--- +fixes: + - | + By default, libvirtd uses ports from 49152 to 49215 for live-migration + as specified in qemu.conf, that becomes a subset of ephemeral ports + (from 32768 to 61000) used by many linux kernels. + The issue here is that these ephemeral ports are used for outgoing TCP + sockets. And live-migration might fail, if there are no port available + from the specified range. + Moving the port range out of ephemeral port range to be used only for + live-migration.