From: Fabian Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com, m.limbeck@proxmox.com
Subject: Re: [pve-devel] [PATCH qemu-server v2] copy conntrack information on migration
Date: Fri, 5 Feb 2021 09:11:46 +0100 [thread overview]
Message-ID: <295d4f46-fbdb-bb8d-9be1-e9fa1fb6dce0@proxmox.com> (raw)
In-Reply-To: <20210203142536.28480-6-m.limbeck@proxmox.com>
Am 03.02.21 um 15:25 schrieb Mira Limbeck:
> Requires the pve-conntrack-tool. On migration the conntrack information
> from the source node is dumped and sent to the target node where it is
> then inserted.
> This helps with open connections during migration when the firewall is active.
>
> A new 'migrate-conntracks' option is added to the migrate_vm API call.
>
> Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
> ---
> v2:
> - added the migrate-conntracks option so that it only copies conntrack
> information when requested
>
> PVE/API2/Qemu.pm | 5 +++++
> PVE/QemuMigrate.pm | 5 +++++
> 2 files changed, 10 insertions(+)
>
> diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
> index 3571f5e..8c4336b 100644
> --- a/PVE/API2/Qemu.pm
> +++ b/PVE/API2/Qemu.pm
> @@ -3556,6 +3556,11 @@ __PACKAGE__->register_method({
> minimum => '0',
> default => 'migrate limit from datacenter or storage config',
> },
> + 'migrate-conntracks' => {
> + description => "Migrate connection tracking info.",
> + type => 'boolean',
> + optional => 1,
> + }
> },
> },
> returns => {
> diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
> index 5c019fc..2ccef2a 100644
> --- a/PVE/QemuMigrate.pm
> +++ b/PVE/QemuMigrate.pm
> @@ -1087,6 +1087,11 @@ sub phase2 {
> die "unable to parse migration status '$stat->{status}' - aborting\n";
> }
> }
> +
> + if ($self->{opts}->{'migrate-conntracks'}) {
> + $self->log('info', 'copy conntrack information');
> + PVE::Tools::run_command([['/usr/bin/pve-conntrack-tool', 'dump'], [@{$self->{rem_ssh}}, '/usr/bin/pve-conntrack-tool', 'insert']]);
Just wondering if having an eval here and still continue with the
migration if there's a problem would make sense? OTOH one can argue that
if the option is set and the connection information cannot be copied,
it's better to abort.
> + }
> }
>
> sub phase2_cleanup {
>
next prev parent reply other threads:[~2021-02-05 8:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-03 14:25 [pve-devel] [PATCH conntrack-tool v2 1/5] initial commit Mira Limbeck
2021-02-03 14:25 ` [pve-devel] [PATCH conntrack-tool v2 2/5] add packaging support Mira Limbeck
2021-02-04 7:08 ` Thomas Lamprecht
2021-02-04 9:55 ` Mira Limbeck
2021-02-03 14:25 ` [pve-devel] [PATCH conntrack-tool v2 3/5] add expectation support Mira Limbeck
2021-02-03 14:25 ` [pve-devel] [PATCH conntrack-tool v2 4/5] add additional bindings Mira Limbeck
2021-02-03 14:25 ` [pve-devel] [PATCH conntrack-tool v2 5/5] replace C callback with closures Mira Limbeck
2021-02-03 14:25 ` [pve-devel] [PATCH qemu-server v2] copy conntrack information on migration Mira Limbeck
2021-02-05 8:11 ` Fabian Ebner [this message]
2021-02-05 9:51 ` Mira Limbeck
2021-02-04 8:07 ` [pve-devel] [PATCH conntrack-tool v2 1/5] initial commit Thomas Lamprecht
2021-02-04 10:15 ` Mira Limbeck
2021-02-04 10:20 ` Thomas Lamprecht
2021-02-04 10:16 ` Mira Limbeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=295d4f46-fbdb-bb8d-9be1-e9fa1fb6dce0@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=m.limbeck@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal