From: Mira Limbeck <m.limbeck@proxmox.com>
To: Fabian Ebner <f.ebner@proxmox.com>, pve-devel@lists.proxmox.com
Subject: Re: [pve-devel] [PATCH qemu-server v2] copy conntrack information on migration
Date: Fri, 5 Feb 2021 10:51:22 +0100 [thread overview]
Message-ID: <b409b602-35d5-272c-15c0-d44135865d58@proxmox.com> (raw)
In-Reply-To: <295d4f46-fbdb-bb8d-9be1-e9fa1fb6dce0@proxmox.com>
On 2/5/21 9:11 AM, Fabian Ebner wrote:
> 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.
>
I'm in favor of aborting, but perhaps eval and die on error with a
custom error message?
>> + }
>> }
>> sub phase2_cleanup {
>>
next prev parent reply other threads:[~2021-02-05 9:51 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
2021-02-05 9:51 ` Mira Limbeck [this message]
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=b409b602-35d5-272c-15c0-d44135865d58@proxmox.com \
--to=m.limbeck@proxmox.com \
--cc=f.ebner@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