public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: [pve-devel] applied: [RFC v2 container 3/5] deactivate volumes after storage_migrate
Date: Tue, 24 Nov 2020 16:26:33 +0100	[thread overview]
Message-ID: <1606231495.l7zhwtxuia.astroid@nora.none> (raw)
In-Reply-To: <20201106143059.22047-3-f.ebner@proxmox.com>

it can't hurt either, and makes it more uniform with qemu migration

On November 6, 2020 3:30 pm, Fabian Ebner wrote:
> Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
> ---
> 
> This is probably not worth it, for two reasons:
> 1. only local unused volumes are not already deactivated by the existing code
> 2. if nothing else goes wrong, the volumes migrated with storage_migrate
> will be deleted anyways
> 
>  src/PVE/LXC/Migrate.pm | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/src/PVE/LXC/Migrate.pm b/src/PVE/LXC/Migrate.pm
> index 94a78c5..7c3536f 100644
> --- a/src/PVE/LXC/Migrate.pm
> +++ b/src/PVE/LXC/Migrate.pm
> @@ -294,6 +294,11 @@ sub phase1 {
>  	if (my $err = $@) {
>  	    die "storage migration for '$volid' to storage '$sid' failed - $err\n";
>  	}
> +
> +	eval { PVE::Storage::deactivate_volumes($self->{storecfg}, [$volid]); };
> +	if (my $err = $@) {
> +	    $self->log('warn', $err);
> +	}
>      }
>  
>      my $conffile = PVE::LXC::Config->config_file($vmid);
> -- 
> 2.20.1
> 
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 
> 




  reply	other threads:[~2020-11-24 15:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-06 14:30 [pve-devel] [PATCH v2 storage 1/5] fix #3030: always activate volumes in storage_migrate Fabian Ebner
2020-11-06 14:30 ` [pve-devel] [PATCH v2 container 2/5] adapt to new storage_migrate activation behavior Fabian Ebner
2020-11-10 18:29   ` [pve-devel] applied: " Thomas Lamprecht
2020-11-06 14:30 ` [pve-devel] [RFC v2 container 3/5] deactivate volumes after storage_migrate Fabian Ebner
2020-11-24 15:26   ` Fabian Grünbichler [this message]
2020-11-06 14:30 ` [pve-devel] [RFC v2 qemu-server 4/5] adapt to new storage_migrate activation behavior Fabian Ebner
2020-11-24 15:29   ` [pve-devel] applied: " Fabian Grünbichler
2020-11-06 14:30 ` [pve-devel] [RFC v2 qemu-server 5/5] deactivate volumes after storage_migrate Fabian Ebner
2020-11-24 15:29   ` [pve-devel] applied: " Fabian Grünbichler
2020-11-10 18:12 ` [pve-devel] applied: [PATCH v2 storage 1/5] fix #3030: always activate volumes in storage_migrate Thomas Lamprecht

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=1606231495.l7zhwtxuia.astroid@nora.none \
    --to=f.gruenbichler@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal